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

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

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

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

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

示例1: gimp_rectangle_select_tool_control

static voidgimp_rectangle_select_tool_control (GimpTool       *tool,                                    GimpToolAction  action,                                    GimpDisplay    *display){  gimp_rectangle_tool_control (tool, action, display);  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);}
开发者ID:Anstep,项目名称:gimp,代码行数:9,


示例2: gimp_dodge_burn_tool_class_init

static voidgimp_dodge_burn_tool_class_init (GimpDodgeBurnToolClass *klass){  GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);  tool_class->modifier_key  = gimp_dodge_burn_tool_modifier_key;  tool_class->cursor_update = gimp_dodge_burn_tool_cursor_update;  tool_class->oper_update   = gimp_dodge_burn_tool_oper_update;}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:9,


示例3: gimp_threshold_tool_initialize

static gbooleangimp_threshold_tool_initialize (GimpTool     *tool,                                GimpDisplay  *display,                                GError      **error){  GimpThresholdTool *t_tool      = GIMP_THRESHOLD_TOOL (tool);  GimpFilterTool    *filter_tool = GIMP_FILTER_TOOL (tool);  GimpImage         *image       = gimp_display_get_image (display);  GimpDrawable      *drawable    = gimp_image_get_active_drawable (image);  gdouble            low;  gdouble            high;  gint               n_bins;  if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))    {      return FALSE;    }  g_clear_object (&t_tool->histogram_async);  g_object_get (filter_tool->config,                "low",  &low,                "high", &high,                NULL);  /* this is a hack to make sure that   * 'gimp_histogram_n_bins (t_tool->histogram)' returns the correct value for   * 'drawable' before the asynchronous calculation of its histogram is   * finished.   */  {    GeglBuffer *temp;    temp = gegl_buffer_new (GEGL_RECTANGLE (0, 0, 1, 1),                            gimp_drawable_get_format (drawable));    gimp_histogram_calculate (t_tool->histogram,                              temp, GEGL_RECTANGLE (0, 0, 1, 1),                              NULL, NULL);    g_object_unref (temp);  }  n_bins = gimp_histogram_n_bins (t_tool->histogram);  t_tool->histogram_async = gimp_drawable_calculate_histogram_async (    drawable, t_tool->histogram, FALSE);  gimp_histogram_view_set_histogram (t_tool->histogram_box->view,                                     t_tool->histogram);  gimp_histogram_view_set_range (t_tool->histogram_box->view,                                 low  * (n_bins - 0.0001),                                 high * (n_bins - 0.0001));  return TRUE;}
开发者ID:jiapei100,项目名称:gimp,代码行数:56,


示例4: gimp_bucket_fill_tool_class_init

static voidgimp_bucket_fill_tool_class_init (GimpBucketFillToolClass *klass){  GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);  tool_class->initialize     = gimp_bucket_fill_tool_initialize;  tool_class->button_release = gimp_bucket_fill_tool_button_release;  tool_class->modifier_key   = gimp_bucket_fill_tool_modifier_key;  tool_class->cursor_update  = gimp_bucket_fill_tool_cursor_update;}
开发者ID:Amerekanets,项目名称:gimp-1,代码行数:10,


示例5: gimp_crop_tool_cursor_update

static voidgimp_crop_tool_cursor_update (GimpTool         *tool,                              const GimpCoords *coords,                              GdkModifierType   state,                              GimpDisplay      *display){  gimp_rectangle_tool_cursor_update (tool, coords, state, display);  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:10,


示例6: gimp_mybrush_tool_class_init

static voidgimp_mybrush_tool_class_init (GimpMybrushToolClass *klass){  GimpToolClass      *tool_class       = GIMP_TOOL_CLASS (klass);  GimpPaintToolClass *paint_tool_class = GIMP_PAINT_TOOL_CLASS (klass);  tool_class->options_notify    = gimp_mybrush_tool_options_notify;  paint_tool_class->get_outline = gimp_mybrush_tool_get_outline;}
开发者ID:Distrotech,项目名称:gimp,代码行数:10,


示例7: gimp_selection_tool_class_init

static voidgimp_selection_tool_class_init (GimpSelectionToolClass *klass){  GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);  tool_class->modifier_key  = gimp_selection_tool_modifier_key;  tool_class->key_press     = gimp_edit_selection_tool_key_press;  tool_class->oper_update   = gimp_selection_tool_oper_update;  tool_class->cursor_update = gimp_selection_tool_cursor_update;}
开发者ID:DevMaggio,项目名称:gimp,代码行数:10,


