本文整理汇总了C++中SVGSVGElement::PrependLocalTransformsTo方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGSVGElement::PrependLocalTransformsTo方法的具体用法?C++ SVGSVGElement::PrependLocalTransformsTo怎么用?C++ SVGSVGElement::PrependLocalTransformsTo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGSVGElement
的用法示例。
在下文中一共展示了SVGSVGElement::PrependLocalTransformsTo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gfxMatrix
gfxMatrix
nsSVGInnerSVGFrame::GetCanvasTM()
{
if (!mCanvasTM) {
NS_ASSERTION(GetParent(), "null parent");
nsSVGContainerFrame *parent = static_cast<nsSVGContainerFrame*>(GetParent());
SVGSVGElement *content = static_cast<SVGSVGElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM());
mCanvasTM = new gfxMatrix(tm);
}
return *mCanvasTM;
}
示例2: PresContext
gfxMatrix
nsSVGOuterSVGFrame::GetCanvasTM()
{
if (!mCanvasTM) {
SVGSVGElement *content = static_cast<SVGSVGElement*>(mContent);
float devPxPerCSSPx =
1.0f / PresContext()->AppUnitsToFloatCSSPixels(
PresContext()->AppUnitsPerDevPixel());
gfxMatrix tm = content->PrependLocalTransformsTo(
gfxMatrix::Scaling(devPxPerCSSPx, devPxPerCSSPx));
mCanvasTM = new gfxMatrix(tm);
}
return *mCanvasTM;
}
示例3:
bool
nsSVGOuterSVGAnonChildFrame::HasChildrenOnlyTransform(gfx::Matrix *aTransform) const
{
// We must claim our nsSVGOuterSVGFrame's children-only transforms as our own
// so that the children we are used to wrap are transformed properly.
SVGSVGElement *content = static_cast<SVGSVGElement*>(mContent);
bool hasTransform = content->HasChildrenOnlyTransform();
if (hasTransform && aTransform) {
// Outer-<svg> doesn't use x/y, so we can pass eChildToUserSpace here.
gfxMatrix identity;
*aTransform = gfx::ToMatrix(
content->PrependLocalTransformsTo(identity, eChildToUserSpace));
}
return hasTransform;
}
示例4: GetCSSPxToDevPxMatrix
gfxMatrix
nsSVGInnerSVGFrame::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);
SVGSVGElement *content = static_cast<SVGSVGElement*>(mContent);
gfxMatrix tm = content->PrependLocalTransformsTo(parent->GetCanvasTM(aFor));
mCanvasTM = new gfxMatrix(tm);
}
return *mCanvasTM;
}