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

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

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

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

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

示例1: gimp_source_tool_cursor_update

static voidgimp_source_tool_cursor_update (GimpTool         *tool,                                const GimpCoords *coords,                                GdkModifierType   state,                                GimpDisplay      *display){  GimpPaintTool      *paint_tool = GIMP_PAINT_TOOL (tool);  GimpSourceOptions  *options    = GIMP_SOURCE_TOOL_GET_OPTIONS (tool);  GimpCursorType      cursor     = GIMP_CURSOR_MOUSE;  GimpCursorModifier  modifier   = GIMP_CURSOR_MODIFIER_NONE;  if (gimp_source_core_use_source (GIMP_SOURCE_CORE (paint_tool->core),                                   options))    {      GdkModifierType toggle_mask = gimp_get_toggle_behavior_mask ();      if ((state & (toggle_mask | GDK_SHIFT_MASK)) == toggle_mask)        {          cursor = GIMP_CURSOR_CROSSHAIR_SMALL;        }      else if (! GIMP_SOURCE_CORE (GIMP_PAINT_TOOL (tool)->core)->src_drawable)        {          modifier = GIMP_CURSOR_MODIFIER_BAD;        }    }  gimp_tool_control_set_cursor          (tool->control, cursor);  gimp_tool_control_set_cursor_modifier (tool->control, modifier);  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:Distrotech,项目名称:gimp,代码行数:31,


示例2: gimp_source_tool_control

static voidgimp_source_tool_control (GimpTool       *tool,                          GimpToolAction  action,                          GimpDisplay    *display){  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  /*  chain up early so the draw tool can undraw the source marker   *  while we still know about source drawable and display   */  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);  switch (action)    {    case GIMP_TOOL_ACTION_PAUSE:    case GIMP_TOOL_ACTION_RESUME:      break;    case GIMP_TOOL_ACTION_HALT:      source_tool->src_display = NULL;      g_object_set (GIMP_PAINT_TOOL (tool)->core,                    "src-drawable", NULL,                    NULL);      break;    }}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:26,


示例3: gimp_source_tool_modifier_key

static voidgimp_source_tool_modifier_key (GimpTool        *tool,                               GdkModifierType  key,                               gboolean         press,                               GdkModifierType  state,                               GimpDisplay     *display){  GimpSourceTool    *source_tool = GIMP_SOURCE_TOOL (tool);  GimpPaintTool     *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceOptions *options     = GIMP_SOURCE_TOOL_GET_OPTIONS (tool);  if (options->use_source && key == GDK_CONTROL_MASK)    {      gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));      if (press)        {          paint_tool->status = source_tool->status_set_source;          source_tool->show_source_outline = FALSE;        }      else        {          paint_tool->status = source_tool->status_paint;          source_tool->show_source_outline = TRUE;        }      gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));    }  GIMP_TOOL_CLASS (parent_class)->modifier_key (tool, key, press, state,                                                display);}
开发者ID:WilfR,项目名称:Gimp-Matting,代码行数:34,


示例4: gimp_source_tool_control

static voidgimp_source_tool_control (GimpTool       *tool,                          GimpToolAction  action,                          GimpDisplay    *display){  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  switch (action)    {    case GIMP_TOOL_ACTION_PAUSE:    case GIMP_TOOL_ACTION_RESUME:      break;    case GIMP_TOOL_ACTION_HALT:      gimp_source_tool_set_src_display (source_tool, NULL);      g_object_set (GIMP_PAINT_TOOL (tool)->core,                    "src-drawable", NULL,                    NULL);      break;    case GIMP_TOOL_ACTION_COMMIT:      break;    }  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);}
开发者ID:Distrotech,项目名称:gimp,代码行数:26,


示例5: gimp_source_tool_button_press

static voidgimp_source_tool_button_press (GimpTool            *tool,                               const GimpCoords    *coords,                               guint32              time,                               GdkModifierType      state,                               GimpButtonPressType  press_type,                               GimpDisplay         *display){  GimpPaintTool  *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  GimpSourceCore *source      = GIMP_SOURCE_CORE (paint_tool->core);  GdkModifierType toggle_mask = gimp_get_toggle_behavior_mask ();  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  if ((state & (toggle_mask | GDK_SHIFT_MASK)) == toggle_mask)    {      source->set_source = TRUE;      gimp_source_tool_set_src_display (source_tool, display);    }  else    {      source->set_source = FALSE;    }  GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,                                                press_type, display);  source_tool->src_x = source->src_x;  source_tool->src_y = source->src_y;  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:Distrotech,项目名称:gimp,代码行数:34,


