本文整理汇总了C++中GIMP_IS_PROGRESS函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_IS_PROGRESS函数的具体用法?C++ GIMP_IS_PROGRESS怎么用?C++ GIMP_IS_PROGRESS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GIMP_IS_PROGRESS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gimp_progress_pulse
void
gimp_progress_pulse (GimpProgress *progress)
{
GimpProgressInterface *progress_iface;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->pulse)
progress_iface->pulse (progress);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:12,代码来源:gimpprogress.c
示例2: gimp_get_mount_operation
GMountOperation *
gimp_get_mount_operation (Gimp *gimp,
GimpProgress *progress)
{
g_return_val_if_fail (GIMP_IS_GIMP (gimp), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
if (gimp->gui.get_mount_operation)
return gimp->gui.get_mount_operation (gimp, progress);
return g_mount_operation_new ();
}
开发者ID:ellelstone,项目名称:gimp,代码行数:12,代码来源:gimp-gui.c
示例3: gimp_help
void
gimp_help (Gimp *gimp,
GimpProgress *progress,
const gchar *help_domain,
const gchar *help_id)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (gimp->gui.help)
gimp->gui.help (gimp, progress, help_domain, help_id);
}
开发者ID:ellelstone,项目名称:gimp,代码行数:12,代码来源:gimp-gui.c
示例4: gimp_sub_progress_new
/**
* gimp_sub_progress_new:
* @progress: parent progress or %NULL
*
* GimpSubProgress implements the GimpProgress interface and can be
* used wherever a GimpProgress is needed. It maps progress
* information to a sub-range of its parent @progress. This is useful
* when an action breaks down into multiple sub-actions that itself
* need a #GimpProgress pointer. See gimp_image_scale() for an example.
*
* Return value: a new #GimpProgress object
*/
GimpProgress *
gimp_sub_progress_new (GimpProgress *progress)
{
GimpSubProgress *sub;
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
sub = g_object_new (GIMP_TYPE_SUB_PROGRESS,
"progress", progress,
NULL);
return GIMP_PROGRESS (sub);
}
开发者ID:jiapei100,项目名称:gimp,代码行数:25,代码来源:gimpsubprogress.c
示例5: gimp_progress_get_value
gdouble
gimp_progress_get_value (GimpProgress *progress)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0.0);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->get_value)
return progress_iface->get_value (progress);
return 0.0;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c
示例6: gimp_progress_is_active
gboolean
gimp_progress_is_active (GimpProgress *progress)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), FALSE);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->is_active)
return progress_iface->is_active (progress);
return FALSE;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c
示例7: gimp_progress_set_text_literal
void
gimp_progress_set_text_literal (GimpProgress *progress,
const gchar *message)
{
GimpProgressInterface *progress_iface;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
g_return_if_fail (message != NULL);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->set_text)
progress_iface->set_text (progress, message);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c
示例8: gimp_progress_get_window_id
guint32
gimp_progress_get_window_id (GimpProgress *progress)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->get_window_id)
return progress_iface->get_window_id (progress);
return 0;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,代码来源:gimpprogress.c
示例9: gimp_drawable_foreground_extract_siox
void
gimp_drawable_foreground_extract_siox (GimpDrawable *mask,
SioxState *state,
SioxRefinementType refinement,
gint smoothness,
const gdouble sensitivity[3],
gboolean multiblob,
GimpProgress *progress)
{
GeglBuffer *buffer;
gint x1, y1;
gint x2, y2;
g_return_if_fail (GIMP_IS_DRAWABLE (mask));
g_return_if_fail (babl_format_get_bytes_per_pixel (gimp_drawable_get_format (mask)) == 1);
g_return_if_fail (state != NULL);
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (progress)
gimp_progress_start (progress, _("Foreground Extraction"), FALSE);
if (GIMP_IS_CHANNEL (mask))
{
gimp_channel_bounds (GIMP_CHANNEL (mask), &x1, &y1, &x2, &y2);
}
else
{
x1 = 0;
y1 = 0;
x2 = gimp_item_get_width (GIMP_ITEM (mask));
y2 = gimp_item_get_height (GIMP_ITEM (mask));
}
buffer = gimp_drawable_get_buffer (mask);
siox_foreground_extract (state, refinement,
gimp_gegl_buffer_get_tiles (buffer),
x1, y1, x2, y2,
smoothness, sensitivity, multiblob,
(SioxProgressFunc) gimp_progress_set_value,
progress);
if (progress)
gimp_progress_end (progress);
gimp_drawable_update (mask, x1, y1, x2, y2);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:49,代码来源:gimpdrawable-foreground-extract.c
示例10: gimp_progress_set_value
void
gimp_progress_set_value (GimpProgress *progress,
gdouble percentage)
{
GimpProgressInterface *progress_iface;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
percentage = CLAMP (percentage, 0.0, 1.0);
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->set_value)
progress_iface->set_value (progress, percentage);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:15,代码来源:gimpprogress.c
示例11: gimp_progress_set_text
void
gimp_progress_set_text (GimpProgress *progress,
const gchar *message)
{
GimpProgressInterface *progress_iface;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
if (! message || ! strlen (message))
message = _("Please wait");
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->set_text)
progress_iface->set_text (progress, message);
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:16,代码来源:gimpprogress.c
示例12: gimp_image_resize_to_layers
void
gimp_image_resize_to_layers (GimpImage *image,
GimpContext *context,
GimpProgress *progress)
{
GList *list;
GimpItem *item;
gint x, y;
gint width, height;
g_return_if_fail (GIMP_IS_IMAGE (image));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
list = gimp_image_get_layer_iter (image);
if (! list)
return;
/* figure out starting values */
item = list->data;
x = gimp_item_get_offset_x (item);
y = gimp_item_get_offset_y (item);
width = gimp_item_get_width (item);
height = gimp_item_get_height (item);
/* Respect all layers */
for (list = g_list_next (list); list; list = g_list_next (list))
{
item = list->data;
gimp_rectangle_union (x, y,
width, height,
gimp_item_get_offset_x (item),
gimp_item_get_offset_y (item),
gimp_item_get_width (item),
gimp_item_get_height (item),
&x, &y,
&width, &height);
}
gimp_image_resize (image, context,
width, height, -x, -y,
progress);
}
开发者ID:K-Sonoda,项目名称:gimp,代码行数:46,代码来源:gimpimage-resize.c
示例13: gimp_plug_in_progress_detach
gint
gimp_plug_in_progress_detach (GimpProgress *progress)
{
gint attach_count;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), 0);
attach_count =
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (progress),
"plug-in-progress-attach-count"));
attach_count--;
g_object_set_data (G_OBJECT (progress), "plug-in-progress-attach-count",
GINT_TO_POINTER (attach_count));
return attach_count;
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:18,代码来源:gimpplugin-progress.c
示例14: gimp_progress_set_text
void
gimp_progress_set_text (GimpProgress *progress,
const gchar *format,
...)
{
va_list args;
gchar *message;
g_return_if_fail (GIMP_IS_PROGRESS (progress));
g_return_if_fail (format != NULL);
va_start (args, format);
message = g_strdup_vprintf (format, args);
va_end (args);
gimp_progress_set_text_literal (progress, message);
g_free (message);
}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:19,代码来源:gimpprogress.c
示例15: gimp_progress_start
GimpProgress *
gimp_progress_start (GimpProgress *progress,
const gchar *message,
gboolean cancelable)
{
GimpProgressInterface *progress_iface;
g_return_val_if_fail (GIMP_IS_PROGRESS (progress), NULL);
if (! message)
message = _("Please wait");
progress_iface = GIMP_PROGRESS_GET_INTERFACE (progress);
if (progress_iface->start)
return progress_iface->start (progress, message, cancelable);
return NULL;
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:19,代码来源:gimpprogress.c
示例16: gimp_item_scale_by_origin
/**
* gimp_item_scale_by_origin:
* @item: The item to be transformed by width & height scale factors
* @new_width: The width that item will acquire
* @new_height: The height that the item will acquire
* @interpolation:
* @progress:
* @local_origin: sets fixed point of the scaling transform. See below.
*
* Sets item dimensions to new_width and
* new_height. Derives vertical and horizontal scaling
* transforms from new width and height. If local_origin is
* #TRUE, the fixed point of the scaling transform coincides
* with the item's center point. Otherwise, the fixed
* point is taken to be [-item->offset_x, -item->offset_y].
*
* Since this function derives scale factors from new and
* current item dimensions, these factors will vary from
* item to item because of aliasing artifacts; factor
* variations among items can be quite large where item
* dimensions approach pixel dimensions. Use
* gimp_item_scale_by_factors() where constant scales are to
* be uniformly applied to a number of items.
*
* Side effects: undo set created for item.
* Old item imagery scaled
* & painted to new item tiles
**/
void
gimp_item_scale_by_origin (GimpItem *item,
gint new_width,
gint new_height,
GimpInterpolationType interpolation,
GimpProgress *progress,
gboolean local_origin)
{
gint new_offset_x, new_offset_y;
g_return_if_fail (GIMP_IS_ITEM (item));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (new_width == 0 || new_height == 0)
{
g_warning ("%s: requested width or height equals zero", G_STRFUNC);
return;
}
if (local_origin)
{
new_offset_x = (item->offset_x +
((gimp_item_width (item) - new_width) / 2.0));
new_offset_y = (item->offset_y +
((gimp_item_height (item) - new_height) / 2.0));
}
else
{
new_offset_x = (gint) (((gdouble) new_width *
(gdouble) item->offset_x /
(gdouble) gimp_item_width (item)));
new_offset_y = (gint) (((gdouble) new_height *
(gdouble) item->offset_y /
(gdouble) gimp_item_height (item)));
}
gimp_item_scale (item,
new_width, new_height,
new_offset_x, new_offset_y,
interpolation, progress);
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:70,代码来源:gimpitem.c
示例17: gimp_gegl_apply_invert_linear
void
gimp_gegl_apply_invert_linear (GeglBuffer *src_buffer,
GimpProgress *progress,
const gchar *undo_desc,
GeglBuffer *dest_buffer)
{
GeglNode *node;
g_return_if_fail (GEGL_IS_BUFFER (src_buffer));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (GEGL_IS_BUFFER (dest_buffer));
node = gegl_node_new_child (NULL,
"operation", "gegl:invert-linear",
NULL);
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, NULL);
g_object_unref (node);
}
开发者ID:STRNG,项目名称:gimp,代码行数:20,代码来源:gimp-gegl-apply-operation.c
示例18: gimp_gegl_apply_flatten
void
gimp_gegl_apply_flatten (GeglBuffer *src_buffer,
GimpProgress *progress,
const gchar *undo_desc,
GeglBuffer *dest_buffer,
const GimpRGB *background)
{
GeglNode *node;
g_return_if_fail (GEGL_IS_BUFFER (src_buffer));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (GEGL_IS_BUFFER (dest_buffer));
g_return_if_fail (background != NULL);
node = gimp_gegl_create_flatten_node (background);
gimp_gegl_apply_operation (src_buffer, progress, undo_desc,
node, dest_buffer, NULL);
g_object_unref (node);
}
开发者ID:STRNG,项目名称:gimp,代码行数:20,代码来源:gimp-gegl-apply-operation.c
示例19: gimp_item_stroke
gboolean
gimp_item_stroke (GimpItem *item,
GimpDrawable *drawable,
GimpContext *context,
GimpStrokeDesc *stroke_desc,
gboolean use_default_values,
GimpProgress *progress,
GError **error)
{
GimpItemClass *item_class;
gboolean retval = FALSE;
g_return_val_if_fail (GIMP_IS_ITEM (item), FALSE);
g_return_val_if_fail (gimp_item_is_attached (item), FALSE);
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), FALSE);
g_return_val_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)), FALSE);
g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
g_return_val_if_fail (GIMP_IS_STROKE_DESC (stroke_desc), FALSE);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
item_class = GIMP_ITEM_GET_CLASS (item);
if (item_class->stroke)
{
GimpImage *image = gimp_item_get_image (item);
gimp_stroke_desc_prepare (stroke_desc, context, use_default_values);
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_PAINT,
item_class->stroke_desc);
retval = item_class->stroke (item, drawable, stroke_desc, progress, error);
gimp_image_undo_group_end (image);
gimp_stroke_desc_finish (stroke_desc);
}
return retval;
}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:41,代码来源:gimpitem.c
示例20: gimp_plug_in_proc_frame_push
GimpPlugInProcFrame *
gimp_plug_in_proc_frame_push (GimpPlugIn *plug_in,
GimpContext *context,
GimpProgress *progress,
GimpTemporaryProcedure *procedure)
{
GimpPlugInProcFrame *proc_frame;
g_return_val_if_fail (GIMP_IS_PLUG_IN (plug_in), NULL);
g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
g_return_val_if_fail (GIMP_IS_TEMPORARY_PROCEDURE (procedure), NULL);
proc_frame = gimp_plug_in_proc_frame_new (context, progress,
GIMP_PLUG_IN_PROCEDURE (procedure));
plug_in->temp_proc_frames = g_list_prepend (plug_in->temp_proc_frames,
proc_frame);
return proc_frame;
}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:21,代码来源:gimpplugin.c
注:本文中的GIMP_IS_PROGRESS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论