Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::parser::PreserveAspectRatioParser Class Reference

Parser for SVG preserveAspectRatio attribute. More...

#include "donner/svg/parser/PreserveAspectRatioParser.h"

Static Public Member Functions

static ParseResult< PreserveAspectRatioParse (std::string_view str)
 Parse an SVG preserveAspectRatio attribute.
 

Detailed Description

Parser for SVG preserveAspectRatio attribute.

See also
https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute

Member Function Documentation

◆ Parse()

ParseResult< PreserveAspectRatio > donner::svg::parser::PreserveAspectRatioParser::Parse ( std::string_view str)
static

Parse an SVG preserveAspectRatio attribute.

See also
https://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute

It parses a string containing the following values:

<align> <meetOrSlice>?
<align> =
<meetOrSlice> = meet | slice
A parser result, which may contain a result of type T, or an error, or both.
Definition ParseResult.h:17
Parameters
strInput string, such as "xMidYMid meet".
Returns
Parsed PreserveAspectRatio.

The documentation for this class was generated from the following files: