lib/hexapdf/content/graphic_object/geom2d.rb in hexapdf-0.23.0 vs lib/hexapdf/content/graphic_object/geom2d.rb in hexapdf-0.24.0
- old
+ new
@@ -2,11 +2,11 @@
#
#--
# This file is part of HexaPDF.
#
# HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby
-# Copyright (C) 2014-2021 Thomas Leitner
+# Copyright (C) 2014-2022 Thomas Leitner
#
# HexaPDF is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License version 3 as
# published by the Free Software Foundation with the addition of the
# following permission added to Section 15 as permitted in Section 7(a):
@@ -126,9 +126,10 @@
def draw_polygon(canvas)
return unless @object.nr_of_vertices > 1
canvas.move_to(@object[0].x, @object[0].y)
1.upto(@object.nr_of_vertices - 1) {|i| canvas.line_to(@object[i].x, @object[i].y) }
+ canvas.close_subpath
canvas.stroke unless @path_only
end
def draw_polygon_set(canvas)
return if @object.nr_of_contours == 0