示例6: gimp_source_tool_cursor_update

static voidgimp_source_tool_cursor_update (GimpTool        *tool,                                GimpCoords      *coords,                                GdkModifierType  state,                                GimpDisplay     *display){  GimpSourceOptions  *options  = GIMP_SOURCE_TOOL_GET_OPTIONS (tool);  GimpCursorType      cursor   = GIMP_CURSOR_MOUSE;  GimpCursorModifier  modifier = GIMP_CURSOR_MODIFIER_NONE;  if (options->use_source)    {      if ((state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == GDK_CONTROL_MASK)        {          cursor = GIMP_CURSOR_CROSSHAIR_SMALL;        }      else if (! GIMP_SOURCE_CORE (GIMP_PAINT_TOOL (tool)->core)->src_drawable)        {          modifier = GIMP_CURSOR_MODIFIER_BAD;        }    }  gimp_tool_control_set_cursor          (tool->control, cursor);  gimp_tool_control_set_cursor_modifier (tool->control, modifier);  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:27,


示例7: gimp_source_tool_button_press

static voidgimp_source_tool_button_press (GimpTool        *tool,                               GimpCoords      *coords,                               guint32          time,                               GdkModifierType  state,                               GimpDisplay     *display){  GimpPaintTool  *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  GimpSourceCore *source      = GIMP_SOURCE_CORE (paint_tool->core);  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  if ((state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) == GDK_CONTROL_MASK)    {      source->set_source = TRUE;      source_tool->src_display = display;    }  else    {      source->set_source = FALSE;    }  GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,                                                display);  source_tool->src_x = source->src_x;  source_tool->src_y = source->src_y;  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:32,


示例8: gimp_airbrush_tool_stamp

static voidgimp_airbrush_tool_stamp (GimpAirbrushTool *airbrush_tool,                          gpointer          data){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (airbrush_tool);  gimp_airbrush_stamp (GIMP_AIRBRUSH (paint_tool->core));}
开发者ID:jiapei100,项目名称:gimp,代码行数:8,


示例9: gimp_paint_tool_cursor_update

static voidgimp_paint_tool_cursor_update (GimpTool         *tool,                               const GimpCoords *coords,                               GdkModifierType   state,                               GimpDisplay      *display){  GimpPaintTool      *paint_tool = GIMP_PAINT_TOOL (tool);  GimpCursorModifier  modifier;  GimpCursorModifier  toggle_modifier;  GimpCursorModifier  old_modifier;  GimpCursorModifier  old_toggle_modifier;  modifier        = tool->control->cursor_modifier;  toggle_modifier = tool->control->toggle_cursor_modifier;  old_modifier        = modifier;  old_toggle_modifier = toggle_modifier;  if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))    {      GimpImage    *image    = gimp_display_get_image (display);      GimpDrawable *drawable = gimp_image_get_active_drawable (image);      if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)) ||          gimp_item_is_content_locked (GIMP_ITEM (drawable))    ||          ! gimp_item_is_visible (GIMP_ITEM (drawable)))        {          modifier        = GIMP_CURSOR_MODIFIER_BAD;          toggle_modifier = GIMP_CURSOR_MODIFIER_BAD;        }      if (! paint_tool->show_cursor &&          modifier != GIMP_CURSOR_MODIFIER_BAD)        {          gimp_tool_set_cursor (tool, display,                                GIMP_CURSOR_NONE,                                GIMP_TOOL_CURSOR_NONE,                                GIMP_CURSOR_MODIFIER_NONE);          return;        }      gimp_tool_control_set_cursor_modifier        (tool->control,                                                    modifier);      gimp_tool_control_set_toggle_cursor_modifier (tool->control,                                                    toggle_modifier);    }  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state,                                                 display);  /*  reset old stuff here so we are not interferring with the modifiers   *  set by our subclasses   */  gimp_tool_control_set_cursor_modifier        (tool->control,                                                old_modifier);  gimp_tool_control_set_toggle_cursor_modifier (tool->control,                                                old_toggle_modifier);}
开发者ID:LebedevRI,项目名称:gimp,代码行数:58,


