Beispiel #1
0
static void
gimp_color_tool_pick (GimpColorTool      *tool,
                      GimpColorPickState  pick_state,
                      gint                x,
                      gint                y)
{
  GimpColorToolClass *klass;
  const Babl         *sample_format;
  GimpRGB             color;
  gint                color_index;

  klass = GIMP_COLOR_TOOL_GET_CLASS (tool);

  if (klass->pick &&
      klass->pick (tool, x, y, &sample_format, &color, &color_index))
    {
      g_signal_emit (tool, gimp_color_tool_signals[PICKED], 0,
                     pick_state, sample_format, &color, color_index);
    }
}
Beispiel #2
0
static void
gimp_color_tool_pick (GimpColorTool      *tool,
                      GimpColorPickState  pick_state,
                      gint                x,
                      gint                y)
{
  GimpColorToolClass *klass;
  const Babl         *sample_format;
  guchar              pixel[32];
  GimpRGB             color;

  klass = GIMP_COLOR_TOOL_GET_CLASS (tool);

  if (klass->pick &&
      klass->pick (tool, x, y, &sample_format, pixel, &color))
    {
      g_signal_emit (tool, gimp_color_tool_signals[PICKED], 0,
                     pick_state,
                     (gdouble) x, (gdouble) y,
                     sample_format, pixel, &color);
    }
}