Class: Idml::Elements::Oval

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/idml/elements/oval.rb

Overview

<Oval> — an elliptical page item. Schema-faithful model of Oval_Object in reference-docs/schemas/package/Spreads/Spread.rnc. Shares the same attribute set and Properties/PathGeometry child structure as Rectangle; the path points form an ellipse (4 bezier anchor points) instead of corner points.

The renderer treats an Oval like a Rectangle for fill/stroke — it draws the bounding box. True elliptical rendering (bezier curve generation) is a refinement; see TODO 106.

Instance Method Summary collapse

Instance Method Details

#first_geometryObject



69
70
71
# File 'lib/idml/elements/oval.rb', line 69

def first_geometry
  properties.first&.first_geometry
end

#geometric_boundsObject



65
66
67
# File 'lib/idml/elements/oval.rb', line 65

def geometric_bounds
  @geometric_bounds ||= first_geometry&.bounding_box
end

#graphic?Boolean



61
62
63
# File 'lib/idml/elements/oval.rb', line 61

def graphic?
  content_type == "GraphicType"
end