GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit ad660a3c authored by Michael Natterer's avatar Michael Natterer 😴

app: add gimp_tool_widget_add_transform_guides()

parent 7082fc8b
......@@ -28,6 +28,7 @@
#include "gimpcanvasgroup.h"
#include "gimpcanvashandle.h"
#include "gimpcanvasline.h"
#include "gimpcanvastransformguides.h"
#include "gimpdisplayshell.h"
#include "gimptoolwidget.h"
......@@ -376,6 +377,30 @@ gimp_tool_widget_add_handle (GimpToolWidget *widget,
return item;
}
GimpCanvasItem *
gimp_tool_widget_add_transform_guides (GimpToolWidget *widget,
const GimpMatrix3 *transform,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
GimpGuidesType type,
gint n_guides)
{
GimpCanvasItem *item;
g_return_val_if_fail (GIMP_IS_TOOL_WIDGET (widget), NULL);
item = gimp_canvas_transform_guides_new (widget->private->shell,
transform, x1, y1, x2, y2,
type, n_guides);
gimp_tool_widget_add_item (widget, item);
g_object_unref (item);
return item;
}
gboolean
gimp_tool_widget_button_press (GimpToolWidget *widget,
const GimpCoords *coords,
......
......@@ -117,18 +117,27 @@ void gimp_tool_widget_pop_group (GimpToolWidget *widget);
/* for subclasses, convenience functions to add specific items
*/
GimpCanvasItem * gimp_tool_widget_add_line (GimpToolWidget *widget,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2);
GimpCanvasItem * gimp_tool_widget_add_handle (GimpToolWidget *widget,
GimpHandleType type,
gdouble x,
gdouble y,
gint width,
gint height,
GimpHandleAnchor anchor);
GimpCanvasItem * gimp_tool_widget_add_line (GimpToolWidget *widget,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2);
GimpCanvasItem * gimp_tool_widget_add_handle (GimpToolWidget *widget,
GimpHandleType type,
gdouble x,
gdouble y,
gint width,
gint height,
GimpHandleAnchor anchor);
GimpCanvasItem * gimp_tool_widget_add_transform_guides
(GimpToolWidget *widget,
const GimpMatrix3 *transform,
gdouble x1,
gdouble y1,
gdouble x2,
gdouble y2,
GimpGuidesType type,
gint n_guides);
/* for tools, to be called from the respective GimpTool method
* implementations
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment