Type Alias BasicShape

Source
pub type BasicShape = GenericBasicShape<Angle, ShapePosition, LengthPercentage, NonNegativeLengthPercentage, BasicShapeRect>;
Expand description

A specified basic shape.

Aliased Type§

#[repr(C, u8)]
pub enum BasicShape { Rect(BasicShapeRect), Circle(Circle<GenericPosition<LengthPercentage, LengthPercentage>, NonNegative<LengthPercentage>>), Ellipse(Ellipse<GenericPosition<LengthPercentage, LengthPercentage>, NonNegative<LengthPercentage>>), Polygon(GenericPolygon<LengthPercentage>), PathOrShape(GenericPathOrShapeFunction<Angle, LengthPercentage>), }

Variants§

§

Rect(BasicShapeRect)

The .

§

Circle(Circle<GenericPosition<LengthPercentage, LengthPercentage>, NonNegative<LengthPercentage>>)

Defines a circle with a center and a radius.

§

Ellipse(Ellipse<GenericPosition<LengthPercentage, LengthPercentage>, NonNegative<LengthPercentage>>)

Defines an ellipse with a center and x-axis/y-axis radii.

§

Polygon(GenericPolygon<LengthPercentage>)

Defines a polygon with pair arguments.

§

PathOrShape(GenericPathOrShapeFunction<Angle, LengthPercentage>)

Defines a path() or shape().

Implementations§

Source§

impl BasicShape

Source

pub fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, flags: AllowedBasicShapes, shape_type: ShapeType, ) -> Result<Self, ParseError<'i>>

Parse with some parameters.

  1. The supported .
  2. The type of shapes. Should we ignore fill-rule?
  3. The default value of at <position>.