本文整理汇总了C++中SVGMatrix::get_f方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGMatrix::get_f方法的具体用法?C++ SVGMatrix::get_f怎么用?C++ SVGMatrix::get_f使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGMatrix
的用法示例。
在下文中一共展示了SVGMatrix::get_f方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StringFromTransformList
String SVGTransformList::StringFromTransformList() const
{
IO::StringWriter str;
unsigned int numberOfItems = m_p->m_items.GetSize();
for (size_t i = 0; i < numberOfItems; i++)
{
SVGTransform* transform = m_p->m_items[i];
SVGTransformType type = transform->get_type();
SVGMatrix* matrix = transform->get_matrix();
double a = matrix->get_a();
double b = matrix->get_b();
double c = matrix->get_c();
double d = matrix->get_d();
double e = matrix->get_e();
double f = matrix->get_f();
if (i > 0) str << " ";
switch (type)
{
case SVG_TRANSFORM_TRANSLATE:
{
str << "translate(" << e << "," << f << ")";
}
break;
case SVG_TRANSFORM_SCALE:
{
// swprintf(str2, OLESTR("scale(%g, %g)"), a, d);
// str += str2;
str << "scale(" << a << "," << d << ")";
}
break;
case SVG_TRANSFORM_ROTATE:
{
double angle = transform->get_angle();
// swprintf(str2, OLESTR("rotate(%g, %g, %g)"), angle, e, f);
// str += str2;
str << "rotate(" << angle << "," << e << "," << f << ")";
}
break;
case SVG_TRANSFORM_SKEWX:
{
double angle = transform->get_angle();
// swprintf(str2, OLESTR("skewX(%g)"), angle);
// str += str2;
str << "skewX(" << angle << ")";
}
break;
case SVG_TRANSFORM_SKEWY:
{
double angle = transform->get_angle();
// swprintf(str2, OLESTR("skewY(%g)"), angle);
// str += str2;
str << "skewY(" << angle << ")";
}
break;
case SVG_TRANSFORM_MATRIX:
{
// swprintf(str2, OLESTR("matrix(%g %g %g %g %g %g)"), a, b, c, d, e, f);
// str += str2;
str << "matrix(" << a << "," << b << "," << c << "," << d << "," << e << "," << f << ")";
}
break;
default:
ASSERT(0);
}
}
return str.str();
}