您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GIMP_UNDO_CLASS函数代码示例

51自学网 2021-06-01 20:52:52
  C++
这篇教程C++ GIMP_UNDO_CLASS函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中GIMP_UNDO_CLASS函数的典型用法代码示例。如果您正苦于以下问题:C++ GIMP_UNDO_CLASS函数的具体用法?C++ GIMP_UNDO_CLASS怎么用?C++ GIMP_UNDO_CLASS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了GIMP_UNDO_CLASS函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: gimp_vectors_mod_undo_pop

static voidgimp_vectors_mod_undo_pop (GimpUndo            *undo,                           GimpUndoMode         undo_mode,                           GimpUndoAccumulator *accum){  GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (undo);  GimpVectors        *vectors          = GIMP_VECTORS (GIMP_ITEM_UNDO (undo)->item);  GimpVectors        *temp;  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  temp = vectors_mod_undo->vectors;  vectors_mod_undo->vectors =    GIMP_VECTORS (gimp_item_duplicate (GIMP_ITEM (vectors),                                       G_TYPE_FROM_INSTANCE (vectors),                                       FALSE));  gimp_vectors_freeze (vectors);  gimp_vectors_copy_strokes (temp, vectors);  GIMP_ITEM (vectors)->width    = GIMP_ITEM (temp)->width;  GIMP_ITEM (vectors)->height   = GIMP_ITEM (temp)->height;  GIMP_ITEM (vectors)->offset_x = GIMP_ITEM (temp)->offset_x;  GIMP_ITEM (vectors)->offset_y = GIMP_ITEM (temp)->offset_y;  g_object_unref (temp);  gimp_vectors_thaw (vectors);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:31,


示例2: gimp_item_prop_undo_free

static voidgimp_item_prop_undo_free (GimpUndo     *undo,                          GimpUndoMode  undo_mode){  GimpItemPropUndo *item_prop_undo = GIMP_ITEM_PROP_UNDO (undo);  if (item_prop_undo->name)    {      g_free (item_prop_undo->name);      item_prop_undo->name = NULL;    }  if (item_prop_undo->parasite_name)    {      g_free (item_prop_undo->parasite_name);      item_prop_undo->parasite_name = NULL;    }  if (item_prop_undo->parasite)    {      gimp_parasite_free (item_prop_undo->parasite);      item_prop_undo->parasite = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:LebedevRI,项目名称:gimp,代码行数:26,


示例3: gimp_drawable_mod_undo_pop

static voidgimp_drawable_mod_undo_pop (GimpUndo            *undo,                            GimpUndoMode         undo_mode,                            GimpUndoAccumulator *accum){  GimpDrawableModUndo *drawable_mod_undo = GIMP_DRAWABLE_MOD_UNDO (undo);  GimpDrawable        *drawable          = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);  GeglBuffer          *buffer;  gint                 offset_x;  gint                 offset_y;  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  buffer   = drawable_mod_undo->buffer;  offset_x = drawable_mod_undo->offset_x;  offset_y = drawable_mod_undo->offset_y;  drawable_mod_undo->buffer = g_object_ref (gimp_drawable_get_buffer (drawable));  gimp_item_get_offset (GIMP_ITEM (drawable),                        &drawable_mod_undo->offset_x,                        &drawable_mod_undo->offset_y);  gimp_drawable_set_buffer_full (drawable, FALSE, NULL,                                 buffer, offset_x, offset_y);  g_object_unref (buffer);}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:27,


示例4: gimp_layer_mask_undo_pop

static voidgimp_layer_mask_undo_pop (GimpUndo            *undo,                          GimpUndoMode         undo_mode,                          GimpUndoAccumulator *accum){  GimpLayerMaskUndo *layer_mask_undo = GIMP_LAYER_MASK_UNDO (undo);  GimpLayer         *layer           = GIMP_LAYER (GIMP_ITEM_UNDO (undo)->item);  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  if ((undo_mode       == GIMP_UNDO_MODE_UNDO &&       undo->undo_type == GIMP_UNDO_LAYER_MASK_ADD) ||      (undo_mode       == GIMP_UNDO_MODE_REDO &&       undo->undo_type == GIMP_UNDO_LAYER_MASK_REMOVE))    {      /*  remove layer mask  */      gimp_layer_apply_mask (layer, GIMP_MASK_DISCARD, FALSE);    }  else    {      /*  restore layer mask  */      gimp_layer_add_mask (layer, layer_mask_undo->layer_mask, FALSE, NULL);    }}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:26,


示例5: gimp_foreground_select_tool_undo_pop

static voidgimp_foreground_select_tool_undo_pop (GimpUndo              *undo,                                      GimpUndoMode           undo_mode,                                      GimpUndoAccumulator   *accum){  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);}
开发者ID:jiapei100,项目名称:gimp,代码行数:7,


示例6: gimp_drawable_undo_class_init

static voidgimp_drawable_undo_class_init (GimpDrawableUndoClass *klass){  GObjectClass    *object_class      = G_OBJECT_CLASS (klass);  GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);  GimpUndoClass   *undo_class        = GIMP_UNDO_CLASS (klass);  object_class->constructed      = gimp_drawable_undo_constructed;  object_class->set_property     = gimp_drawable_undo_set_property;  object_class->get_property     = gimp_drawable_undo_get_property;  gimp_object_class->get_memsize = gimp_drawable_undo_get_memsize;  undo_class->pop                = gimp_drawable_undo_pop;  undo_class->free               = gimp_drawable_undo_free;  g_object_class_install_property (object_class, PROP_BUFFER,                                   g_param_spec_object ("buffer", NULL, NULL,                                                        GEGL_TYPE_BUFFER,                                                        GIMP_PARAM_READWRITE |                                                        G_PARAM_CONSTRUCT_ONLY));  g_object_class_install_property (object_class, PROP_X,                                   g_param_spec_int ("x", NULL, NULL,                                                     0, GIMP_MAX_IMAGE_SIZE, 0,                                                     GIMP_PARAM_READWRITE |                                                     G_PARAM_CONSTRUCT_ONLY));  g_object_class_install_property (object_class, PROP_Y,                                   g_param_spec_int ("y", NULL, NULL,                                                     0, GIMP_MAX_IMAGE_SIZE, 0,                                                     GIMP_PARAM_READWRITE |                                                     G_PARAM_CONSTRUCT_ONLY));}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:34,