示例10: gimp_paint_tool_modifier_key

static voidgimp_paint_tool_modifier_key (GimpTool        *tool,                              GdkModifierType  key,                              gboolean         press,                              GdkModifierType  state,                              GimpDisplay     *display){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);  GimpDrawTool  *draw_tool  = GIMP_DRAW_TOOL (tool);  if (paint_tool->pick_colors && ! paint_tool->draw_line)    {      if ((state & gimp_get_all_modifiers_mask ()) ==          gimp_get_constrain_behavior_mask ())        {          if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))            {              GimpToolInfo *info = gimp_get_tool_info (display->gimp,                                                       "gimp-color-picker-tool");              if (GIMP_IS_TOOL_INFO (info))                {                  if (gimp_draw_tool_is_active (draw_tool))                    gimp_draw_tool_stop (draw_tool);                  gimp_color_tool_enable (GIMP_COLOR_TOOL (tool),                                          GIMP_COLOR_OPTIONS (info->tool_options));                  switch (GIMP_COLOR_TOOL (tool)->pick_mode)                    {                    case GIMP_COLOR_PICK_MODE_FOREGROUND:                      gimp_tool_push_status (tool, display,                                             _("Click in any image to pick the "                                               "foreground color"));                      break;                    case GIMP_COLOR_PICK_MODE_BACKGROUND:                      gimp_tool_push_status (tool, display,                                             _("Click in any image to pick the "                                               "background color"));                      break;                    default:                      break;                    }                }            }        }      else        {          if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))            {              gimp_tool_pop_status (tool, display);              gimp_color_tool_disable (GIMP_COLOR_TOOL (tool));            }        }    }}
开发者ID:LebedevRI,项目名称:gimp,代码行数:58,


示例11: gimp_perspective_clone_tool_options_notify

static voidgimp_perspective_clone_tool_options_notify (GimpTool         *tool,                                            GimpToolOptions  *options,                                            const GParamSpec *pspec){  GimpPerspectiveCloneTool    *clone_tool = GIMP_PERSPECTIVE_CLONE_TOOL (tool);  GimpPaintTool               *paint_tool = GIMP_PAINT_TOOL (tool);  GimpPerspectiveCloneOptions *clone_options;  clone_options = GIMP_PERSPECTIVE_CLONE_OPTIONS (options);  GIMP_TOOL_CLASS (parent_class)->options_notify (tool, options, pspec);  if (! strcmp (pspec->name, "clone-mode"))    {      GimpPerspectiveClone *clone;      clone = GIMP_PERSPECTIVE_CLONE (GIMP_PAINT_TOOL (tool)->core);      gimp_draw_tool_pause (GIMP_DRAW_TOOL (clone_tool));      if (clone_options->clone_mode == GIMP_PERSPECTIVE_CLONE_MODE_PAINT)        {          gimp_perspective_clone_set_transform (clone, &clone_tool->transform);          gimp_paint_tool_set_active (paint_tool, TRUE);        }      else        {          gimp_paint_tool_set_active (paint_tool, FALSE);          gimp_tool_control_set_precision (tool->control,                                           GIMP_CURSOR_PRECISION_SUBPIXEL);          /*  start drawing the bounding box and handles...  */          if (tool->display &&              ! gimp_draw_tool_is_active (GIMP_DRAW_TOOL (clone_tool)))            {              gimp_draw_tool_start (GIMP_DRAW_TOOL (clone_tool), tool->display);            }        }      gimp_draw_tool_resume (GIMP_DRAW_TOOL (clone_tool));    }}
开发者ID:jiapei100,项目名称:gimp,代码行数:45,


示例12: gimp_airbrush_tool_init

static voidgimp_airbrush_tool_init (GimpAirbrushTool *airbrush){  GimpTool *tool = GIMP_TOOL (airbrush);  gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_AIRBRUSH);  gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (airbrush),                                       GIMP_COLOR_PICK_MODE_FOREGROUND);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:10,


示例13: gimp_airbrush_tool_airbrush_stamp

