Geometries [¶]
Geometries, paths, and transformations.
Blend2D offers various geometry structures and objects that can be used with either BLPath for path building or BLContext for rendering. In general there are two categories - BLPath, which specifies a 2D path composed of path segments, and lightweight geometries such as BLRect, BLRoundRect, etc... which are only described by a trivial C/C++ struct.
Paths
- BLPath - path container
- BLPathCore - C API type representing BLPath
- BLPathCmd - path command specifies the type of a path segment withing BLPath
- BLPathFlags - flags associated with BLPath
- BLPathReverseMode - reverse mode accepted by BLPath::add_reversed_path()
- BLPathView - view providing all necessary variables to inspect and iterate a BLPath
Path Operations
- BLStrokeOptions - holds stroking options
- BLStrokeOptionsCore - C API type representing BLStrokeOptions
- BLOffsetMode - path offsetting mode
- BLFlattenMode - path flattening mode
- BLStrokeCap - stroke cap option
- BLStrokeCapPosition - stroke cap position (can be specified separately)
- BLStrokeJoin - stroke join option
- BLStrokeTransformOrder - the order of a transformation when rendering a stroked path or geometry
Lightweight Geometries and Structs
- BLPoint - 2D point composed of
[x, y]
values (64-bit floats) - BLPointI - 2D point composed of
[x, y]
values (32-bit integers) - BLSize - 2D size composed of
[w, h]
values (64-bit floats) - BLSizeI - 2D size composed of
[w, h]
values (32-bit integers) - BLBox - 2D rectangular area composed of
[x0, y0, x1, y1]
values (64-bit floats) - BLBoxI - 2D rectangular area composed of
[x0, y0, x1, y1]
values (32-bit integers) - BLRect - 2D rectangular area composed of
[x, y, w, h]
values (64-bit floats) - BLRectI - 2D rectangular area composed of
[x, y, w, h]
values (32-bit integers) - BLRoundRect - rounded rectangle within
[x, y, w, h]
with radius[rx, ry]
(64-bit floats) - BLCircle - circle at
[cx, cy]
with radiusr
(64-bit floats) - BLEllipse - ellipse at
[cx, cy]
with radius[rx, ry]
(64-bit floats) - BLArc - arc at
[cx, cy]
with radius[rx, ry]
andstart
+sweep
values (64-bit floats) - BLLine - line segment from
[x0, y0]
to[x1, y1]
(64-bit floats) - BLTriangle - triangle having
[x0, y0]
,[x1, y1]
, and[x2, y2]
vertices (64-bit floats)
Geometry Constants
- BLGeometryDirection - specifies a direction
- BLGeometryType - specifies a type of a geometry argument (low-level)
- BLFillRule - specifies a fill rule (used by both BLPath and BLContext)
- BLHitTest - specifies a result of hit-testing
Transformations
- BLMatrix2D - 2D transformation matrix (affine)
- BLTransformOp - transformation operation (low-level)
- BLTransformType - transformation type