本文整理汇总了C++中AffineTransform::multLeft方法的典型用法代码示例。如果您正苦于以下问题:C++ AffineTransform::multLeft方法的具体用法?C++ AffineTransform::multLeft怎么用?C++ AffineTransform::multLeft使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AffineTransform
的用法示例。
在下文中一共展示了AffineTransform::multLeft方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: localCoordinateSpaceTransform
AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const
{
AffineTransform viewBoxTransform;
if (attributes()->getAttributeItem(SVGNames::viewBoxAttr))
viewBoxTransform = viewBoxToViewTransform(width().value(this), height().value(this));
AffineTransform transform;
if (!isOutermostSVG())
transform.translate(x().value(this), y().value(this));
else if (mode == SVGLocatable::ScreenScope) {
if (RenderObject* renderer = this->renderer()) {
// Translate in our CSS parent coordinate space
// FIXME: This doesn't work correctly with CSS transforms.
FloatPoint location = renderer->localToAbsolute(FloatPoint(), false, true);
// Be careful here! localToAbsolute() includes the x/y offset coming from the viewBoxToViewTransform(), because
// RenderSVGRoot::localToBorderBoxTransform() (called through mapLocalToContainer(), called from localToAbsolute())
// also takes the viewBoxToViewTransform() into account, so we have to subtract it here (original cause of bug #27183)
transform.translate(location.x() - viewBoxTransform.e(), location.y() - viewBoxTransform.f());
// Respect scroll offset.
if (FrameView* view = document()->view()) {
IntSize scrollOffset = view->scrollOffset();
transform.translate(-scrollOffset.width(), -scrollOffset.height());
}
}
}
return transform.multLeft(viewBoxTransform);
}