本文整理汇总了C++中FrameTree::parent方法的典型用法代码示例。如果您正苦于以下问题:C++ FrameTree::parent方法的具体用法?C++ FrameTree::parent怎么用?C++ FrameTree::parent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FrameTree
的用法示例。
在下文中一共展示了FrameTree::parent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: currentScale
float SVGSVGElement::currentScale() const
{
if (!inDocument() || !isOutermostSVG())
return 1;
Frame* frame = document()->frame();
if (!frame)
return 1;
FrameTree* frameTree = frame->tree();
ASSERT(frameTree);
// The behaviour of currentScale() is undefined, when we're dealing with non-standalone SVG documents.
// If the svg is embedded, the scaling is handled by the host renderer, so when asking from inside
// the SVG document, a scale value of 1 seems reasonable, as it doesn't know anything about the parent scale.
return frameTree->parent() ? 1 : frame->pageZoomFactor();
}
示例2: setCurrentScale
void SVGSVGElement::setCurrentScale(float scale)
{
if (!inDocument() || !isOutermostSVG())
return;
Frame* frame = document()->frame();
if (!frame)
return;
FrameTree* frameTree = frame->tree();
ASSERT(frameTree);
// The behaviour of setCurrentScale() is undefined, when we're dealing with non-standalone SVG documents.
// We choose the ignore this call, it's pretty useless to support calling setCurrentScale() from within
// an embedded SVG document, for the same reasons as in currentScale() - needs resolution by SVG WG.
if (frameTree->parent())
return;
frame->setPageZoomFactor(scale);
}