|
| PathSlide () |
|
void | load (SkScalar w, SkScalar h) override |
|
void | drawPath (SkCanvas *canvas, const SkPath &path, SkPaint::Join j) |
|
void | draw (SkCanvas *canvas) override |
|
bool | animate (double nanos) override |
|
Click * | onFindClickHandler (SkScalar x, SkScalar y, skui::ModifierKey modi) override |
|
bool | onClick (ClickHandlerSlide::Click *) override |
|
Public Member Functions inherited from ClickHandlerSlide |
bool | onMouse (SkScalar x, SkScalar y, skui::InputState clickState, skui::ModifierKey modifierKeys) final |
|
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 SkString & | getName () |
|
| SkRefCntBase () |
|
virtual | ~SkRefCntBase () |
|
bool | unique () const |
|
void | ref () const |
|
void | unref () const |
|
Definition at line 76 of file PathSlide.cpp.
◆ PathSlide()
◆ animate()
bool PathSlide::animate |
( |
double |
nanos | ) |
|
|
inlineoverridevirtual |
Reimplemented from Slide.
Definition at line 172 of file PathSlide.cpp.
172 {
175 fPrevSecs = currSecs;
176
177 fStroke += fDStroke *
delta;
178 if (fStroke > fMaxStroke || fStroke < fMinStroke) {
179 fDStroke = -fDStroke;
180 }
181 return true;
182 }
static float Scaled(float time, float speed, float period=0)
◆ draw()
void PathSlide::draw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverridevirtual |
Implements Slide.
Definition at line 149 of file PathSlide.cpp.
149 {
150 canvas->
clear(0xFFDDDDDD);
151
153
158 };
159
162 for (
size_t j = 0; j <
std::size(fPath); j++) {
163 this->
drawPath(canvas, fPath[j], gJoins[
i]);
165 }
167
169 }
170 }
void drawPath(SkCanvas *canvas, const SkPath &path, SkPaint::Join j)
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
@ kMiter_Join
extends to miter limit
@ kBevel_Join
connects outside edges
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
◆ drawPath()
Definition at line 126 of file PathSlide.cpp.
126 {
128
129 paint.setAntiAlias(
true);
131 paint.setStrokeJoin(j);
132 paint.setStrokeWidth(fStroke);
133
134 if (fShowHairline) {
136
138 paint.setStrokeWidth(0);
140 } else {
142 }
143
145 paint.setStrokeWidth(0);
147 }
constexpr SkColor SK_ColorRED
void drawPath(const SkPath &path, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
◆ load()
Reimplemented from Slide.
Definition at line 88 of file PathSlide.cpp.
88 {
91
92 fShowHairline = false;
93
94 fDStroke = 1;
95 fStroke = 10;
96 fMinStroke = 10;
97 fMaxStroke = 180;
98
100
104
108
112
116
120
124 }
static void test_cubic2()
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
T __attribute__((ext_vector_type(N))) V
◆ onClick()
◆ onFindClickHandler()
Return a Click object to handle the click. onClick will be called repeatedly with the latest mouse state tracked on the Click object until it returns false.
Implements ClickHandlerSlide.
Definition at line 184 of file PathSlide.cpp.
184 {
185 fShowHairline = !fShowHairline;
186 return nullptr;
187 }
The documentation for this class was generated from the following file: