• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GIMP_UNDO_CLASS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: gimp_vectors_mod_undo_pop

static void
gimp_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,代码来源:gimpvectorsmodundo.c


示例2: gimp_item_prop_undo_free

static void
gimp_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,代码来源:gimpitempropundo.c


示例3: gimp_drawable_mod_undo_pop

static void
gimp_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,代码来源:gimpdrawablemodundo.c


示例4: gimp_layer_mask_undo_pop

static void
gimp_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,代码来源:gimplayermaskundo.c


示例5: gimp_foreground_select_tool_undo_pop

static void
gimp_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,代码来源:gimpforegroundselecttoolundo.c


示例6: gimp_drawable_undo_class_init

static void
gimp_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,代码来源:gimpdrawableundo.c


示例7: gimp_layer_prop_undo_pop

static void
gimp_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,代码来源:gimplayerpropundo.c


示例8: gimp_group_layer_undo_pop

static void
gimp_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,代码来源:gimpgrouplayerundo.c


示例9: gimp_sample_point_undo_class_init

static void
gimp_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,代码来源:gimpsamplepointundo.c


示例10: gimp_floating_sel_undo_class_init

static void
gimp_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,代码来源:gimpfloatingselundo.c


示例11: gimp_layer_prop_undo_class_init

static void
gimp_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,代码来源:gimplayerpropundo.c


示例12: gimp_vectors_prop_undo_class_init

static void
gimp_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,代码来源:gimpvectorspropundo.c


示例13: gimp_group_layer_undo_class_init

static void
gimp_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,代码来源:gimpgrouplayerundo.c


示例14: gimp_ink_undo_class_init

static void
gimp_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,代码来源:gimpinkundo.c


示例15: gimp_sample_point_undo_pop

static void
gimp_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,代码来源:gimpsamplepointundo.c


示例16: gimp_mask_undo_free

static void
gimp_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,代码来源:gimpmaskundo.c


示例17: gimp_drawable_undo_pop

static void
gimp_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,代码来源:gimpdrawableundo.c


示例18: gimp_layer_mask_undo_free

static void
gimp_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,代码来源:gimplayermaskundo.c


示例19: gimp_drawable_mod_undo_free

static void
gimp_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,代码来源:gimpdrawablemodundo.c


示例20: gimp_item_undo_free

static void
gimp_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,代码来源:gimpitemundo.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GIMP_VIEW函数代码示例发布时间:2022-05-30
下一篇:
C++ GIMP_TOOL_CLASS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap