static void
gimp_display_shell_guide_add_handler (GimpImage        *image,
                                      GimpGuide        *guide,
                                      GimpDisplayShell *shell)
{
  GimpCanvasProxyGroup *group = GIMP_CANVAS_PROXY_GROUP (shell->guides);
  GimpCanvasItem       *item;
  GimpGuideStyle        style;

  style = gimp_guide_get_style (guide);
  item = gimp_canvas_guide_new (shell,
                                gimp_guide_get_orientation (guide),
                                gimp_guide_get_position (guide),
                                style);

  gimp_canvas_proxy_group_add_item (group, guide, item);
  g_object_unref (item);
}
Пример #2
0
static void
gimp_flip_tool_draw (GimpDrawTool *draw_tool)
{
  GimpFlipTool *flip = GIMP_FLIP_TOOL (draw_tool);

  if (flip->guide)
    {
      GimpCanvasItem *item;
      GimpGuideStyle  style;

      style = gimp_guide_get_style (flip->guide);

      item = gimp_draw_tool_add_guide (draw_tool,
                                       gimp_guide_get_orientation (flip->guide),
                                       gimp_guide_get_position (flip->guide),
                                       style);
      gimp_canvas_item_set_highlight (item, TRUE);
    }
}