Skip to main content

Module shape

Module shape 

Source
Expand description

CSS Shape data structures for shape-inside, shape-outside, and clip-path

These types are C-compatible (repr(C)) for use across FFI boundaries.

Structs§

LineSegment
A line segment representing available horizontal space at a given y-position. Used for line breaking within shaped containers.
LineSegmentVec
ShapeCircle
A circle shape defined by center point and radius
ShapeEllipse
An ellipse shape defined by center point and two radii
ShapeInset
An inset rectangle with optional border radius Defined by insets from the reference box edges
ShapePath
An SVG-like path (for future use)
ShapePoint
A 2D point for shape coordinates (using f32 for precision)
ShapePointVec
ShapePolygon
A polygon shape defined by a list of points (in clockwise order)
ShapeRect
A 2D rectangle for shape bounding boxes and reference boxes

Enums§

CssShape
Represents a CSS shape for shape-inside, shape-outside, and clip-path. Used for both text layout (shape-inside/outside) and rendering clipping (clip-path).
LineSegmentVecDestructor
OptionCssShape
OptionShapeRect
ShapePointVecDestructor

Type Aliases§

LineSegmentVecDestructorType
ShapePointVecDestructorType