示例8: gimp_curves_tool_button_release

static voidgimp_curves_tool_button_release (GimpTool              *tool,                                 const GimpCoords      *coords,                                 guint32                time,                                 GdkModifierType        state,                                 GimpButtonReleaseType  release_type,                                 GimpDisplay           *display){  GimpCurvesTool   *c_tool  = GIMP_CURVES_TOOL (tool);  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);  GimpCurvesConfig *config  = GIMP_CURVES_CONFIG (im_tool->config);  if (state & gimp_get_extend_selection_mask ())    {      GimpCurve *curve = config->curve[config->channel];      gdouble    value = c_tool->picked_color[config->channel];      gint       closest;      closest = gimp_curve_get_closest_point (curve, value);      gimp_curve_view_set_selected (GIMP_CURVE_VIEW (c_tool->graph),                                    closest);      gimp_curve_set_point (curve, closest,                            value, gimp_curve_map_value (curve, value));    }  else if (state & gimp_get_toggle_behavior_mask ())    {      GimpHistogramChannel channel;      for (channel = GIMP_HISTOGRAM_VALUE;           channel <= GIMP_HISTOGRAM_ALPHA;           channel++)        {          GimpCurve *curve = config->curve[channel];          gdouble    value = c_tool->picked_color[channel];          gint       closest;          if (value != -1)            {              closest = gimp_curve_get_closest_point (curve, value);              gimp_curve_view_set_selected (GIMP_CURVE_VIEW (c_tool->graph),                                            closest);              gimp_curve_set_point (curve, closest,                                    value, gimp_curve_map_value (curve, value));            }        }    }  /*  chain up to halt the tool */  GIMP_TOOL_CLASS (parent_class)->button_release (tool, coords, time, state,                                                  release_type, display);}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:55,


示例9: gimp_flip_tool_class_init

static voidgimp_flip_tool_class_init (GimpFlipToolClass *klass){  GimpToolClass          *tool_class  = GIMP_TOOL_CLASS (klass);  GimpTransformToolClass *trans_class = GIMP_TRANSFORM_TOOL_CLASS (klass);  tool_class->modifier_key  = gimp_flip_tool_modifier_key;  tool_class->cursor_update = gimp_flip_tool_cursor_update;  trans_class->transform    = gimp_flip_tool_transform;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:11,


示例10: gimp_sample_point_tool_class_init

static voidgimp_sample_point_tool_class_init (GimpSamplePointToolClass *klass){  GimpToolClass     *tool_class      = GIMP_TOOL_CLASS (klass);  GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);  tool_class->button_release = gimp_sample_point_tool_button_release;  tool_class->motion         = gimp_sample_point_tool_motion;  draw_tool_class->draw      = gimp_sample_point_tool_draw;}
开发者ID:jiapei100,项目名称:gimp,代码行数:11,


示例11: gimp_guide_tool_class_init

static voidgimp_guide_tool_class_init (GimpGuideToolClass *klass){  GimpToolClass     *tool_class      = GIMP_TOOL_CLASS (klass);  GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);  tool_class->button_release = gimp_guide_tool_button_release;  tool_class->motion         = gimp_guide_tool_motion;  draw_tool_class->draw      = gimp_guide_tool_draw;}
开发者ID:jiapei100,项目名称:gimp,代码行数:11,


示例12: gimp_color_tool_cursor_update

