Geometries
A Geometry is not a visual element like Shape, but rather the simplest possible abstract representation of a shape or path.
Geometry has a number of subclasses:
→ RectangleGeometry—Has a Rect property for defining its dimensions.
→ EllipseGeometry—Has RadiusX and RadiusY properties, plus a Center property.
→ LineGeometry—Has StartPoint and EndPoint properties to define a line segment.
→ PathGeometry—Contains a collection of PathFigure objects in its Figures content property; a general-purpose Geometry.
→ GeometryGroup—Contains a collection of geometries.
These should look familiar, because they mirror the Shape classes. So what’s the point of having these separate Geometry classes? You can build up and combine arbitrary geometries ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access