|
NovaSVG 0.10.0
A header-only SVG library
|
#include <svgelement.h>


Public Types | |
| enum class | AlignType { None , xMinYMin , xMidYMin , xMaxYMin , xMinYMid , xMidYMid , xMaxYMid , xMinYMax , xMidYMax , xMaxYMax } |
| enum class | MeetOrSlice { Meet , Slice } |
Public Member Functions | |
| SVGPreserveAspectRatio (PropertyID id) | |
| AlignType | alignType () const |
| MeetOrSlice | meetOrSlice () const |
| bool | parse (std::string_view input) final |
| Rect | getClipRect (const Rect &viewBoxRect, const Size &viewportSize) const |
| Transform | getTransform (const Rect &viewBoxRect, const Size &viewportSize) const |
| void | transformRect (Rect &dstRect, Rect &srcRect) const |
Public Member Functions inherited from novasvg::SVGProperty | |
| SVGProperty (PropertyID id) | |
| virtual | ~SVGProperty ()=default |
| PropertyID | id () const |
Definition at line 640 of file svgelement.h.
|
strong |
| Enumerator | |
|---|---|
| None | |
| xMinYMin | |
| xMidYMin | |
| xMaxYMin | |
| xMinYMid | |
| xMidYMid | |
| xMaxYMid | |
| xMinYMax | |
| xMidYMax | |
| xMaxYMax | |
Definition at line 642 of file svgelement.h.
|
strong |
| Enumerator | |
|---|---|
| Meet | |
| Slice | |
Definition at line 655 of file svgelement.h.
|
inlineexplicit |
Definition at line 660 of file svgelement.h.
|
inline |
Definition at line 664 of file svgelement.h.
Referenced by parse().
| NOVASVG_INLINE Rect novasvg::SVGPreserveAspectRatio::getClipRect | ( | const Rect & | viewBoxRect, |
| const Size & | viewportSize | ||
| ) | const |
Definition at line 2922 of file svgelement.h.
References novasvg::Size::h, novasvg::Rect::h, novasvg::Size::isEmpty(), novasvg::Rect::isEmpty(), Meet, None, NOVASVG_MAX, NOVASVG_MIN, novasvg::Size::w, novasvg::Rect::w, novasvg::Rect::x, xMaxYMax, xMaxYMid, xMaxYMin, xMidYMax, xMidYMid, xMidYMin, xMinYMax, xMinYMid, and novasvg::Rect::y.
Referenced by novasvg::SVGFitToViewBox::getClipRect().
| NOVASVG_INLINE Transform novasvg::SVGPreserveAspectRatio::getTransform | ( | const Rect & | viewBoxRect, |
| const Size & | viewportSize | ||
| ) | const |
Definition at line 2969 of file svgelement.h.
References novasvg::Size::h, novasvg::Rect::h, novasvg::Size::isEmpty(), novasvg::Rect::isEmpty(), Meet, None, NOVASVG_MAX, NOVASVG_MIN, novasvg::Size::w, novasvg::Rect::w, novasvg::Rect::x, xMaxYMax, xMaxYMid, xMaxYMin, xMidYMax, xMidYMid, xMidYMin, xMinYMax, xMinYMid, and novasvg::Rect::y.
Referenced by novasvg::SVGPatternElement::applyPaint(), and novasvg::SVGFitToViewBox::viewBoxToViewTransform().
|
inline |
Definition at line 665 of file svgelement.h.
Referenced by parse().
|
finalvirtual |
Implements novasvg::SVGProperty.
Definition at line 2876 of file svgelement.h.
References alignType(), Meet, meetOrSlice(), None, novasvg::skipOptionalSpaces(), novasvg::skipString(), Slice, novasvg::stripLeadingSpaces(), xMaxYMax, xMaxYMid, xMaxYMin, xMidYMax, xMidYMid, xMidYMin, xMinYMax, xMinYMid, and xMinYMin.
| NOVASVG_INLINE void novasvg::SVGPreserveAspectRatio::transformRect | ( | Rect & | dstRect, |
| Rect & | srcRect | ||
| ) | const |
Definition at line 3016 of file svgelement.h.
References novasvg::Size::h, novasvg::Rect::h, Meet, None, novasvg::Rect::size(), Slice, novasvg::Rect::w, novasvg::Rect::x, xMaxYMax, xMaxYMid, xMaxYMin, xMidYMax, xMidYMid, xMidYMin, xMinYMax, xMinYMid, and novasvg::Rect::y.
Referenced by novasvg::SVGImageElement::render().