static voidgimp_airbrush_tool_airbrush_stamp (GimpAirbrush     *airbrush,                                   GimpAirbrushTool *airbrush_tool){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (airbrush_tool);  gimp_paint_tool_paint_push (    paint_tool,    (GimpPaintToolPaintFunc) gimp_airbrush_tool_stamp,    NULL);}
开发者ID:jiapei100,项目名称:gimp,代码行数:11,


示例14: gimp_brush_tool_brush_changed

static voidgimp_brush_tool_brush_changed (GimpContext   *context,                               GimpBrush     *brush,                               GimpBrushTool *brush_tool){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (brush_tool);  GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);  gimp_brush_core_set_brush (brush_core, brush);}
开发者ID:alfanak,项目名称:gimp,代码行数:11,


示例15: gimp_airbrush_tool_constructed

static voidgimp_airbrush_tool_constructed (GObject *object){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (object);  G_OBJECT_CLASS (parent_class)->constructed (object);  g_signal_connect_object (paint_tool->core, "stamp",                           G_CALLBACK (gimp_airbrush_tool_airbrush_stamp),                           object, 0);}
开发者ID:jiapei100,项目名称:gimp,代码行数:11,


示例16: gimp_perspective_clone_tool_constructed

static voidgimp_perspective_clone_tool_constructed (GObject *object){  GimpPerspectiveCloneOptions *options;  options = GIMP_PERSPECTIVE_CLONE_TOOL_GET_OPTIONS (object);  G_OBJECT_CLASS (parent_class)->constructed (object);  if (options->clone_mode == GIMP_PERSPECTIVE_CLONE_MODE_ADJUST)    gimp_paint_tool_set_active (GIMP_PAINT_TOOL (object), FALSE);}
开发者ID:jiapei100,项目名称:gimp,代码行数:12,


示例17: gimp_mybrush_tool_init

static voidgimp_mybrush_tool_init (GimpMybrushTool *mybrush_tool){  GimpTool *tool = GIMP_TOOL (mybrush_tool);  gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_INK);  gimp_tool_control_set_action_size (tool->control,                                     "tools/tools-mybrush-radius-set");  gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (mybrush_tool),                                       GIMP_COLOR_PICK_MODE_FOREGROUND);}
开发者ID:Distrotech,项目名称:gimp,代码行数:12,


示例18: gimp_smudge_tool_init

static voidgimp_smudge_tool_init (GimpSmudgeTool *smudge){  GimpTool      *tool       = GIMP_TOOL (smudge);  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (smudge);  gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_SMUDGE);  paint_tool->status      = _("Click to smudge");  paint_tool->status_line = _("Click to smudge the line");  paint_tool->status_ctrl = NULL;}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:12,


示例19: gimp_paint_tool_finalize

static voidgimp_paint_tool_finalize (GObject *object){  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (object);  if (paint_tool->core)    {      g_object_unref (paint_tool->core);      paint_tool->core = NULL;    }  G_OBJECT_CLASS (parent_class)->finalize (object);}
开发者ID:LebedevRI,项目名称:gimp,代码行数:13,


示例20: gimp_ink_tool_init

static voidgimp_ink_tool_init (GimpInkTool *ink_tool){  GimpTool *tool = GIMP_TOOL (ink_tool);  gimp_tool_control_set_tool_cursor    (tool->control, GIMP_TOOL_CURSOR_INK);  gimp_tool_control_set_action_value_2 (tool->control,                                        "tools/tools-ink-blob-size-set");  gimp_tool_control_set_action_value_3 (tool->control,                                        "tools/tools-ink-blob-aspect-set");  gimp_tool_control_set_action_value_4 (tool->control,                                        "tools/tools-ink-blob-angle-set");  gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (ink_tool),                                       GIMP_COLOR_PICK_MODE_FOREGROUND);}
开发者ID:Amerekanets,项目名称:gimp-1,代码行数:16,


示例21: gimp_heal_tool_init

static voidgimp_heal_tool_init (GimpHealTool *heal){  GimpTool       *tool        = GIMP_TOOL (heal);  GimpPaintTool  *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_HEAL);  paint_tool->status      = _("Click to heal");  paint_tool->status_ctrl = _("%s to set a new heal source");  source_tool->status_paint           = _("Click to heal");  source_tool->status_set_source      = _("Click to set a new heal source");  source_tool->status_set_source_ctrl = _("%s to set a new heal source");}
开发者ID:Amerekanets,项目名称:gimp,代码行数:16,


