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


C++ Bounds::intersect方法代码示例

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

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


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