本文整理汇总了C++中Bounds::intersect方法的典型用法代码示例。如果您正苦于以下问题:C++ Bounds::intersect方法的具体用法?C++ Bounds::intersect怎么用?C++ Bounds::intersect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bounds
的用法示例。
在下文中一共展示了Bounds::intersect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateClipBoundsForClipOp
// The bounds of clip ops need to be adjusted for the paints of saveLayers they're inside.
void updateClipBoundsForClipOp(const SkIRect& devBounds) {
Bounds clip = SkRect::Make(devBounds);
// We don't call adjustAndMap() because as its last step it would intersect the adjusted
// clip bounds with the previous clip, exactly what we can't do when the clip grows.
if (this->adjustForSaveLayerPaints(&clip)) {
fCurrentClipBounds = clip.intersect(fCullRect) ? clip : Bounds::MakeEmpty();
} else {
fCurrentClipBounds = fCullRect;
}
}
示例2: updateClipBounds
// Restore holds the devBounds for the clip after the {save,saveLayer}/restore block completes.
void updateClipBounds(const Restore& op) {
// This is just like the clip ops above, but we need to skip the effects (if any) of our
// paired saveLayer (if it is one); it has not yet been popped off the save stack. Our
// devBounds reflect the state of the world after the saveLayer/restore block is done,
// so they are not affected by the saveLayer's paint.
const int kSavesToIgnore = 1;
Bounds clip = SkRect::Make(op.devBounds);
if (this->adjustForSaveLayerPaints(&clip, kSavesToIgnore)) {
fCurrentClipBounds = clip.intersect(fCullRect) ? clip : Bounds::MakeEmpty();
} else {
fCurrentClipBounds = fCullRect;
}
}