Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
ClipSlide Class Reference
Inheritance diagram for ClipSlide:
Slide SkRefCnt SkRefCntBase

Public Member Functions

 ClipSlide ()
 
void draw (SkCanvas *canvas) override
 
- Public Member Functions inherited from Slide
virtual SkISize getDimensions () const
 
virtual void gpuTeardown ()
 
virtual void draw (SkCanvas *canvas)=0
 
virtual bool animate (double nanos)
 
virtual void load (SkScalar winWidth, SkScalar winHeight)
 
virtual void resize (SkScalar winWidth, SkScalar winHeight)
 
virtual void unload ()
 
virtual bool onChar (SkUnichar c)
 
virtual bool onMouse (SkScalar x, SkScalar y, skui::InputState state, skui::ModifierKey modifiers)
 
virtual bool onGetControls (SkMetaData *)
 
virtual void onSetControls (const SkMetaData &)
 
const SkStringgetName ()
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Additional Inherited Members

- Protected Attributes inherited from Slide
SkString fName
 

Detailed Description

Definition at line 105 of file ClipSlide.cpp.

Constructor & Destructor Documentation

◆ ClipSlide()

ClipSlide::ClipSlide ( )
inline

Definition at line 107 of file ClipSlide.cpp.

107{ fName = "Clip"; }
SkString fName
Definition: Slide.h:54

Member Function Documentation

◆ draw()

void ClipSlide::draw ( SkCanvas canvas)
inlineoverridevirtual

Implements Slide.

Definition at line 109 of file ClipSlide.cpp.

109 {
110 canvas->drawColor(SK_ColorWHITE);
111 canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
112
113 static const CanvasProc gProc[] = {
115 };
116
117 SkRect r = { 0, 0, SkIntToScalar(W), SkIntToScalar(H) };
118 r.inset(SK_Scalar1 / 4, SK_Scalar1 / 4);
120
121// clipPath.toggleInverseFillType();
122
123 for (int aa = 0; aa <= 1; ++aa) {
124 canvas->save();
125 for (size_t i = 0; i < std::size(gProc); ++i) {
126 canvas->save();
128// canvas->drawColor(SK_ColorWHITE);
129 gProc[i](canvas, SkToBool(aa));
130 canvas->restore();
131 canvas->translate(W * SK_Scalar1 * 8 / 7, 0);
132 }
133 canvas->restore();
134 canvas->translate(0, H * SK_Scalar1 * 8 / 7);
135 }
136 }
void(* CanvasProc)(SkCanvas *, bool)
Definition: ClipSlide.cpp:103
constexpr int W
Definition: ClipSlide.cpp:23
static void show_thick(SkCanvas *canvas, bool doAA)
Definition: ClipSlide.cpp:99
static void show_fill(SkCanvas *canvas, bool doAA)
Definition: ClipSlide.cpp:39
static void show_text(SkCanvas *canvas, bool doAA)
Definition: ClipSlide.cpp:26
static void show_hair(SkCanvas *canvas, bool doAA)
Definition: ClipSlide.cpp:95
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
#define SK_Scalar1
Definition: SkScalar.h:18
#define SkIntToScalar(x)
Definition: SkScalar.h:57
static constexpr bool SkToBool(const T &x)
Definition: SkTo.h:35
static const SlideProc gProc[]
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
Definition: SkCanvas.h:1182
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1456
int save()
Definition: SkCanvas.cpp:447
SkPathBuilder & addRRect(const SkRRect &, SkPathDirection, unsigned startIndex)
Definition: SkPath.h:59
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
Definition: SkRRect.h:180
clipPath(r.path, r.opAA.op(), r.opAA.aa())) DRAW(ClipRRect
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
Definition: SkMD5.cpp:130
void inset(float dx, float dy)
Definition: SkRect.h:1060

The documentation for this class was generated from the following file: