class Prawn::SVG::Elements::Ellipse
Constants
- USE_NEW_ELLIPSE_CALL
Public Instance Methods
apply()
click to toggle source
# File lib/prawn/svg/elements/ellipse.rb, line 15 def apply add_call USE_NEW_ELLIPSE_CALL ? "ellipse" : "ellipse_at", [@x, @y], @rx, @ry end
bounding_box()
click to toggle source
# File lib/prawn/svg/elements/ellipse.rb, line 19 def bounding_box [@x - @rx, @y + @ry, @x + @rx, @y - @ry] end
parse()
click to toggle source
# File lib/prawn/svg/elements/ellipse.rb, line 4 def parse require_attributes 'rx', 'ry' @x = x(attributes['cx'] || "0") @y = y(attributes['cy'] || "0") @rx = x_pixels(attributes['rx']) @ry = y_pixels(attributes['ry']) require_positive_value @rx, @ry end