示例7: gimp_layer_prop_undo_pop

static voidgimp_layer_prop_undo_pop (GimpUndo            *undo,                          GimpUndoMode         undo_mode,                          GimpUndoAccumulator *accum){  GimpLayerPropUndo *layer_prop_undo = GIMP_LAYER_PROP_UNDO (undo);  GimpLayer         *layer           = GIMP_LAYER (GIMP_ITEM_UNDO (undo)->item);  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  switch (undo->undo_type)    {    case GIMP_UNDO_LAYER_REPOSITION:      {        gint position;        position = gimp_image_get_layer_index (undo->image, layer);        gimp_image_position_layer (undo->image, layer,                                   layer_prop_undo->position,                                   FALSE, NULL);        layer_prop_undo->position = position;      }      break;    case GIMP_UNDO_LAYER_MODE:      {        GimpLayerModeEffects mode;        mode = gimp_layer_get_mode (layer);        gimp_layer_set_mode (layer, layer_prop_undo->mode, FALSE);        layer_prop_undo->mode = mode;      }      break;    case GIMP_UNDO_LAYER_OPACITY:      {        gdouble opacity;        opacity = gimp_layer_get_opacity (layer);        gimp_layer_set_opacity (layer, layer_prop_undo->opacity, FALSE);        layer_prop_undo->opacity = opacity;      }      break;    case GIMP_UNDO_LAYER_LOCK_ALPHA:      {        gboolean lock_alpha;        lock_alpha = gimp_layer_get_lock_alpha (layer);        gimp_layer_set_lock_alpha (layer, layer_prop_undo->lock_alpha, FALSE);        layer_prop_undo->lock_alpha = lock_alpha;      }      break;    default:      g_assert_not_reached ();    }}
开发者ID:Amerekanets,项目名称:gimp,代码行数:58,


示例8: gimp_group_layer_undo_pop

