BasicShape

Type Alias BasicShape 

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

A specified basic shape.

Aliased Type§

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

Variants§

§

Rect(BasicShapeRect)

The .

§

Circle(Circle<LengthPercentage>)

Defines a circle with a center and a radius.

§

Ellipse(Ellipse<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, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, 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>.