本文整理汇总了C++中SVGGraphicsElement::PrependLocalTransformsTo方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGGraphicsElement::PrependLocalTransformsTo方法的具体用法?C++ SVGGraphicsElement::PrependLocalTransformsTo怎么用?C++ SVGGraphicsElement::PrependLocalTransformsTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGGraphicsElement
的用法示例。
在下文中一共展示了SVGGraphicsElement::PrependLocalTransformsTo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetCSSPxToDevPxMatrix
gfxMatrix
nsSVGGFrame::GetCanvasTM(uint32_t aFor)
{
if (!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
if ((aFor == FOR_PAINTING && NS_SVGDisplayListPaintingEnabled()) ||
(aFor == FOR_HIT_TESTING && NS_SVGDisplayListHitTestingEnabled())) {
return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(this);
}
}
if (!mCanvasTM) {
NS_ASSERTION(mParent, "null parent");
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(mParent);
SVGGraphicsElement *content = static_cast<SVGGraphicsElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM(aFor));
mCanvasTM = new gfxMatrix(tm);
}
return *mCanvasTM;
}
示例2: GetCSSPxToDevPxMatrix
gfxMatrix
nsSVGGFrame::GetCanvasTM(uint32_t aFor, nsIFrame* aTransformRoot)
{
if (!(GetStateBits() & NS_FRAME_IS_NONDISPLAY) && !aTransformRoot) {
if (aFor == FOR_PAINTING && NS_SVGDisplayListPaintingEnabled()) {
return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(this);
}
if (aFor == FOR_HIT_TESTING && NS_SVGDisplayListHitTestingEnabled()) {
return gfxMatrix();
}
}
if (!mCanvasTM) {
NS_ASSERTION(GetParent(), "null parent");
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
SVGGraphicsElement *content = static_cast<SVGGraphicsElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformsTo(
this == aTransformRoot ? gfxMatrix() :
parent->GetCanvasTM(aFor, aTransformRoot));
mCanvasTM = new gfxMatrix(tm);
}
return *mCanvasTM;
}