本文整理汇总了C++中geom::Affine::expansionX方法的典型用法代码示例。如果您正苦于以下问题:C++ Affine::expansionX方法的具体用法?C++ Affine::expansionX怎么用?C++ Affine::expansionX使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geom::Affine
的用法示例。
在下文中一共展示了Affine::expansionX方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: param_transform_multiply
void PowerStrokePointArrayParam::param_transform_multiply(Geom::Affine const &postmul, bool /*set*/)
{
// Check if proportional stroke-width scaling is on
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
bool transform_stroke = prefs ? prefs->getBool("/options/transform/stroke", true) : true;
if (transform_stroke) {
std::vector<Geom::Point> result;
result.reserve(_vector.size()); // reserve space for the points that will be added in the for loop
for (std::vector<Geom::Point>::const_iterator point_it = _vector.begin(), e = _vector.end();
point_it != e; ++point_it)
{
// scale each width knot with the average scaling in X and Y
Geom::Coord const A = (*point_it)[Geom::Y] * ((postmul.expansionX() + postmul.expansionY()) / 2);
result.push_back(Geom::Point((*point_it)[Geom::X], A));
}
param_set_and_write_new_value(result);
}
}
示例2: Point
static Geom::Point sp_pattern_extract_scale(SPPattern *pat)
{
Geom::Affine transf = pat->patternTransform;
return Geom::Point( transf.expansionX(), transf.expansionY() );
}