当前位置: 首页>>代码示例>>C++>>正文


C++ SVGSVGElement::PrependLocalTransformsTo方法代码示例

本文整理汇总了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;
}
开发者ID:Andrel322,项目名称:gecko-dev,代码行数:15,代码来源:nsSVGInnerSVGFrame.cpp

示例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;
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:16,代码来源:nsSVGOuterSVGFrame.cpp

示例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;
}
开发者ID:Nazi-Nigger,项目名称:gecko-dev,代码行数:19,代码来源:nsSVGOuterSVGFrame.cpp

示例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;
}
开发者ID:,项目名称:,代码行数:21,代码来源:


注:本文中的SVGSVGElement::PrependLocalTransformsTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。