static voidgimp_color_tool_cursor_update (GimpTool         *tool,                               const GimpCoords *coords,                               GdkModifierType   state,                               GimpDisplay      *display){  GimpColorTool *color_tool = GIMP_COLOR_TOOL (tool);  GimpImage     *image      = gimp_display_get_image (display);  if (color_tool->enabled)    {      if (color_tool->sample_point)        {          gimp_tool_set_cursor (tool, display,                                GIMP_CURSOR_MOUSE,                                GIMP_TOOL_CURSOR_COLOR_PICKER,                                GIMP_CURSOR_MODIFIER_MOVE);        }      else        {          GimpCursorModifier modifier = GIMP_CURSOR_MODIFIER_BAD;          if (gimp_image_coords_in_active_pickable (image, coords,                                                    color_tool->options->sample_merged,                                                    FALSE))            {              switch (color_tool->pick_mode)                {                case GIMP_COLOR_PICK_MODE_NONE:                  modifier = GIMP_CURSOR_MODIFIER_NONE;                  break;                case GIMP_COLOR_PICK_MODE_FOREGROUND:                  modifier = GIMP_CURSOR_MODIFIER_FOREGROUND;                  break;                case GIMP_COLOR_PICK_MODE_BACKGROUND:                  modifier = GIMP_CURSOR_MODIFIER_BACKGROUND;                  break;                case GIMP_COLOR_PICK_MODE_PALETTE:                  modifier = GIMP_CURSOR_MODIFIER_PLUS;                  break;                }            }          gimp_tool_set_cursor (tool, display,                                GIMP_CURSOR_COLOR_PICKER,                                GIMP_TOOL_CURSOR_COLOR_PICKER,                                modifier);        }      return;  /*  don't chain up  */    }  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:54,


示例13: gimp_rectangle_select_tool_oper_update

static voidgimp_rectangle_select_tool_oper_update (GimpTool         *tool,                                        const GimpCoords *coords,                                        GdkModifierType   state,                                        gboolean          proximity,                                        GimpDisplay      *display){  gimp_rectangle_tool_oper_update (tool, coords, state, proximity, display);  GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,                                               display);}
开发者ID:vidyashree,项目名称:gimp-tito,代码行数:12,


示例14: gimp_rectangle_select_tool_active_modifier_key

static voidgimp_rectangle_select_tool_active_modifier_key (GimpTool        *tool,                                                GdkModifierType  key,                                                gboolean         press,                                                GdkModifierType  state,                                                GimpDisplay     *display){  GIMP_TOOL_CLASS (parent_class)->active_modifier_key (tool, key, press, state,                                                       display);  gimp_rectangle_tool_active_modifier_key (tool, key, press, state, display);}
开发者ID:vidyashree,项目名称:gimp-tito,代码行数:12,


示例15: gimp_eraser_tool_cursor_update

