diff --git a/debian/changelog b/debian/changelog index 58d73ed9..eaa516a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ drawing (1.2.0) unstable; urgency=low * better update the preview of most tools when their options change (#357) * update the user help manual * preserve transparency of the original area when skewing with a solid background color + * add "circle" and "checkmark" options to the "points" tool (#458) * update several translations -- Romain F. T. Sat, 16 Mar 2024 13:12:00 +0100 diff --git a/src/tools/classic_tools/tool_points.py b/src/tools/classic_tools/tool_points.py index 70d601ee..3e25a69d 100644 --- a/src/tools/classic_tools/tool_points.py +++ b/src/tools/classic_tools/tool_points.py @@ -70,6 +70,10 @@ def on_options_changed(self): self._shape_label = _("X-shaped cross") elif state_as_string == 'square': self._shape_label = _("Square") + elif state_as_string == 'dot': + self._shape_label = _("Dot") + elif state_as_string == 'checkmark': + self._shape_label = _("Checkmark") else: self._shape_label = _("Circle") self._points_type = state_as_string @@ -133,7 +137,13 @@ def do_tool_operation(self, operation): point_type = operation['point_type'] if point_type == 'circle': cairo_context.arc(x, y, half_width, 0.0, 2 * math.pi) + elif point_type == 'dot': + cairo_context.arc(x, y, half_width, 0.0, 2 * math.pi) cairo_context.fill() + elif point_type == 'checkmark': + cairo_context.move_to(x - half_width, y) + cairo_context.line_to(x - 0.2 * half_width, y + 0.8 * half_width) + cairo_context.line_to(x + half_width, y - half_width) elif point_type == 'cross': # Looks awful with small sizes, either with or without antialiasing cairo_context.move_to(x, y - half_width) diff --git a/src/tools/ui/tool-points.ui b/src/tools/ui/tool-points.ui index 84df1338..0b0dcb6e 100644 --- a/src/tools/ui/tool-points.ui +++ b/src/tools/ui/tool-points.ui @@ -8,6 +8,11 @@ win.points_type circle + + Dot + win.points_type + dot + Cross win.points_type @@ -23,6 +28,11 @@ win.points_type square + + Checkmark + win.points_type + checkmark +