这篇教程C++ GIMP_IS_ITEM函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GIMP_IS_ITEM函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_ITEM函数的具体用法?C++ GIMP_IS_ITEM怎么用?C++ GIMP_IS_ITEM使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GIMP_IS_ITEM函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: gimp_pdb_item_is_in_same_treegbooleangimp_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,
示例2: gimp_item_get_IDgintgimp_item_get_ID (GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), -1); return item->ID;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,
示例3: gimp_item_get_tattooGimpTattoogimp_item_get_tattoo (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), 0); return item->tattoo;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,
示例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. */gbooleangimp_item_is_removed (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); return item->removed;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,
示例5: gimp_pdb_item_is_modifyablegbooleangimp_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,
示例6: gimp_item_width/** * gimp_item_width: * @item: The #GimpItem to check. * * Returns: The width of the item. */gintgimp_item_width (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), -1); return item->width;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,
示例7: gimp_item_linked_transformvoidgimp_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,
示例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. */gbooleangimp_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,
示例9: gimp_item_transformvoidgimp_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,
示例10: gimp_item_height/** * gimp_item_height: * @item: The #GimpItem to check. * * Returns: The height of the item. */gintgimp_item_height (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), -1); return item->height;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,
示例11: gimp_item_resizevoidgimp_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,
示例12: gimp_item_rotatevoidgimp_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,
示例13: gimp_item_scalevoidgimp_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,
示例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 **/gbooleangimp_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,
示例15: gimp_item_parasite_detachvoidgimp_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,
示例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. */voidgimp_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,
示例17: gimp_pdb_item_is_attachedgbooleangimp_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,
示例18: gimp_item_get_imageGimpImage *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,
示例19: gimp_pdb_item_is_in_treegbooleangimp_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,
示例20: gimp_item_linked_flipvoidgimp_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,
示例21: gimp_pdb_item_is_floatinggbooleangimp_pdb_item_is_floating (GimpItem *item, GimpImage *dest_image, GError **error){ g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); g_return_val_if_fail (GIMP_IS_IMAGE (dest_image), FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE); if (! g_object_is_floating (item)) { g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT, _("Item '%s' (%d) has already been added to an image"), gimp_object_get_name (item), gimp_item_get_ID (item)); return FALSE; } else if (gimp_item_get_image (item) != dest_image) { g_set_error (error, GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_ARGUMENT, _("Trying to add item '%s' (%d) to wrong image"), gimp_object_get_name (item), gimp_item_get_ID (item)); return FALSE; } return TRUE;}
开发者ID:Distrotech,项目名称:gimp,代码行数:28,
示例22: gimp_item_is_in_setgbooleangimp_item_is_in_set (GimpItem *item, GimpItemSet set){ g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); switch (set) { case GIMP_ITEM_SET_NONE: return FALSE; case GIMP_ITEM_SET_ALL: return TRUE; case GIMP_ITEM_SET_IMAGE_SIZED: return (gimp_item_width (item) == gimp_image_get_width (item->image) && gimp_item_height (item) == gimp_image_get_height (item->image)); case GIMP_ITEM_SET_VISIBLE: return gimp_item_get_visible (item); case GIMP_ITEM_SET_LINKED: return gimp_item_get_linked (item); } return FALSE;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:27,
示例23: gimp_item_get_linkedgbooleangimp_item_get_linked (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); return item->linked;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,
示例24: gimp_item_get_visiblegbooleangimp_item_get_visible (const GimpItem *item){ g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE); return item->visible;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:7,
示例25: gimp_item_parasite_findconst GimpParasite *gimp_item_parasite_find (const GimpItem *item, const gchar *name){ g_return_val_if_fail (GIMP_IS_ITEM (item), NULL); return gimp_parasite_list_find (item->parasites, name);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:8,
示例26: gimp_item_set_tattoovoidgimp_item_set_tattoo (GimpItem *item, GimpTattoo tattoo){ g_return_if_fail (GIMP_IS_ITEM (item)); item->tattoo = tattoo;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:8,
示例27: gimp_item_parasite_attachvoidgimp_item_parasite_attach (GimpItem *item, const GimpParasite *parasite){ GimpParasite copy; g_return_if_fail (GIMP_IS_ITEM (item)); g_return_if_fail (parasite != NULL); /* make a temporary copy of the GimpParasite struct because * gimp_parasite_shift_parent() changes it */ copy = *parasite; if (gimp_item_is_attached (item)) { /* only set the dirty bit manually if we can be saved and the new * parasite differs from the current one and we aren't undoable */ if (gimp_parasite_is_undoable (©)) { /* do a group in case we have attach_parent set */ gimp_image_undo_group_start (item->image, GIMP_UNDO_GROUP_PARASITE_ATTACH, _("Attach Parasite")); gimp_image_undo_push_item_parasite (item->image, NULL, item, ©); } else if (gimp_parasite_is_persistent (©) && ! gimp_parasite_compare (©, gimp_item_parasite_find (item, gimp_parasite_name (©)))) { gimp_image_undo_push_cantundo (item->image, _("Attach Parasite to Item")); } } gimp_parasite_list_add (item->parasites, ©); if (gimp_parasite_has_flag (©, GIMP_PARASITE_ATTACH_PARENT)) { gimp_parasite_shift_parent (©); gimp_image_parasite_attach (item->image, ©); } else if (gimp_parasite_has_flag (©, GIMP_PARASITE_ATTACH_GRANDPARENT)) { gimp_parasite_shift_parent (©); gimp_parasite_shift_parent (©); gimp_parasite_attach (item->image->gimp, ©); } if (gimp_item_is_attached (item) && gimp_parasite_is_undoable (©)) { gimp_image_undo_group_end (item->image); }}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:58,
示例28: gimp_item_undo_constructedstatic voidgimp_item_undo_constructed (GObject *object){ GimpItemUndo *item_undo = GIMP_ITEM_UNDO (object); G_OBJECT_CLASS (parent_class)->constructed (object); g_assert (GIMP_IS_ITEM (item_undo->item));}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:9,
示例29: gimp_item_real_duplicatestatic GimpItem *gimp_item_real_duplicate (GimpItem *item, GType new_type){ GimpItem *new_item; gchar *new_name; g_return_val_if_fail (GIMP_IS_ITEM (item), NULL); g_return_val_if_fail (GIMP_IS_IMAGE (item->image), NULL); g_return_val_if_fail (g_type_is_a (new_type, GIMP_TYPE_ITEM), NULL); /* formulate the new name */ { const gchar *name; gchar *ext; gint number; gint len; name = gimp_object_get_name (GIMP_OBJECT (item)); g_return_val_if_fail (name != NULL, NULL); ext = strrchr (name, '#'); len = strlen (_("copy")); if ((strlen (name) >= len && strcmp (&name[strlen (name) - len], _("copy")) == 0) || (ext && (number = atoi (ext + 1)) > 0 && ((int)(log10 (number) + 1)) == strlen (ext + 1))) { /* don't have redundant "copy"s */ new_name = g_strdup (name); } else { new_name = g_strdup_printf (_("%s copy"), name); } } new_item = g_object_new (new_type, NULL); gimp_item_configure (new_item, gimp_item_get_image (item), item->offset_x, item->offset_y, gimp_item_width (item), gimp_item_height (item), new_name); g_free (new_name); g_object_unref (new_item->parasites); new_item->parasites = gimp_parasite_list_copy (item->parasites); new_item->visible = gimp_item_get_visible (item); new_item->linked = gimp_item_get_linked (item); return new_item;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:57,
示例30: gimp_item_removed/** * gimp_item_remove: * @item: the #GimpItem to remove. * * This function sets the 'removed' flag on @item to #TRUE, and emits * a 'removed' signal on the item. */voidgimp_item_removed (GimpItem *item){ g_return_if_fail (GIMP_IS_ITEM (item)); item->removed = TRUE; g_signal_emit (item, gimp_item_signals[REMOVED], 0);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:16,
注:本文中的GIMP_IS_ITEM函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GIMP_IS_LAYER函数代码示例 C++ GIMP_IS_IMAGE函数代码示例 |