static voidgimp_eraser_tool_cursor_update (GimpTool         *tool,                                const GimpCoords *coords,                                GdkModifierType   state,                                GimpDisplay      *display){  GimpEraserOptions *options = GIMP_ERASER_TOOL_GET_OPTIONS (tool);  gimp_tool_control_set_toggled (tool->control, options->anti_erase);  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:Amerekanets,项目名称:gimp-1,代码行数:12,


示例16: gimp_foreground_select_tool_key_press

static gbooleangimp_foreground_select_tool_key_press (GimpTool    *tool,                                       GdkEventKey *kevent,                                       GimpDisplay *display){  GimpForegroundSelectTool *fg_select = GIMP_FOREGROUND_SELECT_TOOL (tool);  if (display != tool->display)    return FALSE;  if (fg_select->state == MATTING_STATE_PAINT_TRIMAP)    {      switch (kevent->keyval)        {        case GDK_KEY_Return:        case GDK_KEY_KP_Enter:        case GDK_KEY_ISO_Enter:          gimp_foreground_select_tool_response (fg_select->gui, RESPONSE_PREVIEW, fg_select);          return TRUE;        case GDK_KEY_Escape:          gimp_foreground_select_tool_response (fg_select->gui, RESPONSE_RESET, fg_select);          return TRUE;        default:          return FALSE;        }    }  else if (fg_select->state == MATTING_STATE_PREVIEW_MASK)    {      switch (kevent->keyval)        {        case GDK_KEY_Return:        case GDK_KEY_KP_Enter:        case GDK_KEY_ISO_Enter:          gimp_foreground_select_tool_response (fg_select->gui, RESPONSE_APPLY, fg_select);          return TRUE;        case GDK_KEY_Escape:          gimp_foreground_select_tool_response (fg_select->gui, RESPONSE_PREVIEW, fg_select);          return TRUE;        default:          return FALSE;        }    }  else    {      return GIMP_TOOL_CLASS (parent_class)->key_press (tool,                                                        kevent,                                                        display);    }}
开发者ID:ChristianBusch,项目名称:gimp,代码行数:53,


示例17: gimp_convolve_tool_cursor_update

static voidgimp_convolve_tool_cursor_update (GimpTool         *tool,                                  const GimpCoords *coords,                                  GdkModifierType   state,                                  GimpDisplay      *display){  GimpConvolveOptions *options = GIMP_CONVOLVE_TOOL_GET_OPTIONS (tool);  gimp_tool_control_set_toggled (tool->control,                                 (options->type == GIMP_SHARPEN_CONVOLVE));  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:DevMaggio,项目名称:gimp,代码行数:13,


示例18: gimp_mybrush_tool_options_notify

static voidgimp_mybrush_tool_options_notify (GimpTool         *tool,                                  GimpToolOptions  *options,                                  const GParamSpec *pspec){  GIMP_TOOL_CLASS (parent_class)->options_notify (tool, options, pspec);  if (! strcmp (pspec->name, "radius"))    {      gimp_draw_tool_pause (GIMP_DRAW_TOOL (tool));      gimp_draw_tool_resume (GIMP_DRAW_TOOL (tool));    }}
开发者ID:Distrotech,项目名称:gimp,代码行数:13,


示例19: gimp_dodge_burn_tool_cursor_update

static voidgimp_dodge_burn_tool_cursor_update (GimpTool        *tool,                                    GimpCoords      *coords,                                    GdkModifierType  state,                                    GimpDisplay     *display){  GimpDodgeBurnOptions *options = GIMP_DODGE_BURN_TOOL_GET_OPTIONS (tool);  gimp_tool_control_set_toggled (tool->control, (options->type == GIMP_BURN));  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state,                                                 display);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:13,


示例20: gimp_levels_tool_initialize

static gbooleangimp_levels_tool_initialize (GimpTool     *tool,                             GimpDisplay  *display,                             GError      **error){  GimpLevelsTool *l_tool   = GIMP_LEVELS_TOOL (tool);  GimpDrawable   *drawable = gimp_image_get_active_drawable (display->image);  if (! drawable)    return FALSE;  if (gimp_drawable_is_indexed (drawable))    {      g_set_error (error, 0, 0,                   _("Levels does not operate on indexed layers."));      return FALSE;    }  if (! l_tool->hist)    l_tool->hist = gimp_histogram_new ();  levels_init (l_tool->levels);  l_tool->channel = GIMP_HISTOGRAM_VALUE;  l_tool->color   = gimp_drawable_is_rgb (drawable);  l_tool->alpha   = gimp_drawable_has_alpha (drawable);  if (l_tool->active_picker)    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l_tool->active_picker),                                  FALSE);  GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);  gimp_int_combo_box_set_sensitivity (GIMP_INT_COMBO_BOX (l_tool->channel_menu),                                      levels_menu_sensitivity, l_tool, NULL);  gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (l_tool->channel_menu),                                 l_tool->channel);  /* FIXME: hack */  if (! l_tool->color)    l_tool->channel = (l_tool->channel == GIMP_HISTOGRAM_ALPHA) ? 1 : 0;  levels_update (l_tool, ALL);  gimp_drawable_calculate_histogram (drawable, l_tool->hist);  gimp_histogram_view_set_histogram (GIMP_HISTOGRAM_VIEW (l_tool->hist_view),                                     l_tool->hist);  return TRUE;}
开发者ID:Amerekanets,项目名称:gimp,代码行数:51,


