lib/prawn/graphics.rb in prawn-2.3.0 vs lib/prawn/graphics.rb in prawn-2.4.0
- old
+ new
@@ -210,11 +210,11 @@
l2 = radius2 * KAPPA
move_to(x + radius1, y)
# Upper right hand corner
- curve_to [x, y + radius2],
+ curve_to [x, y + radius2],
bounds: [[x + radius1, y + l2], [x + l1, y + radius2]]
# Upper left hand corner
curve_to [x - radius1, y],
bounds: [[x - l1, y + radius2], [x - radius1, y + l2]]
@@ -339,28 +339,28 @@
negative_axes_length: 20,
color: '000000'
}.merge(options)
Prawn.verify_options(
- %i[
- at width height step_length
- negative_axes_length color
- ], options
+ %i[at width height step_length negative_axes_length color],
+ options
)
save_graphics_state do
fill_color(options[:color])
stroke_color(options[:color])
dash(1, space: 4)
stroke_horizontal_line(
options[:at][0] - options[:negative_axes_length],
- options[:at][0] + options[:width], at: options[:at][1]
+ options[:at][0] + options[:width],
+ at: options[:at][1]
)
stroke_vertical_line(
options[:at][1] - options[:negative_axes_length],
- options[:at][1] + options[:height], at: options[:at][0]
+ options[:at][1] + options[:height],
+ at: options[:at][0]
)
undash
fill_circle(options[:at], 1)
@@ -631,13 +631,13 @@
polygon rounded_polygon rounded_vertex
]
ops.product(shapes).each do |operation, shape|
class_eval <<-METHOD, __FILE__, __LINE__ + 1
- def #{operation}_#{shape}(*args)
- #{shape}(*args)
- #{operation}
- end
+ def #{operation}_#{shape}(*args) # def fill_polygon(*args)
+ #{shape}(*args) # polygon(*args)
+ #{operation} # fill
+ end # end
METHOD
end
private