本文整理汇总了C++中FloatRect::isZero方法的典型用法代码示例。如果您正苦于以下问题:C++ FloatRect::isZero方法的具体用法?C++ FloatRect::isZero怎么用?C++ FloatRect::isZero使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FloatRect
的用法示例。
在下文中一共展示了FloatRect::isZero方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: localQuadForTextBox
Vector<IntRect> RenderTextLineBoxes::absoluteRectsForRange(const RenderText& renderer, unsigned start, unsigned end, bool useSelectionHeight, bool* wasFixed) const
{
Vector<IntRect> rects;
for (auto box = m_first; box; box = box->nextTextBox()) {
// Note: box->end() returns the index of the last character, not the index past it
if (start <= box->start() && box->end() < end) {
FloatRect boundaries = box->calculateBoundaries();
if (useSelectionHeight) {
LayoutRect selectionRect = box->localSelectionRect(start, end);
if (box->isHorizontal()) {
boundaries.setHeight(selectionRect.height());
boundaries.setY(selectionRect.y());
} else {
boundaries.setWidth(selectionRect.width());
boundaries.setX(selectionRect.x());
}
}
rects.append(renderer.localToAbsoluteQuad(boundaries, 0, wasFixed).enclosingBoundingBox());
continue;
}
// FIXME: This code is wrong. It's converting local to absolute twice. http://webkit.org/b/65722
FloatRect rect = localQuadForTextBox(*box, start, end, useSelectionHeight);
if (!rect.isZero())
rects.append(renderer.localToAbsoluteQuad(rect, 0, wasFixed).enclosingBoundingBox());
}
return rects;
}
示例2: updateBackingStore
void FilterEffectRenderer::updateBackingStore(const FloatRect& filterRect)
{
if (!filterRect.isZero()) {
FloatRect currentSourceRect = sourceImageRect();
if (filterRect != currentSourceRect)
setSourceImageRect(filterRect);
}
}
示例3: updateBackingStoreRect
bool FilterEffectRenderer::updateBackingStoreRect(const FloatRect& filterRect)
{
if (!filterRect.isZero() && isFilterSizeValid(filterRect)) {
FloatRect currentSourceRect = sourceImageRect();
if (filterRect != currentSourceRect) {
setSourceImageRect(filterRect);
return true;
}
}
return false;
}
示例4: uniteIfNonZero
void FloatRect::uniteIfNonZero(const FloatRect& other) {
// Handle empty special cases first.
if (other.isZero())
return;
if (isZero()) {
*this = other;
return;
}
uniteEvenIfEmpty(other);
}