本文整理汇总了C++中SVGSVGElement::hasRelativeLengths方法的典型用法代码示例。如果您正苦于以下问题:C++ SVGSVGElement::hasRelativeLengths方法的具体用法?C++ SVGSVGElement::hasRelativeLengths怎么用?C++ SVGSVGElement::hasRelativeLengths使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SVGSVGElement
的用法示例。
在下文中一共展示了SVGSVGElement::hasRelativeLengths方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layout
void RenderSVGRoot::layout()
{
ASSERT(needsLayout());
// Arbitrary affine transforms are incompatible with LayoutState.
LayoutStateDisabler layoutStateDisabler(view());
bool needsLayout = selfNeedsLayout();
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
IntSize oldSize(width(), height());
negotiateSizeWithHostDocumentIfNeeded();
computeLogicalWidth();
computeLogicalHeight();
calcViewport();
SVGSVGElement* svg = static_cast<SVGSVGElement*>(node());
m_isLayoutSizeChanged = svg->hasRelativeLengths() && oldSize != size();
SVGRenderSupport::layoutChildren(this, needsLayout);
m_isLayoutSizeChanged = false;
// At this point LayoutRepainter already grabbed the old bounds,
// recalculate them now so repaintAfterLayout() uses the new bounds.
if (m_needsBoundariesOrTransformUpdate) {
updateCachedBoundaries();
m_needsBoundariesOrTransformUpdate = false;
}
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
示例2: layout
void RenderSVGRoot::layout()
{
StackStats::LayoutCheckPoint layoutCheckPoint;
ASSERT(needsLayout());
m_resourcesNeedingToInvalidateClients.clear();
// Arbitrary affine transforms are incompatible with LayoutState.
LayoutStateDisabler layoutStateDisabler(view());
bool needsLayout = selfNeedsLayout();
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
buildLocalToBorderBoxTransform();
SVGSVGElement* svg = toSVGSVGElement(node());
ASSERT(svg);
m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size());
SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this));
if (!m_resourcesNeedingToInvalidateClients.isEmpty()) {
// Invalidate resource clients, which may mark some nodes for layout.
HashSet<RenderSVGResourceContainer*>::iterator end = m_resourcesNeedingToInvalidateClients.end();
for (HashSet<RenderSVGResourceContainer*>::iterator it = m_resourcesNeedingToInvalidateClients.begin(); it != end; ++it)
(*it)->removeAllClientsFromCache();
m_isLayoutSizeChanged = false;
SVGRenderSupport::layoutChildren(this, false);
}
// At this point LayoutRepainter already grabbed the old bounds,
// recalculate them now so repaintAfterLayout() uses the new bounds.
if (m_needsBoundariesOrTransformUpdate) {
updateCachedBoundaries();
m_needsBoundariesOrTransformUpdate = false;
}
updateLayerTransform();
repainter.repaintAfterLayout();
setNeedsLayout(false);
}
示例3: layout
void RenderSVGRoot::layout()
{
ASSERT(needsLayout());
// Arbitrary affine transforms are incompatible with LayoutState.
LayoutStateDisabler layoutStateDisabler(*this);
bool needsLayout = selfNeedsLayout();
LayoutRepainter repainter(*this, checkForRepaintDuringLayout() && needsLayout);
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
buildLocalToBorderBoxTransform();
SVGRenderSupport::layoutResourcesIfNeeded(this);
SVGSVGElement* svg = toSVGSVGElement(node());
ASSERT(svg);
m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size());
SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this));
// At this point LayoutRepainter already grabbed the old bounds,
// recalculate them now so repaintAfterLayout() uses the new bounds.
if (m_needsBoundariesOrTransformUpdate) {
updateCachedBoundaries();
m_needsBoundariesOrTransformUpdate = false;
}
m_overflow.clear();
addVisualEffectOverflow();
if (!shouldApplyViewportClip()) {
FloatRect contentRepaintRect = repaintRectInLocalCoordinates();
contentRepaintRect = m_localToBorderBoxTransform.mapRect(contentRepaintRect);
addVisualOverflow(enclosingLayoutRect(contentRepaintRect));
}
updateLayerTransform();
m_hasBoxDecorations = isDocumentElement() ? calculateHasBoxDecorations() : hasBoxDecorations();
invalidateBackgroundObscurationStatus();
repainter.repaintAfterLayout();
clearNeedsLayout();
}
示例4: layout
void RenderSVGRoot::layout()
{
ASSERT(needsLayout());
// Arbitrary affine transforms are incompatible with LayoutState.
ForceHorriblySlowRectMapping slowRectMapping(*this);
bool needsLayout = selfNeedsLayout();
LayoutSize oldSize = size();
updateLogicalWidth();
updateLogicalHeight();
buildLocalToBorderBoxTransform();
SVGRenderSupport::layoutResourcesIfNeeded(this);
SVGSVGElement* svg = toSVGSVGElement(node());
ASSERT(svg);
m_isLayoutSizeChanged = needsLayout || (svg->hasRelativeLengths() && oldSize != size());
SVGRenderSupport::layoutChildren(this, needsLayout || SVGRenderSupport::filtersForceContainerLayout(this));
if (m_needsBoundariesOrTransformUpdate) {
updateCachedBoundaries();
m_needsBoundariesOrTransformUpdate = false;
}
m_overflow.clear();
addVisualEffectOverflow();
if (!shouldApplyViewportClip()) {
FloatRect contentRepaintRect = paintInvalidationRectInLocalCoordinates();
contentRepaintRect = m_localToBorderBoxTransform.mapRect(contentRepaintRect);
addVisualOverflow(enclosingLayoutRect(contentRepaintRect));
}
updateLayerTransformAfterLayout();
m_hasBoxDecorationBackground = isDocumentElement() ? calculateHasBoxDecorations() : hasBoxDecorationBackground();
invalidateBackgroundObscurationStatus();
clearNeedsLayout();
}