示例22: gimp_perspective_clone_tool_halt

static voidgimp_perspective_clone_tool_halt (GimpPerspectiveCloneTool *clone_tool){  GimpTool *tool = GIMP_TOOL (clone_tool);  clone_tool->src_display = NULL;  g_object_set (GIMP_PAINT_TOOL (tool)->core,                "src-drawable", NULL,                NULL);  if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))    gimp_draw_tool_stop (GIMP_DRAW_TOOL (tool));  tool->display  = NULL;  tool->drawable = NULL;}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:17,


示例23: gimp_paint_tool_motion

static voidgimp_paint_tool_motion (GimpTool         *tool,                        const GimpCoords *coords,                        guint32           time,                        GdkModifierType   state,                        GimpDisplay      *display){  GimpPaintTool    *paint_tool    = GIMP_PAINT_TOOL (tool);  GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);  GimpPaintCore    *core          = paint_tool->core;  GimpImage        *image         = gimp_display_get_image (display);  GimpDrawable     *drawable      = gimp_image_get_active_drawable (image);  GimpCoords        curr_coords;  gint              off_x, off_y;  GIMP_TOOL_CLASS (parent_class)->motion (tool, coords, time, state, display);  if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))    return;  curr_coords = *coords;  gimp_paint_core_smooth_coords (core, paint_options, &curr_coords);  gimp_item_get_offset (GIMP_ITEM (drawable), &off_x, &off_y);  curr_coords.x -= off_x;  curr_coords.y -= off_y;  /*  don't paint while the Shift key is pressed for line drawing  */  if (paint_tool->draw_line)    {      gimp_paint_core_set_current_coords (core, &curr_coords);      return;    }  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  gimp_paint_core_interpolate (core, drawable, paint_options,                               &curr_coords, time);  gimp_projection_flush_now (gimp_image_get_projection (image));  gimp_display_flush_now (display);  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:LebedevRI,项目名称:gimp,代码行数:46,


示例24: gimp_paint_tool_button_release

static voidgimp_paint_tool_button_release (GimpTool              *tool,                                const GimpCoords      *coords,                                guint32                time,                                GdkModifierType        state,                                GimpButtonReleaseType  release_type,                                GimpDisplay           *display){  GimpPaintTool    *paint_tool    = GIMP_PAINT_TOOL (tool);  GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);  GimpPaintCore    *core          = paint_tool->core;  GimpDisplayShell *shell         = gimp_display_get_shell (display);  GimpImage        *image         = gimp_display_get_image (display);  GimpDrawable     *drawable      = gimp_image_get_active_drawable (image);  if (gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)))    {      GIMP_TOOL_CLASS (parent_class)->button_release (tool, coords, time,                                                      state, release_type,                                                      display);      return;    }  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  /*  Let the specific painting function finish up  */  gimp_paint_core_paint (core, drawable, paint_options,                         GIMP_PAINT_STATE_FINISH, time);  /*  resume the current selection  */  gimp_display_shell_selection_resume (shell);  /*  chain up to halt the tool */  GIMP_TOOL_CLASS (parent_class)->button_release (tool, coords, time, state,                                                  release_type, display);  if (release_type == GIMP_BUTTON_RELEASE_CANCEL)    gimp_paint_core_cancel (core, drawable);  else    gimp_paint_core_finish (core, drawable, TRUE);  gimp_image_flush (image);  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:LebedevRI,项目名称:gimp,代码行数:45,


示例25: gimp_brush_tool_constructed

static voidgimp_brush_tool_constructed (GObject *object){  GimpTool      *tool       = GIMP_TOOL (object);  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (object);  G_OBJECT_CLASS (parent_class)->constructed (object);  g_assert (GIMP_IS_BRUSH_CORE (paint_tool->core));  g_signal_connect_object (gimp_tool_get_options (tool), "brush-changed",                           G_CALLBACK (gimp_brush_tool_brush_changed),                           paint_tool, 0);  g_signal_connect_object (paint_tool->core, "set-brush",                           G_CALLBACK (gimp_brush_tool_set_brush),                           paint_tool, 0);}
开发者ID:alfanak,项目名称:gimp,代码行数:18,


示例26: gimp_brush_tool_options_notify

static voidgimp_brush_tool_options_notify (GimpTool         *tool,                                GimpToolOptions  *options,                                const GParamSpec *pspec){  GIMP_TOOL_CLASS (parent_class)->options_notify (tool, options, pspec);  if (! strcmp (pspec->name, "brush-size")  ||      ! strcmp (pspec->name, "brush-angle") ||      ! strcmp (pspec->name, "brush-aspect-ratio"))    {      GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);      GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);      g_signal_emit_by_name (brush_core, "set-brush",                             brush_core->main_brush);    }}
开发者ID:alfanak,项目名称:gimp,代码行数:18,


示例27: gimp_eraser_tool_init

static voidgimp_eraser_tool_init (GimpEraserTool *eraser){  GimpTool      *tool       = GIMP_TOOL (eraser);  GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (eraser);  gimp_tool_control_set_tool_cursor            (tool->control,                                                GIMP_TOOL_CURSOR_ERASER);  gimp_tool_control_set_toggle_cursor_modifier (tool->control,                                                GIMP_CURSOR_MODIFIER_MINUS);  gimp_paint_tool_enable_color_picker (paint_tool,                                       GIMP_COLOR_PICK_MODE_BACKGROUND);  paint_tool->status      = _("Click to erase");  paint_tool->status_line = _("Click to erase the line");  paint_tool->status_ctrl = _("%s to pick a background color");}
开发者ID:Amerekanets,项目名称:gimp-1,代码行数:18,


示例28: gimp_clone_tool_init

static voidgimp_clone_tool_init (GimpCloneTool *clone){  GimpTool       *tool        = GIMP_TOOL (clone);  GimpPaintTool  *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  gimp_tool_control_set_tool_cursor     (tool->control,                                         GIMP_TOOL_CURSOR_CLONE);  gimp_tool_control_set_action_object_2 (tool->control,                                         "context/context-pattern-select-set");  paint_tool->status      = _("Click to clone");  paint_tool->status_ctrl = _("%s to set a new clone source");  source_tool->status_paint           = _("Click to clone");  source_tool->status_set_source      = _("Click to set a new clone source");  source_tool->status_set_source_ctrl = _("%s to set a new clone source");}
开发者ID:MichaelMure,项目名称:Gimp-Cage-Tool,代码行数:19,


示例29: gimp_source_tool_motion

static voidgimp_source_tool_motion (GimpTool         *tool,                         const GimpCoords *coords,                         guint32           time,                         GdkModifierType   state,                         GimpDisplay      *display){  GimpSourceTool *source_tool = GIMP_SOURCE_TOOL (tool);  GimpPaintTool  *paint_tool  = GIMP_PAINT_TOOL (tool);  GimpSourceCore *source      = GIMP_SOURCE_CORE (paint_tool->core);  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  GIMP_TOOL_CLASS (parent_class)->motion (tool, coords, time, state, display);  source_tool->src_x = source->src_x;  source_tool->src_y = source->src_y;  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:Distrotech,项目名称:gimp,代码行数:20,


示例30: gimp_brush_tool_oper_update

static voidgimp_brush_tool_oper_update (GimpTool         *tool,                             const GimpCoords *coords,                             GdkModifierType   state,                             gboolean          proximity,                             GimpDisplay      *display){  GimpPaintOptions *paint_options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);  GimpDrawable     *drawable;  gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));  GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state,                                               proximity, display);  drawable = gimp_image_get_active_drawable (gimp_display_get_image (display));  if (! gimp_color_tool_is_enabled (GIMP_COLOR_TOOL (tool)) &&      drawable && proximity)    {      GimpContext   *context    = GIMP_CONTEXT (paint_options);      GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (tool);      GimpBrushCore *brush_core = GIMP_BRUSH_CORE (paint_tool->core);      gimp_brush_core_set_brush (brush_core,                                 gimp_context_get_brush (context));      gimp_brush_core_set_dynamics (brush_core,                                    gimp_context_get_dynamics (context));      if (GIMP_BRUSH_CORE_GET_CLASS (brush_core)->handles_transforming_brush)        {          gimp_brush_core_eval_transform_dynamics (brush_core,                                                   drawable,                                                   paint_options,                                                   coords);        }    }  gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));}
开发者ID:alfanak,项目名称:gimp,代码行数:41,



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


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