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

Public Member Functions | |
| Transform () | |
| Transform (const Matrix &matrix) | |
| Transform (float a, float b, float c, float d, float e, float f) | |
| Transform (const matrix_t &matrix) | |
| Transform | operator* (const Transform &transform) const |
| Transform & | operator*= (const Transform &transform) |
| Transform & | multiply (const Transform &transform) |
| Transform & | translate (float tx, float ty) |
| Transform & | scale (float sx, float sy) |
| Transform & | rotate (float angle, float cx=0.f, float cy=0.f) |
| Transform & | shear (float shx, float shy) |
| Transform & | postMultiply (const Transform &transform) |
| Transform & | postTranslate (float tx, float ty) |
| Transform & | postScale (float sx, float sy) |
| Transform & | postRotate (float angle, float cx=0.f, float cy=0.f) |
| Transform & | postShear (float shx, float shy) |
| Transform | inverse () const |
| Transform & | invert () |
| void | reset () |
| Point | mapPoint (float x, float y) const |
| Point | mapPoint (const Point &point) const |
| Rect | mapRect (const Rect &rect) const |
| float | xScale () const |
| float | yScale () const |
| const matrix_t & | matrix () const |
| matrix_t & | matrix () |
| bool | parse (const char *data, size_t length) |
Static Public Member Functions | |
| static Transform | translated (float tx, float ty) |
| static Transform | scaled (float sx, float sy) |
| static Transform | rotated (float angle, float cx, float cy) |
| static Transform | sheared (float shx, float shy) |
Static Public Attributes | |
| static const Transform | Identity |
| NOVASVG_INLINE novasvg::Transform::Transform | ( | ) |
Definition at line 555 of file canvas.h.
References novasvg::render::matrix_init_identity().
|
inline |
| NOVASVG_INLINE novasvg::Transform::Transform | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d, | ||
| float | e, | ||
| float | f | ||
| ) |
Definition at line 560 of file canvas.h.
References novasvg::render::matrix_init().
|
inline |
| NOVASVG_INLINE Transform novasvg::Transform::inverse | ( | ) | const |
Definition at line 632 of file canvas.h.
References inverse(), and novasvg::render::matrix_invert().
Referenced by inverse(), and novasvg::Matrix::inverse().
| NOVASVG_INLINE Transform & novasvg::Transform::invert | ( | ) |
Definition at line 639 of file canvas.h.
References novasvg::render::matrix_invert().
| NOVASVG_INLINE Point novasvg::Transform::mapPoint | ( | const Point & | point | ) | const |
Definition at line 656 of file canvas.h.
References mapPoint(), novasvg::render::point::x, and novasvg::render::point::y.
| NOVASVG_INLINE Point novasvg::Transform::mapPoint | ( | float | x, |
| float | y | ||
| ) | const |
Definition at line 650 of file canvas.h.
References novasvg::render::matrix_map().
Referenced by mapPoint().
| NOVASVG_INLINE Rect novasvg::Transform::mapRect | ( | const Rect & | rect | ) | const |
Definition at line 661 of file canvas.h.
References novasvg::render::rect::h, novasvg::Rect::Invalid, novasvg::render::matrix_map_rect(), novasvg::render::rect::w, novasvg::render::rect::x, and novasvg::render::rect::y.
Referenced by novasvg::SVGRenderState::beginGroup(), novasvg::Document::boundingBox(), novasvg::SVGClipPathElement::clipBoundingBox(), novasvg::SVGMarkerElement::markerBoundingBox(), novasvg::Element::renderToBitmap(), and novasvg::Box::transformed().
|
inline |
| NOVASVG_INLINE Transform & novasvg::Transform::multiply | ( | const Transform & | transform | ) |
Definition at line 582 of file canvas.h.
Referenced by novasvg::SVGClipPathElement::applyClipPath(), rotate(), scale(), shear(), and translate().
| NOVASVG_INLINE Transform novasvg::Transform::operator* | ( | const Transform & | transform | ) | const |
Definition at line 570 of file canvas.h.
References novasvg::render::matrix_multiply().
| NOVASVG_INLINE Transform & novasvg::Transform::operator*= | ( | const Transform & | transform | ) |
| NOVASVG_INLINE bool novasvg::Transform::parse | ( | const char * | data, |
| size_t | length | ||
| ) |
Definition at line 682 of file canvas.h.
References novasvg::render::matrix_parse().
Referenced by novasvg::SVGTransform::parse().
| NOVASVG_INLINE Transform & novasvg::Transform::postMultiply | ( | const Transform & | transform | ) |
Definition at line 607 of file canvas.h.
Referenced by novasvg::Element::getGlobalMatrix(), postRotate(), postScale(), postShear(), and postTranslate().
| NOVASVG_INLINE Transform & novasvg::Transform::postRotate | ( | float | angle, |
| float | cx = 0.f, |
||
| float | cy = 0.f |
||
| ) |
Definition at line 622 of file canvas.h.
References postMultiply(), and rotated().
| NOVASVG_INLINE Transform & novasvg::Transform::postScale | ( | float | sx, |
| float | sy | ||
| ) |
Definition at line 617 of file canvas.h.
References postMultiply(), and scaled().
| NOVASVG_INLINE Transform & novasvg::Transform::postShear | ( | float | shx, |
| float | shy | ||
| ) |
Definition at line 627 of file canvas.h.
References postMultiply(), and sheared().
| NOVASVG_INLINE Transform & novasvg::Transform::postTranslate | ( | float | tx, |
| float | ty | ||
| ) |
Definition at line 612 of file canvas.h.
References postMultiply(), and translated().
| NOVASVG_INLINE void novasvg::Transform::reset | ( | ) |
Definition at line 645 of file canvas.h.
References novasvg::render::matrix_init_identity().
| NOVASVG_INLINE Transform & novasvg::Transform::rotate | ( | float | angle, |
| float | cx = 0.f, |
||
| float | cy = 0.f |
||
| ) |
Definition at line 597 of file canvas.h.
References multiply(), and rotated().
|
static |
Definition at line 687 of file canvas.h.
References matrix(), novasvg::render::matrix_init_rotate(), novasvg::render::matrix_init_translate(), novasvg::render::matrix_rotate(), novasvg::render::matrix_translate(), and NOVASVG_DEG2RAD.
Referenced by postRotate(), novasvg::SVGTextElement::render(), rotate(), and novasvg::Matrix::rotated().
| NOVASVG_INLINE Transform & novasvg::Transform::scale | ( | float | sx, |
| float | sy | ||
| ) |
Definition at line 592 of file canvas.h.
References multiply(), and scaled().
|
static |
Definition at line 701 of file canvas.h.
References matrix(), and novasvg::render::matrix_init_scale().
Referenced by novasvg::SVGPatternElement::applyPaint(), postScale(), scale(), and novasvg::Matrix::scaled().
| NOVASVG_INLINE Transform & novasvg::Transform::shear | ( | float | shx, |
| float | shy | ||
| ) |
Definition at line 602 of file canvas.h.
References multiply(), and sheared().
|
static |
Definition at line 708 of file canvas.h.
References matrix(), novasvg::render::matrix_init_shear(), and NOVASVG_DEG2RAD.
Referenced by postShear(), shear(), and novasvg::Matrix::sheared().
| NOVASVG_INLINE Transform & novasvg::Transform::translate | ( | float | tx, |
| float | ty | ||
| ) |
Definition at line 587 of file canvas.h.
References multiply(), and translated().
|
static |
Definition at line 715 of file canvas.h.
References matrix(), and novasvg::render::matrix_init_translate().
Referenced by novasvg::handleTextChunk(), novasvg::SVGUseElement::localTransform(), novasvg::SVGGraphicsElement::localTransform(), novasvg::SVGSVGElement::localTransform(), novasvg::SVGMarkerElement::markerTransform(), postTranslate(), translate(), and novasvg::Matrix::translated().
| NOVASVG_INLINE float novasvg::Transform::xScale | ( | ) | const |
Definition at line 672 of file canvas.h.
References novasvg::render::matrix::a, and novasvg::render::matrix::b.
Referenced by novasvg::SVGRenderState::beginGroup(), and novasvg::SVGRenderState::endGroup().
| NOVASVG_INLINE float novasvg::Transform::yScale | ( | ) | const |
Definition at line 677 of file canvas.h.
References novasvg::render::matrix::c, and novasvg::render::matrix::d.
|
static |
Definition at line 300 of file canvas.h.
Referenced by novasvg::SVGClipPathElement::applyClipPath(), novasvg::SVGElement::localTransform(), and novasvg::SVGFitToViewBox::viewBoxToViewTransform().