示例21: gimp_align_tool_cursor_update

static voidgimp_align_tool_cursor_update (GimpTool        *tool,                               GimpCoords      *coords,                               GdkModifierType  state,                               GimpDisplay     *display){  GimpAlignTool      *align_tool  = GIMP_ALIGN_TOOL (tool);  GimpToolCursorType  tool_cursor = GIMP_TOOL_CURSOR_NONE;  GimpCursorModifier  modifier    = GIMP_CURSOR_MODIFIER_NONE;  if (state & GDK_SHIFT_MASK)    {      /* always add '+' when Shift is pressed, even if nothing is selected */      modifier = GIMP_CURSOR_MODIFIER_PLUS;    }  switch (align_tool->function)    {    case ALIGN_TOOL_IDLE:      tool_cursor = GIMP_TOOL_CURSOR_RECT_SELECT;      break;    case ALIGN_TOOL_PICK_LAYER:    case ALIGN_TOOL_ADD_LAYER:      tool_cursor = GIMP_TOOL_CURSOR_HAND;      break;    case ALIGN_TOOL_PICK_GUIDE:    case ALIGN_TOOL_ADD_GUIDE:      tool_cursor = GIMP_TOOL_CURSOR_MOVE;      break;    case ALIGN_TOOL_PICK_PATH:    case ALIGN_TOOL_ADD_PATH:      tool_cursor = GIMP_TOOL_CURSOR_PATHS;      break;    case ALIGN_TOOL_DRAG_BOX:      /* FIXME: it would be nice to add something here, but we cannot easily         detect when the tool is in this mode (the draw tool is always active)         so this state is not used for the moment.      */      break;    }  gimp_tool_control_set_cursor          (tool->control, GIMP_CURSOR_MOUSE);  gimp_tool_control_set_tool_cursor     (tool->control, tool_cursor);  gimp_tool_control_set_cursor_modifier (tool->control, modifier);  GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, display);}
开发者ID:Amerekanets,项目名称:gimp,代码行数:51,


示例22: gimp_color_tool_button_press

static voidgimp_color_tool_button_press (GimpTool            *tool,                              const GimpCoords    *coords,                              guint32              time,                              GdkModifierType      state,                              GimpButtonPressType  press_type,                              GimpDisplay         *display){  GimpColorTool    *color_tool = GIMP_COLOR_TOOL (tool);  GimpDisplayShell *shell      = gimp_display_get_shell (display);  /*  Chain up to activate the tool  */  GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,                                                press_type, display);  if (! color_tool->enabled)    return;  if (color_tool->sample_point)    {      color_tool->moving_sample_point = TRUE;      gimp_sample_point_get_position (color_tool->sample_point,                                      &color_tool->sample_point_x,                                      &color_tool->sample_point_y);      gimp_tool_control_set_scroll_lock (tool->control, TRUE);      gimp_display_shell_selection_pause (shell);      if (! gimp_draw_tool_is_active (GIMP_DRAW_TOOL (tool)))        gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);      gimp_tool_push_status_coords (tool, display,                                    gimp_tool_control_get_precision (tool->control),                                    _("Move Sample Point: "),                                    color_tool->sample_point_x,                                    ", ",                                    color_tool->sample_point_y,                                    NULL);    }  else    {      color_tool->center_x = coords->x;      color_tool->center_y = coords->y;      gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);      gimp_color_tool_pick (color_tool, GIMP_COLOR_PICK_STATE_START,                            coords->x, coords->y);    }}
开发者ID:SHIVAPRASAD96,项目名称:gimp,代码行数:51,


示例23: gimp_dodge_burn_tool_oper_update

static voidgimp_dodge_burn_tool_oper_update (GimpTool        *tool,                                  GimpCoords      *coords,                                  GdkModifierType  state,                                  gboolean         proximity,                                  GimpDisplay     *display){  GimpDodgeBurnOptions *options = GIMP_DODGE_BURN_TOOL_GET_OPTIONS (tool);  gimp_dodge_burn_tool_status_update (tool, options->type);  GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,                                               display);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:14,


示例24: gimp_desaturate_tool_class_init

static voidgimp_desaturate_tool_class_init (GimpDesaturateToolClass *klass){  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);  tool_class->initialize       = gimp_desaturate_tool_initialize;  im_tool_class->shell_desc    = _("Desaturate (Remove Colors)");  im_tool_class->get_operation = gimp_desaturate_tool_get_operation;  im_tool_class->map           = gimp_desaturate_tool_map;  im_tool_class->dialog        = gimp_desaturate_tool_dialog;}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:14,


示例25: gimp_curves_tool_oper_update

static voidgimp_curves_tool_oper_update (GimpTool         *tool,                              const GimpCoords *coords,                              GdkModifierType   state,                              gboolean          proximity,                              GimpDisplay      *display){  if (gimp_image_map_tool_on_guide (GIMP_IMAGE_MAP_TOOL (tool),                                    coords, display))    {      GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,                                                   display);    }  else    {      GimpColorPickMode  mode;      gchar             *status      = NULL;      GdkModifierType    extend_mask = gimp_get_extend_selection_mask ();      GdkModifierType    toggle_mask = gimp_get_toggle_behavior_mask ();      gimp_tool_pop_status (tool, display);      if (state & extend_mask)        {          mode   = GIMP_COLOR_PICK_MODE_PALETTE;          status = g_strdup (_("Click to add a control point"));        }      else if (state & toggle_mask)        {          mode   = GIMP_COLOR_PICK_MODE_PALETTE;          status = g_strdup (_("Click to add control points to all channels"));        }      else        {          mode   = GIMP_COLOR_PICK_MODE_NONE;          status = gimp_suggest_modifiers (_("Click to locate on curve"),                                           (extend_mask | toggle_mask) & ~state,                                           _("%s: add control point"),                                           _("%s: add control points to all channels"),                                           NULL);        }      GIMP_COLOR_TOOL (tool)->pick_mode = mode;      if (proximity)        gimp_tool_push_status (tool, display, "%s", status);      g_free (status);    }}
开发者ID:AdamGrzonkowski,项目名称:gimp-1,代码行数:50,


示例26: gimp_convolve_tool_oper_update

static voidgimp_convolve_tool_oper_update (GimpTool         *tool,                                const GimpCoords *coords,                                GdkModifierType   state,                                gboolean          proximity,                                GimpDisplay      *display){  GimpConvolveOptions *options = GIMP_CONVOLVE_TOOL_GET_OPTIONS (tool);  gimp_convolve_tool_status_update (tool, options->type);  GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,                                               display);}
开发者ID:DevMaggio,项目名称:gimp,代码行数:14,


示例27: gimp_color_tool_button_press

static voidgimp_color_tool_button_press (GimpTool        *tool,                              GimpCoords      *coords,                              guint32          time,                              GdkModifierType  state,                              GimpDisplay     *display){  GimpColorTool    *color_tool = GIMP_COLOR_TOOL (tool);  GimpDisplayShell *shell      = GIMP_DISPLAY_SHELL (display->shell);  /*  Chain up to activate the tool  */  GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,                                                display);  if (! color_tool->enabled)    return;  if (color_tool->sample_point)    {      color_tool->moving_sample_point = TRUE;      color_tool->sample_point_x      = color_tool->sample_point->x;      color_tool->sample_point_y      = color_tool->sample_point->y;      gimp_display_shell_selection_control (shell, GIMP_SELECTION_PAUSE);      gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);      gimp_tool_push_status_coords (tool, display,                                    _("Move Sample Point: "),                                    color_tool->sample_point_x,                                    ", ",                                    color_tool->sample_point_y,                                    NULL);    }  else    {      gint off_x, off_y;      /*  Keep the coordinates of the target  */      gimp_item_offsets (GIMP_ITEM (tool->drawable), &off_x, &off_y);      color_tool->center_x = coords->x - off_x;      color_tool->center_y = coords->y - off_y;      gimp_draw_tool_start (GIMP_DRAW_TOOL (tool), display);      gimp_color_tool_pick (color_tool, GIMP_COLOR_PICK_STATE_NEW,                            coords->x, coords->y);    }}
开发者ID:Amerekanets,项目名称:gimp,代码行数:50,


示例28: gimp_curves_tool_button_release

static voidgimp_curves_tool_button_release (GimpTool              *tool,                                 GimpCoords            *coords,                                 guint32                time,                                 GdkModifierType        state,                                 GimpButtonReleaseType  release_type,                                 GimpDisplay           *display){  GimpCurvesTool   *c_tool = GIMP_CURVES_TOOL (tool);  GimpCurvesConfig *config = c_tool->config;  if (state & GDK_SHIFT_MASK)    {      GimpCurve *curve = config->curve[config->channel];      gdouble    value = c_tool->picked_color[config->channel];      gint       closest;      closest = gimp_curve_get_closest_point (curve, value);      gimp_curve_view_set_selected (GIMP_CURVE_VIEW (c_tool->graph),                                    closest);      gimp_curve_set_point (curve, closest,                            value, gimp_curve_map_value (curve, value));    }  else if (state & GDK_CONTROL_MASK)    {      gint i;      for (i = 0; i < 5; i++)        {          GimpCurve *curve = config->curve[i];          gdouble    value = c_tool->picked_color[i];          gint       closest;          closest = gimp_curve_get_closest_point (curve, value);          gimp_curve_view_set_selected (GIMP_CURVE_VIEW (c_tool->graph),                                        closest);          gimp_curve_set_point (curve, closest,                                value, gimp_curve_map_value (curve, value));        }    }  /*  chain up to halt the tool */  GIMP_TOOL_CLASS (parent_class)->button_release (tool, coords, time, state,                                                  release_type, display);}
开发者ID:jdburton,项目名称:gimp-osx,代码行数:49,


示例29: gimp_levels_tool_initialize

static gbooleangimp_levels_tool_initialize (GimpTool     *tool,                             GimpDisplay  *display,                             GError      **error){  GimpLevelsTool   *l_tool   = GIMP_LEVELS_TOOL (tool);  GimpImage        *image    = gimp_display_get_image (display);  GimpDrawable     *drawable = gimp_image_get_active_drawable (image);  gdouble           scale_factor;  gint              digits;  if (! GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))    {      return FALSE;    }  gimp_int_combo_box_set_sensitivity (GIMP_INT_COMBO_BOX (l_tool->channel_menu),                                      levels_menu_sensitivity, drawable, NULL);  gimp_drawable_calculate_histogram (drawable, l_tool->histogram);  gimp_histogram_view_set_histogram (GIMP_HISTOGRAM_VIEW (l_tool->histogram_view),                                     l_tool->histogram);  if (gimp_drawable_get_precision (drawable) == GIMP_PRECISION_U8)    {      scale_factor = 255.0;      digits       = 0;    }  else    {      scale_factor = 100.0;      digits       = 1;    }  gimp_prop_widget_set_factor (l_tool->low_input_spinbutton,                               scale_factor, digits);  gimp_prop_widget_set_factor (l_tool->high_input_spinbutton,                               scale_factor, digits);  gimp_prop_widget_set_factor (l_tool->low_output_spinbutton,                               scale_factor, digits);  gimp_prop_widget_set_factor (l_tool->high_output_spinbutton,                               scale_factor, digits);  gtk_adjustment_configure (l_tool->gamma_linear,                            scale_factor / 2.0,                            0, scale_factor, 0.1, 1.0, 0);  return TRUE;}
开发者ID:AjayRamanathan,项目名称:gimp,代码行数:49,



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


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