KHTML
Go to the documentation of this file. 24 #include "wtf/Platform.h" 37 SVGTransform::SVGTransform()
38 : m_type(SVG_TRANSFORM_UNKNOWN)
43 SVGTransform::SVGTransform(SVGTransformType type)
52 : m_type(SVG_TRANSFORM_MATRIX)
58 SVGTransform::~SVGTransform()
62 bool SVGTransform::isValid()
64 return (m_type != SVG_TRANSFORM_UNKNOWN);
67 SVGTransform::SVGTransformType SVGTransform::type()
const 77 float SVGTransform::angle()
const 82 FloatPoint SVGTransform::rotationCenter()
const 89 m_type = SVG_TRANSFORM_MATRIX;
95 void SVGTransform::setTranslate(
float tx,
float ty)
97 m_type = SVG_TRANSFORM_TRANSLATE;
101 m_matrix.translate(tx, ty);
106 return FloatPoint::narrowPrecision(m_matrix.e(), m_matrix.f());
109 void SVGTransform::setScale(
float sx,
float sy)
111 m_type = SVG_TRANSFORM_SCALE;
116 m_matrix.scale(sx, sy);
121 return FloatSize::narrowPrecision(m_matrix.a(), m_matrix.d());
124 void SVGTransform::setRotate(
float angle,
float cx,
float cy)
126 m_type = SVG_TRANSFORM_ROTATE;
132 m_matrix.translate(cx, cy);
133 m_matrix.rotate(angle);
134 m_matrix.translate(-cx, -cy);
137 void SVGTransform::setSkewX(
float angle)
139 m_type = SVG_TRANSFORM_SKEWX;
143 m_matrix.skewX(angle);
146 void SVGTransform::setSkewY(
float angle)
148 m_type = SVG_TRANSFORM_SKEWY;
152 m_matrix.skewY(angle);
156 #endif // ENABLE(SVG)
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Wed Aug 22 2018 19:43:08 by
doxygen 1.8.14 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.