Skip to content

Commit 53d279b

Browse files
committed
add draw_point!
see #148
1 parent 3206143 commit 53d279b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## master
44

5+
* add `draw_point!` [jcupitt]
6+
57
## Version 2.1.4 (2021-10-28)
68

79
* `write_to_buffer` tries to use the new target API, then falls back to the old

lib/vips/mutableimage.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ def method_missing name, *args, **options
9696
Vips::Operation.call name.to_s, [self, *args], options
9797
end
9898

99+
# Draw a point on an image.
100+
#
101+
# See {Image#draw_rect}.
102+
def draw_point! ink, left, top, **opts
103+
draw_rect! ink, left, top, 1, 1, **opts
104+
end
105+
99106
# Create a metadata item on an image of the specifed type. Ruby types
100107
# are automatically transformed into the matching glib type (eg.
101108
# {GObject::GINT_TYPE}), if possible.

0 commit comments

Comments
 (0)