static voidgimp_group_layer_undo_pop (GimpUndo            *undo,                           GimpUndoMode         undo_mode,                           GimpUndoAccumulator *accum){    GimpGroupLayerUndo *group_layer_undo = GIMP_GROUP_LAYER_UNDO (undo);    GimpGroupLayer     *group;    group = GIMP_GROUP_LAYER (GIMP_ITEM_UNDO (undo)->item);    GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);    switch (undo->undo_type)    {    case GIMP_UNDO_GROUP_LAYER_SUSPEND:    case GIMP_UNDO_GROUP_LAYER_RESUME:        if ((undo_mode       == GIMP_UNDO_MODE_UNDO &&                undo->undo_type == GIMP_UNDO_GROUP_LAYER_SUSPEND) ||                (undo_mode       == GIMP_UNDO_MODE_REDO &&                 undo->undo_type == GIMP_UNDO_GROUP_LAYER_RESUME))        {            /*  resume group layer auto-resizing  */            gimp_group_layer_resume_resize (group, FALSE);        }        else        {            /*  suspend group layer auto-resizing  */            gimp_group_layer_suspend_resize (group, FALSE);        }        break;    case GIMP_UNDO_GROUP_LAYER_CONVERT:    {        GimpImageBaseType type;        GimpPrecision     precision;        type      = gimp_drawable_get_base_type (GIMP_DRAWABLE (group));        precision = gimp_drawable_get_precision (GIMP_DRAWABLE (group));        gimp_drawable_convert_type (GIMP_DRAWABLE (group),                                    gimp_item_get_image (GIMP_ITEM (group)),                                    group_layer_undo->prev_type,                                    group_layer_undo->prev_precision,                                    0, 0, FALSE,                                    FALSE, NULL);        group_layer_undo->prev_type      = type;        group_layer_undo->prev_precision = precision;    }    break;    default:        g_assert_not_reached ();    }}
开发者ID:davidyang5405,项目名称:gimp,代码行数:57,


示例9: gimp_sample_point_undo_class_init

static voidgimp_sample_point_undo_class_init (GimpSamplePointUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructed = gimp_sample_point_undo_constructed;  undo_class->pop           = gimp_sample_point_undo_pop;}
开发者ID:jiapei100,项目名称:gimp,代码行数:10,


示例10: gimp_floating_sel_undo_class_init

static voidgimp_floating_sel_undo_class_init (GimpFloatingSelUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructed = gimp_floating_sel_undo_constructed;  undo_class->pop           = gimp_floating_sel_undo_pop;}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:10,


示例11: gimp_layer_prop_undo_class_init

static voidgimp_layer_prop_undo_class_init (GimpLayerPropUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructor = gimp_layer_prop_undo_constructor;  undo_class->pop           = gimp_layer_prop_undo_pop;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:10,


示例12: gimp_vectors_prop_undo_class_init

static voidgimp_vectors_prop_undo_class_init (GimpVectorsPropUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructed = gimp_vectors_prop_undo_constructed;  undo_class->pop           = gimp_vectors_prop_undo_pop;}
开发者ID:jiapei100,项目名称:gimp,代码行数:10,


示例13: gimp_group_layer_undo_class_init

static voidgimp_group_layer_undo_class_init (GimpGroupLayerUndoClass *klass){    GObjectClass  *object_class = G_OBJECT_CLASS (klass);    GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);    object_class->constructed   = gimp_group_layer_undo_constructed;    undo_class->pop             = gimp_group_layer_undo_pop;}
开发者ID:davidyang5405,项目名称:gimp,代码行数:10,


示例14: gimp_ink_undo_class_init

static voidgimp_ink_undo_class_init (GimpInkUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructed = gimp_ink_undo_constructed;  undo_class->pop           = gimp_ink_undo_pop;  undo_class->free          = gimp_ink_undo_free;}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:11,


示例15: gimp_sample_point_undo_pop

static voidgimp_sample_point_undo_pop (GimpUndo              *undo,                            GimpUndoMode           undo_mode,                            GimpUndoAccumulator   *accum){  GimpSamplePointUndo *sample_point_undo = GIMP_SAMPLE_POINT_UNDO (undo);  gint                 x;  gint                 y;  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  x = sample_point_undo->sample_point->x;  y = sample_point_undo->sample_point->y;  /*  add and move sample points manually (nor using the   *  gimp_image_sample_point API), because we might be in the middle   *  of an image resizing undo group and the sample point's position   *  might be temporarily out of image.   */  if (x == -1)    {      undo->image->sample_points =        g_list_append (undo->image->sample_points,                       sample_point_undo->sample_point);      sample_point_undo->sample_point->x = sample_point_undo->x;      sample_point_undo->sample_point->y = sample_point_undo->y;      gimp_sample_point_ref (sample_point_undo->sample_point);      gimp_image_sample_point_added (undo->image,                                     sample_point_undo->sample_point);      gimp_image_update_sample_point (undo->image,                                      sample_point_undo->sample_point);    }  else if (sample_point_undo->x == -1)    {      gimp_image_remove_sample_point (undo->image,                                      sample_point_undo->sample_point, FALSE);    }  else    {      gimp_image_update_sample_point (undo->image,                                      sample_point_undo->sample_point);      sample_point_undo->sample_point->x = sample_point_undo->x;      sample_point_undo->sample_point->y = sample_point_undo->y;      gimp_image_update_sample_point (undo->image,                                      sample_point_undo->sample_point);    }  sample_point_undo->x = x;  sample_point_undo->y = y;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:53,


示例16: gimp_mask_undo_free

static voidgimp_mask_undo_free (GimpUndo     *undo,                     GimpUndoMode  undo_mode){  GimpMaskUndo *mask_undo = GIMP_MASK_UNDO (undo);  if (mask_undo->buffer)    {      g_object_unref (mask_undo->buffer);      mask_undo->buffer = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:DevMaggio,项目名称:gimp,代码行数:14,


示例17: gimp_drawable_undo_pop

static voidgimp_drawable_undo_pop (GimpUndo            *undo,                        GimpUndoMode         undo_mode,                        GimpUndoAccumulator *accum){  GimpDrawableUndo *drawable_undo = GIMP_DRAWABLE_UNDO (undo);  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  gimp_drawable_swap_pixels (GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item),                             drawable_undo->buffer,                             drawable_undo->x,                             drawable_undo->y);}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:14,


示例18: gimp_layer_mask_undo_free

static voidgimp_layer_mask_undo_free (GimpUndo     *undo,                           GimpUndoMode  undo_mode){  GimpLayerMaskUndo *layer_mask_undo = GIMP_LAYER_MASK_UNDO (undo);  if (layer_mask_undo->layer_mask)    {      g_object_unref (layer_mask_undo->layer_mask);      layer_mask_undo->layer_mask = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,


示例19: gimp_drawable_mod_undo_free

static voidgimp_drawable_mod_undo_free (GimpUndo     *undo,                             GimpUndoMode  undo_mode){  GimpDrawableModUndo *drawable_mod_undo = GIMP_DRAWABLE_MOD_UNDO (undo);  if (drawable_mod_undo->buffer)    {      g_object_unref (drawable_mod_undo->buffer);      drawable_mod_undo->buffer = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:14,


示例20: gimp_item_undo_free

static voidgimp_item_undo_free (GimpUndo     *undo,                     GimpUndoMode  undo_mode){  GimpItemUndo *item_undo = GIMP_ITEM_UNDO (undo);  if (item_undo->item)    {      g_object_unref (item_undo->item);      item_undo->item = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,


示例21: gimp_vectors_mod_undo_class_init

static voidgimp_vectors_mod_undo_class_init (GimpVectorsModUndoClass *klass){  GObjectClass    *object_class      = G_OBJECT_CLASS (klass);  GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);  GimpUndoClass   *undo_class        = GIMP_UNDO_CLASS (klass);  object_class->constructor      = gimp_vectors_mod_undo_constructor;  gimp_object_class->get_memsize = gimp_vectors_mod_undo_get_memsize;  undo_class->pop                = gimp_vectors_mod_undo_pop;  undo_class->free               = gimp_vectors_mod_undo_free;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:14,


示例22: gimp_sample_point_undo_free

static voidgimp_sample_point_undo_free (GimpUndo     *undo,                             GimpUndoMode  undo_mode){  GimpSamplePointUndo *sample_point_undo = GIMP_SAMPLE_POINT_UNDO (undo);  if (sample_point_undo->sample_point)    {      gimp_sample_point_unref (sample_point_undo->sample_point);      sample_point_undo->sample_point = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:14,


示例23: gimp_ink_undo_free

static voidgimp_ink_undo_free (GimpUndo     *undo,                    GimpUndoMode  undo_mode){  GimpInkUndo *ink_undo = GIMP_INK_UNDO (undo);  if (ink_undo->last_blobs)    {      g_list_free_full (ink_undo->last_blobs, g_free);      ink_undo->last_blobs = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:14,


示例24: gimp_undo_stack_class_init

static voidgimp_undo_stack_class_init (GimpUndoStackClass *klass){  GObjectClass    *object_class      = G_OBJECT_CLASS (klass);  GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);  GimpUndoClass   *undo_class        = GIMP_UNDO_CLASS (klass);  object_class->finalize         = gimp_undo_stack_finalize;  gimp_object_class->get_memsize = gimp_undo_stack_get_memsize;  undo_class->pop                = gimp_undo_stack_pop;  undo_class->free               = gimp_undo_stack_free;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:14,


示例25: gimp_guide_undo_free

static voidgimp_guide_undo_free (GimpUndo     *undo,                      GimpUndoMode  undo_mode){  GimpGuideUndo *guide_undo = GIMP_GUIDE_UNDO (undo);  if (guide_undo->guide)    {      g_object_unref (guide_undo->guide);      guide_undo->guide = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:14,


示例26: gimp_vectors_mod_undo_free

static voidgimp_vectors_mod_undo_free (GimpUndo     *undo,                            GimpUndoMode  undo_mode){  GimpVectorsModUndo *vectors_mod_undo = GIMP_VECTORS_MOD_UNDO (undo);  if (vectors_mod_undo->vectors)    {      g_object_unref (vectors_mod_undo->vectors);      vectors_mod_undo->vectors = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:14,


示例27: gimp_paint_core_undo_free

static voidgimp_paint_core_undo_free (GimpUndo     *undo,                           GimpUndoMode  undo_mode){  GimpPaintCoreUndo *paint_core_undo = GIMP_PAINT_CORE_UNDO (undo);  if (paint_core_undo->paint_core)    {      g_object_remove_weak_pointer (G_OBJECT (paint_core_undo->paint_core),                                    (gpointer) &paint_core_undo->paint_core);      paint_core_undo->paint_core = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:15,


示例28: gimp_foreground_select_tool_undo_free

static voidgimp_foreground_select_tool_undo_free (GimpUndo     *undo,                                       GimpUndoMode  undo_mode){  GimpForegroundSelectToolUndo *fg_select_tool_undo = GIMP_FOREGROUND_SELECT_TOOL_UNDO (undo);  if (fg_select_tool_undo->foreground_select_tool)    {      g_object_remove_weak_pointer (G_OBJECT (fg_select_tool_undo->foreground_select_tool),                                    (gpointer) &fg_select_tool_undo->foreground_select_tool);      fg_select_tool_undo->foreground_select_tool = NULL;    }  GIMP_UNDO_CLASS (parent_class)->free (undo, undo_mode);}
开发者ID:jiapei100,项目名称:gimp,代码行数:15,


示例29: gimp_floating_sel_undo_pop

static voidgimp_floating_sel_undo_pop (GimpUndo            *undo,                            GimpUndoMode         undo_mode,                            GimpUndoAccumulator *accum){  GimpFloatingSelUndo *floating_sel_undo = GIMP_FLOATING_SEL_UNDO (undo);  GimpLayer           *floating_layer    = GIMP_LAYER (GIMP_ITEM_UNDO (undo)->item);  GIMP_UNDO_CLASS (parent_class)->pop (undo, undo_mode, accum);  switch (undo->undo_type)    {    case GIMP_UNDO_FS_TO_LAYER:      if (undo_mode == GIMP_UNDO_MODE_UNDO)        {          /*  Update the preview for the floating sel  */          gimp_viewable_invalidate_preview (GIMP_VIEWABLE (floating_layer));          gimp_layer_set_floating_sel_drawable (floating_layer,                                                floating_sel_undo->drawable);          gimp_image_set_active_layer (undo->image, floating_layer);          gimp_drawable_attach_floating_sel (gimp_layer_get_floating_sel_drawable (floating_layer),                                             floating_layer);        }      else        {          gimp_drawable_detach_floating_sel (gimp_layer_get_floating_sel_drawable (floating_layer));          gimp_layer_set_floating_sel_drawable (floating_layer, NULL);        }      /* When the floating selection is converted to/from a normal       * layer it does something resembling a name change, so emit the       * "name-changed" signal       */      gimp_object_name_changed (GIMP_OBJECT (floating_layer));      gimp_drawable_update (GIMP_DRAWABLE (floating_layer),                            0, 0,                            gimp_item_get_width  (GIMP_ITEM (floating_layer)),                            gimp_item_get_height (GIMP_ITEM (floating_layer)));      break;    default:      g_assert_not_reached ();    }}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:47,


示例30: gimp_item_undo_class_init

static voidgimp_item_undo_class_init (GimpItemUndoClass *klass){  GObjectClass  *object_class = G_OBJECT_CLASS (klass);  GimpUndoClass *undo_class   = GIMP_UNDO_CLASS (klass);  object_class->constructed  = gimp_item_undo_constructed;  object_class->set_property = gimp_item_undo_set_property;  object_class->get_property = gimp_item_undo_get_property;  undo_class->free           = gimp_item_undo_free;  g_object_class_install_property (object_class, PROP_ITEM,                                   g_param_spec_object ("item", NULL, NULL,                                                        GIMP_TYPE_ITEM,                                                        GIMP_PARAM_READWRITE |                                                        G_PARAM_CONSTRUCT_ONLY));}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:18,



注:本文中的GIMP_UNDO_CLASS函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ GIMP_VIEW函数代码示例
C++ GIMP_TOOL_CLASS函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。