Skia
2D Graphics Library
SkSGPlane.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
8 #ifndef SkSGPlane_DEFINED
9 #define SkSGPlane_DEFINED
10 
12 
13 class SkCanvas;
14 class SkPaint;
15 
16 namespace sksg {
17 
21 class Plane final : public GeometryNode {
22 public:
23  static sk_sp<Plane> Make() { return sk_sp<Plane>(new Plane()); }
24 
25 protected:
26  void onClip(SkCanvas*, bool antiAlias) const override;
27  void onDraw(SkCanvas*, const SkPaint&) const override;
28  bool onContains(const SkPoint&) const override;
29 
31  SkPath onAsPath() const override;
32 
33 private:
34  Plane();
35 
36  using INHERITED = GeometryNode;
37 };
38 
39 } // namespace sksg
40 
41 #endif // SkSGPlane_DEFINED
SkCanvas provides an interface for drawing, and how the drawing is clipped and transformed.
Definition: SkCanvas.h:99
SkMatrix holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:53
SkPaint controls options applied when drawing.
Definition: SkPaint.h:44
SkPath contain geometry.
Definition: SkPath.h:58
Shared pointer class to wrap classes that support a ref()/unref() interface.
Definition: SkRefCnt.h:220
Base class for nodes which provide 'geometry' (as opposed to paint) for drawing.
Definition: SkSGGeometryNode.h:25
Receiver for invalidation events.
Definition: SkSGInvalidationController.h:25
Base class for all scene graph nodes.
Definition: SkSGNode.h:32
Concrete Geometry node, representing the whole canvas.
Definition: SkSGPlane.h:21
static sk_sp< Plane > Make()
Definition: SkSGPlane.h:23
bool onContains(const SkPoint &) const override
void onDraw(SkCanvas *, const SkPaint &) const override
SkPath onAsPath() const override
SkRect onRevalidate(InvalidationController *, const SkMatrix &) override
void onClip(SkCanvas *, bool antiAlias) const override
Definition: Skottie.h:30
SkRect holds four float coordinates describing the upper and lower bounds of a rectangle.
Definition: SkRect.h:582