36 data->origin = origin;
37 data->requiredClip.setRect(canvasBounds);
38 data->ownedCanvas = std::move(canvas);
44 SkIRect localBounds = canvasBounds;
45 localBounds.
offset(origin - fCanvasData[
i-1].origin);
48 fList[
i-1]->clipRegion(fCanvasData[
i-1].requiredClip);
64void SkCanvasStack::clipToZOrderedBounds() {
67 fList[
i]->clipRegion(fCanvasData[
i].requiredClip);
89 this->clipToZOrderedBounds();
94 this->clipToZOrderedBounds();
99 this->clipToZOrderedBounds();
111 deviceRgn.
translate(-fCanvasData[
i].origin.x(),
112 -fCanvasData[
i].origin.y(), &tempRegion);
114 fList[
i]->clipRegion(tempRegion, op);
~SkCanvasStack() override
void pushCanvas(std::unique_ptr< SkCanvas >, const SkIPoint &origin)
void didSetM44(const SkM44 &) override
void removeAll() override
void onClipRegion(const SkRegion &, SkClipOp) override
void onClipRRect(const SkRRect &, SkClipOp, ClipEdgeStyle) override
void onClipShader(sk_sp< SkShader >, SkClipOp) override
void onClipRect(const SkRect &, SkClipOp, ClipEdgeStyle) override
void onClipPath(const SkPath &, SkClipOp, ClipEdgeStyle) override
SkCanvasStack(int width, int height)
virtual void didSetM44(const SkM44 &)
virtual void onClipRegion(const SkRegion &deviceRgn, SkClipOp op)
static SkM44 Translate(SkScalar x, SkScalar y, SkScalar z=0)
virtual void addCanvas(SkCanvas *)
void onClipRect(const SkRect &, SkClipOp, ClipEdgeStyle) override
void onClipRRect(const SkRRect &, SkClipOp, ClipEdgeStyle) override
SkTDArray< SkCanvas * > fList
void onClipPath(const SkPath &, SkClipOp, ClipEdgeStyle) override
void onClipShader(sk_sp< SkShader >, SkClipOp) override
void translate(int dx, int dy)
@ kIntersect_Op
target intersected with operand
@ kDifference_Op
target minus operand
bool op(const SkIRect &rect, Op op)
static constexpr SkIRect MakeSize(const SkISize &size)
void offset(int32_t dx, int32_t dy)
std::shared_ptr< const fml::Mapping > data