本文整理汇总了C++中GIMP_IS_ITEM函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_ITEM函数的具体用法?C++ GIMP_IS_ITEM怎么用?C++ GIMP_IS_ITEM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GIMP_IS_ITEM函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gimp_pdb_item_is_in_same_tree
gboolean
gimp_pdb_item_is_in_same_tree (GimpItem *item,
GimpItem *item2,
GimpImage *image,
GError **error)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (GIMP_IS_ITEM (item2), FALSE);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (! gimp_pdb_item_is_in_tree (item, image, FALSE, error) ||
! gimp_pdb_item_is_in_tree (item2, image, FALSE, error))
return FALSE;
if (gimp_item_get_tree (item) != gimp_item_get_tree (item2))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Items '%s' (%d) and '%s' (%d) cannot be used "
"because they are not part of the same item tree"),
gimp_object_get_name (item),
gimp_item_get_ID (item),
gimp_object_get_name (item2),
gimp_item_get_ID (item2));
return FALSE;
}
return TRUE;
}
开发者ID:Distrotech,项目名称:gimp,代码行数:29,代码来源:gimppdb-utils.c
示例2: gimp_item_get_ID
gint
gimp_item_get_ID (GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), -1);
return item->ID;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,代码来源:gimpitem.c
示例3: gimp_item_get_tattoo
GimpTattoo
gimp_item_get_tattoo (const GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), 0);
return item->tattoo;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,代码来源:gimpitem.c
示例4: gimp_item_is_removed
/**
* gimp_item_is_removed:
* @item: the #GimpItem to check.
*
* Returns: %TRUE if the 'removed' flag is set for @item, %FALSE otherwise.
*/
gboolean
gimp_item_is_removed (const GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
return item->removed;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,代码来源:gimpitem.c
示例5: gimp_pdb_item_is_modifyable
gboolean
gimp_pdb_item_is_modifyable (GimpItem *item,
GimpPDBItemModify modify,
GError **error)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if ((modify & GIMP_PDB_ITEM_CONTENT) && gimp_item_is_content_locked (item))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Item '%s' (%d) cannot be modified because its "
"contents are locked"),
gimp_object_get_name (item),
gimp_item_get_ID (item));
return FALSE;
}
if ((modify & GIMP_PDB_ITEM_POSITION) && gimp_item_is_position_locked (item))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Item '%s' (%d) cannot be modified because its "
"position and size are locked"),
gimp_object_get_name (item),
gimp_item_get_ID (item));
return FALSE;
}
return TRUE;
}
开发者ID:Distrotech,项目名称:gimp,代码行数:30,代码来源:gimppdb-utils.c
示例6: gimp_item_width
/**
* gimp_item_width:
* @item: The #GimpItem to check.
*
* Returns: The width of the item.
*/
gint
gimp_item_width (const GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), -1);
return item->width;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,代码来源:gimpitem.c
示例7: gimp_item_linked_transform
void
gimp_item_linked_transform (GimpItem *item,
GimpContext *context,
const GimpMatrix3 *matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation_type,
GimpTransformResize clip_result,
GimpProgress *progress)
{
GList *list;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (gimp_item_get_linked (item) == TRUE);
g_return_if_fail (gimp_item_is_attached (item));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
list = gimp_image_item_list_get_list (gimp_item_get_image (item), item,
GIMP_ITEM_TYPE_ALL,
GIMP_ITEM_SET_LINKED);
list = gimp_image_item_list_filter (item, list, TRUE, FALSE);
gimp_image_item_list_transform (gimp_item_get_image (item), list, context,
matrix, direction,
interpolation_type,
clip_result, progress);
g_list_free (list);
}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:30,代码来源:gimpitem-linked.c
示例8: gimp_item_is_attached
/**
* gimp_item_is_attached:
* @item: The #GimpItem to check.
*
* Returns: %TRUE if the item is attached to an image, %FALSE otherwise.
*/
gboolean
gimp_item_is_attached (GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
return GIMP_ITEM_GET_CLASS (item)->is_attached (item);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,代码来源:gimpitem.c
示例9: gimp_item_transform
void
gimp_item_transform (GimpItem *item,
GimpContext *context,
const GimpMatrix3 *matrix,
GimpTransformDirection direction,
GimpInterpolationType interpolation,
gint recursion_level,
GimpTransformResize clip_result,
GimpProgress *progress)
{
GimpItemClass *item_class;
GimpImage *image;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (gimp_item_is_attached (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (matrix != NULL);
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
item_class = GIMP_ITEM_GET_CLASS (item);
image = gimp_item_get_image (item);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM,
item_class->transform_desc);
item_class->transform (item, context, matrix, direction, interpolation,
recursion_level, clip_result, progress);
gimp_image_undo_group_end (image);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:30,代码来源:gimpitem.c
示例10: gimp_item_height
/**
* gimp_item_height:
* @item: The #GimpItem to check.
*
* Returns: The height of the item.
*/
gint
gimp_item_height (const GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), -1);
return item->height;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,代码来源:gimpitem.c
示例11: gimp_item_resize
void
gimp_item_resize (GimpItem *item,
GimpContext *context,
gint new_width,
gint new_height,
gint offset_x,
gint offset_y)
{
GimpItemClass *item_class;
GimpImage *image;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
if (new_width < 1 || new_height < 1)
return;
item_class = GIMP_ITEM_GET_CLASS (item);
image = gimp_item_get_image (item);
if (gimp_item_is_attached (item))
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_RESIZE,
item_class->resize_desc);
item_class->resize (item, context, new_width, new_height, offset_x, offset_y);
if (gimp_item_is_attached (item))
gimp_image_undo_group_end (image);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:29,代码来源:gimpitem.c
示例12: gimp_item_rotate
void
gimp_item_rotate (GimpItem *item,
GimpContext *context,
GimpRotationType rotate_type,
gdouble center_x,
gdouble center_y,
gboolean clip_result)
{
GimpItemClass *item_class;
GimpImage *image;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (gimp_item_is_attached (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
item_class = GIMP_ITEM_GET_CLASS (item);
image = gimp_item_get_image (item);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TRANSFORM,
item_class->rotate_desc);
item_class->rotate (item, context, rotate_type, center_x, center_y,
clip_result);
gimp_image_undo_group_end (image);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:26,代码来源:gimpitem.c
示例13: gimp_item_scale
void
gimp_item_scale (GimpItem *item,
gint new_width,
gint new_height,
gint new_offset_x,
gint new_offset_y,
GimpInterpolationType interpolation,
GimpProgress *progress)
{
GimpItemClass *item_class;
GimpImage *image;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (new_width < 1 || new_height < 1)
return;
item_class = GIMP_ITEM_GET_CLASS (item);
image = gimp_item_get_image (item);
if (gimp_item_is_attached (item))
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_SCALE,
item_class->scale_desc);
item_class->scale (item, new_width, new_height, new_offset_x, new_offset_y,
interpolation, progress);
if (gimp_item_is_attached (item))
gimp_image_undo_group_end (image);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:31,代码来源:gimpitem.c
示例14: gimp_item_scale_by_factors
/**
* gimp_item_scale_by_factors:
* @item: Item to be transformed by explicit width and height factors.
* @w_factor: scale factor to apply to width and horizontal offset
* @h_factor: scale factor to apply to height and vertical offset
* @interpolation:
* @progress:
*
* Scales item dimensions and offsets by uniform width and
* height factors.
*
* Use gimp_item_scale_by_factors() in circumstances when the same
* width and height scaling factors are to be uniformly applied to a
* set of items. In this context, the item's dimensions and offsets
* from the sides of the containing image all change by these
* predetermined factors. By fiat, the fixed point of the transform is
* the upper left hand corner of the image. Returns #FALSE if a
* requested scale factor is zero or if a scaling zero's out a item
* dimension; returns #TRUE otherwise.
*
* Use gimp_item_scale() in circumstances where new item width
* and height dimensions are predetermined instead.
*
* Side effects: Undo set created for item. Old item imagery
* scaled & painted to new item tiles.
*
* Returns: #TRUE, if the scaled item has positive dimensions
* #FALSE if the scaled item has at least one zero dimension
**/
gboolean
gimp_item_scale_by_factors (GimpItem *item,
gdouble w_factor,
gdouble h_factor,
GimpInterpolationType interpolation,
GimpProgress *progress)
{
gint new_width, new_height;
gint new_offset_x, new_offset_y;
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
if (w_factor == 0.0 || h_factor == 0.0)
{
g_warning ("%s: requested width or height scale equals zero", G_STRFUNC);
return FALSE;
}
new_offset_x = ROUND (w_factor * (gdouble) item->offset_x);
new_offset_y = ROUND (h_factor * (gdouble) item->offset_y);
new_width = ROUND (w_factor * (gdouble) gimp_item_width (item));
new_height = ROUND (h_factor * (gdouble) gimp_item_height (item));
if (new_width != 0 && new_height != 0)
{
gimp_item_scale (item,
new_width, new_height,
new_offset_x, new_offset_y,
interpolation, progress);
return TRUE;
}
return FALSE;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:64,代码来源:gimpitem.c
示例15: gimp_item_parasite_detach
void
gimp_item_parasite_detach (GimpItem *item,
const gchar *name)
{
const GimpParasite *parasite;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (name != NULL);
parasite = gimp_parasite_list_find (item->parasites, name);
if (! parasite)
return;
if (gimp_parasite_is_undoable (parasite))
{
gimp_image_undo_push_item_parasite_remove (item->image,
_("Remove Parasite from Item"),
item,
gimp_parasite_name (parasite));
}
else if (gimp_parasite_is_persistent (parasite))
{
gimp_image_undo_push_cantundo (item->image,
_("Remove Parasite from Item"));
}
gimp_parasite_list_remove (item->parasites, name);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:29,代码来源:gimpitem.c
示例16: gimp_item_translate
/**
* gimp_item_translate:
* @item: The #GimpItem to move.
* @offset_x: Increment to the X offset of the item.
* @offset_y: Increment to the Y offset of the item.
* @push_undo: If #TRUE, create an entry in the image's undo stack
* for this action.
*
* Adds the specified increments to the X and Y offsets for the item.
*/
void
gimp_item_translate (GimpItem *item,
gint offset_x,
gint offset_y,
gboolean push_undo)
{
GimpItemClass *item_class;
GimpImage *image;
g_return_if_fail (GIMP_IS_ITEM (item));
item_class = GIMP_ITEM_GET_CLASS (item);
image = gimp_item_get_image (item);
if (! gimp_item_is_attached (item))
push_undo = FALSE;
if (push_undo)
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_ITEM_DISPLACE,
item_class->translate_desc);
item_class->translate (item, offset_x, offset_y, push_undo);
if (push_undo)
gimp_image_undo_group_end (image);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:36,代码来源:gimpitem.c
示例17: gimp_pdb_item_is_attached
gboolean
gimp_pdb_item_is_attached (GimpItem *item,
GimpImage *image,
GimpPDBItemModify modify,
GError **error)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (! gimp_item_is_attached (item))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Item '%s' (%d) cannot be used because it has not "
"been added to an image"),
gimp_object_get_name (item),
gimp_item_get_ID (item));
return FALSE;
}
if (image && image != gimp_item_get_image (item))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Item '%s' (%d) cannot be used because it is "
"attached to another image"),
gimp_object_get_name (item),
gimp_item_get_ID (item));
return FALSE;
}
return gimp_pdb_item_is_modifyable (item, modify, error);
}
开发者ID:Distrotech,项目名称:gimp,代码行数:32,代码来源:gimppdb-utils.c
示例18: gimp_item_get_image
GimpImage *
gimp_item_get_image (const GimpItem *item)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), NULL);
return item->image;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,代码来源:gimpitem.c
示例19: gimp_pdb_item_is_in_tree
gboolean
gimp_pdb_item_is_in_tree (GimpItem *item,
GimpImage *image,
GimpPDBItemModify modify,
GError **error)
{
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (image == NULL || GIMP_IS_IMAGE (image), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (! gimp_pdb_item_is_attached (item, image, modify, error))
return FALSE;
if (! gimp_item_get_tree (item))
{
g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT,
_("Item '%s' (%d) cannot be used because it is not "
"a direct child of an item tree"),
gimp_object_get_name (item),
gimp_item_get_ID (item));
return FALSE;
}
return TRUE;
}
开发者ID:Distrotech,项目名称:gimp,代码行数:25,代码来源:gimppdb-utils.c
示例20: gimp_item_linked_flip
void
gimp_item_linked_flip (GimpItem *item,
GimpContext *context,
GimpOrientationType flip_type,
gdouble axis,
gboolean clip_result)
{
GList *list;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (gimp_item_get_linked (item) == TRUE);
g_return_if_fail (gimp_item_is_attached (item));
list = gimp_image_item_list_get_list (gimp_item_get_image (item), item,
GIMP_ITEM_TYPE_ALL,
GIMP_ITEM_SET_LINKED);
list = gimp_image_item_list_filter (item, list, TRUE, FALSE);
gimp_image_item_list_flip (gimp_item_get_image (item), list, context,
flip_type, axis, clip_result);
g_list_free (list);
}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:25,代码来源:gimpitem-linked.c
注:本文中的GIMP_IS_ITEM函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论