Class: Idml::Elements::Path

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

Overview

<Path> — a standalone compound-path page item. Schema-faithful model of Path_Object in reference-docs/schemas/package/Spreads/Spread.rnc. Carries geometry via Properties/EntirePath (a flat list of x/y pairs) or via PathPoint children.

The renderer treats a Path like a Polygon — it draws the path points as a filled/stroked polygon. Bezier curve rendering (via LeftDirection/RightDirection) is a refinement; see TODO 106.

Instance Method Summary collapse

Instance Method Details

#first_geometryObject



55
56
57
# File 'lib/idml/elements/path.rb', line 55

def first_geometry
  properties.first&.first_geometry
end

#geometric_boundsObject



51
52
53
# File 'lib/idml/elements/path.rb', line 51

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