Type Alias style::values::specified::basic_shape::BasicShape
source · pub type BasicShape = GenericBasicShape<Angle, ShapePosition, LengthPercentage, NonNegativeLengthPercentage, BasicShapeRect>;
Expand description
A specified basic shape.
Aliased Type§
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
impl BasicShape
sourcepub fn parse<'i, 't>(
context: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
flags: AllowedBasicShapes,
shape_type: ShapeType,
) -> Result<Self, ParseError<'i>>
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.
- The supported
. - The type of shapes. Should we ignore fill-rule?
- The default value of
at <position>
.