Go to the source code of this file.
|
static void | compose_pe (SkPaint *paint) |
|
static void | hair_pe (SkPaint *paint) |
|
static void | hair2_pe (SkPaint *paint) |
|
static void | stroke_pe (SkPaint *paint) |
|
static void | dash_pe (SkPaint *paint) |
|
static void | scale (SkPath *path, SkScalar scale) |
|
static void | one_d_pe (SkPaint *paint) |
|
static void | fill_pe (SkPaint *paint) |
|
static void | discrete_pe (SkPaint *paint) |
|
static sk_sp< SkPathEffect > | MakeTileEffect () |
|
static void | tile_pe (SkPaint *paint) |
|
static void | patheffect_slide (SkCanvas *canvas) |
|
static sk_sp< SkShader > | MakeLinear (const SkPoint pts[2], const GradData &data, SkTileMode tm) |
|
static sk_sp< SkShader > | MakeRadial (const SkPoint pts[2], const GradData &data, SkTileMode tm) |
|
static sk_sp< SkShader > | MakeSweep (const SkPoint pts[2], const GradData &data, SkTileMode tm) |
|
static sk_sp< SkShader > | Make2Conical (const SkPoint pts[2], const GradData &data, SkTileMode tm) |
|
static void | gradient_slide (SkCanvas *canvas) |
|
static sk_sp< SkShader > | make_shader0 (SkIPoint *size) |
|
static sk_sp< SkShader > | make_shader1 (const SkIPoint &size) |
|
static void | make_tris (Rec *rec) |
|
static void | make_fan (Rec *rec, int texWidth, int texHeight) |
|
static void | make_strip (Rec *rec, int texWidth, int texHeight) |
|
static void | mesh_slide (SkCanvas *canvas) |
|
◆ BG_COLOR
#define BG_COLOR 0xFFDDDDDD |
◆ GradMaker
◆ PE_Proc
typedef void(* PE_Proc) (SkPaint *) |
◆ SlideProc
◆ compose_pe()
static void compose_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 30 of file SlidesSlide.cpp.
30 {
34 if (pe) {
36 } else {
37 compose = corner;
38 }
39 paint->setPathEffect(compose);
40}
sk_sp< T > sk_ref_sp(T *obj)
static sk_sp< SkPathEffect > Make(SkScalar radius)
static sk_sp< SkPathEffect > MakeCompose(sk_sp< SkPathEffect > outer, sk_sp< SkPathEffect > inner)
◆ dash_pe()
static void dash_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 56 of file SlidesSlide.cpp.
56 {
57 SkScalar inter[] = { 20, 10, 10, 10 };
58 paint->setStrokeWidth(12);
61}
static void compose_pe(SkPaint *paint)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
◆ discrete_pe()
static void discrete_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 95 of file SlidesSlide.cpp.
95 {
97}
static sk_sp< SkPathEffect > Make(SkScalar segLength, SkScalar dev, uint32_t seedAssist=0)
◆ fill_pe()
static void fill_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 90 of file SlidesSlide.cpp.
90 {
92 paint->setPathEffect(
nullptr);
93}
@ kFill_Style
set to fill geometry
◆ gradient_slide()
static void gradient_slide |
( |
SkCanvas * |
canvas | ) |
|
|
static |
Definition at line 212 of file SlidesSlide.cpp.
212 {
214 { 0, 0 },
216 };
220 paint.setAntiAlias(
true);
221 paint.setDither(
true);
222
224 for (
size_t i = 0; i < std::size(
gGradData); i++) {
226 for (
size_t j = 0; j < std::size(
gGradMakers); j++) {
230 }
233 }
234}
static const GradData gGradData[]
static const GradMaker gGradMakers[]
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
◆ hair2_pe()
static void hair2_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
◆ hair_pe()
static void hair_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
◆ Make2Conical()
Definition at line 196 of file SlidesSlide.cpp.
196 {
203 center0, (pts[1].fX - pts[0].fX) / 2,
205}
#define SkScalarAve(a, b)
static SkScalar SkScalarInterp(SkScalar A, SkScalar B, SkScalar t)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
void set(float x, float y)
◆ make_fan()
static void make_fan |
( |
Rec * |
rec, |
|
|
int |
texWidth, |
|
|
int |
texHeight |
|
) |
| |
|
static |
Definition at line 285 of file SlidesSlide.cpp.
285 {
288 const int n = 24;
289
291 rec->fCount = n + 2;
292 rec->fVerts =
new SkPoint[rec->fCount];
293 rec->fTexs =
new SkPoint[rec->fCount];
294
297
300 for (int i = 0; i < n; i++) {
304 v[i+1].
set(cos, sin);
305 t[i+1].
set(i*tx/n, ty);
306 }
307 v[n+1] = v[1];
309
313 m.mapPoints(v, rec->fCount);
314}
#define SkScalarSin(radians)
#define SkScalarCos(radians)
@ kTriangleFan_VertexMode
◆ make_shader0()
Definition at line 243 of file SlidesSlide.cpp.
243 {
248}
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
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
◆ make_shader1()
Definition at line 250 of file SlidesSlide.cpp.
250 {
256}
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
PODArray< SkColor > colors
◆ make_strip()
static void make_strip |
( |
Rec * |
rec, |
|
|
int |
texWidth, |
|
|
int |
texHeight |
|
) |
| |
|
static |
Definition at line 316 of file SlidesSlide.cpp.
316 {
319 const int n = 24;
320
322 rec->fCount = 2 * (n + 1);
323 rec->fVerts =
new SkPoint[rec->fCount];
324 rec->fTexs =
new SkPoint[rec->fCount];
325
328
329 for (int i = 0; i < n; i++) {
333 v[i*2 + 0].
set(cos/2, sin/2);
334 v[i*2 + 1].
set(cos, sin);
335
336 t[i*2 + 0].
set(tx * i / n, ty);
337 t[i*2 + 1].
set(tx * i / n, 0);
338 }
339 v[2*n + 0] = v[0];
340 v[2*n + 1] = v[1];
341
342 t[2*n + 0].
set(tx, ty);
343 t[2*n + 1].
set(tx, 0);
344
348 m.mapPoints(v, rec->fCount);
349}
@ kTriangleStrip_VertexMode
◆ make_tris()
static void make_tris |
( |
Rec * |
rec | ) |
|
|
static |
Definition at line 269 of file SlidesSlide.cpp.
269 {
270 int n = 10;
272
274 rec->fCount = n * 3;
275 rec->fVerts =
new SkPoint[rec->fCount];
276
277 for (int i = 0; i < n; i++) {
278 SkPoint* v = &rec->fVerts[i*3];
279 for (int j = 0; j < 3; j++) {
281 }
282 }
283}
◆ MakeLinear()
◆ MakeRadial()
Definition at line 181 of file SlidesSlide.cpp.
181 {
187}
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
◆ MakeSweep()
Definition at line 189 of file SlidesSlide.cpp.
189 {
194}
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
◆ MakeTileEffect()
Definition at line 99 of file SlidesSlide.cpp.
99 {
102
105
107}
static sk_sp< SkPathEffect > Make(const SkMatrix &matrix, const SkPath &path)
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
◆ mesh_slide()
static void mesh_slide |
( |
SkCanvas * |
canvas | ) |
|
|
static |
Definition at line 351 of file SlidesSlide.cpp.
351 {
352 Rec fRecs[3];
354
357
361
363 paint.setDither(
true);
364
365 for (size_t i = 0; i < std::size(fRecs); i++) {
367 fRecs[i].fVerts, fRecs[i].fTexs, nullptr);
369
370 paint.setShader(
nullptr);
372
374
375 paint.setShader(fShader0);
377
379
380 paint.setShader(fShader1);
383
385 }
386}
static sk_sp< SkShader > make_shader0(SkIPoint *size)
static void make_strip(Rec *rec, int texWidth, int texHeight)
static void make_fan(Rec *rec, int texWidth, int texHeight)
static sk_sp< SkShader > make_shader1(const SkIPoint &size)
static void make_tris(Rec *rec)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
static sk_sp< SkVertices > MakeCopy(VertexMode mode, int vertexCount, const SkPoint positions[], const SkPoint texs[], const SkColor colors[], int indexCount, const uint16_t indices[])
◆ one_d_pe()
static void one_d_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 73 of file SlidesSlide.cpp.
73 {
76 for (
unsigned i = 2; i < std::size(
gXY); i += 2)
81
85}
static sk_sp< SkPathEffect > Make(const SkPath &path, SkScalar advance, SkScalar phase, Style)
◆ patheffect_slide()
static void patheffect_slide |
( |
SkCanvas * |
canvas | ) |
|
|
static |
Definition at line 115 of file SlidesSlide.cpp.
115 {
117 paint.setAntiAlias(
true);
119
122 path.lineTo(70, 120);
123 path.lineTo(120, 30);
124 path.lineTo(170, 80);
125 path.lineTo(240, 50);
126
127 size_t i;
129 for (i = 0; i < std::size(
gPE); i++) {
133 }
135
137 SkRect r = { 0, 0, 250, 120 };
141
143 for (i = 0; i < std::size(
gPE2); i++) {
147 }
148}
static const PE_Proc gPE2[]
static const PE_Proc gPE[]
void drawPath(const SkPath &path, const SkPaint &paint)
@ kStroke_Style
set to stroke geometry
void inset(float dx, float dy)
◆ scale()
◆ stroke_pe()
static void stroke_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
◆ tile_pe()
static void tile_pe |
( |
SkPaint * |
paint | ) |
|
|
static |
Definition at line 109 of file SlidesSlide.cpp.
109 {
111}
static sk_sp< SkPathEffect > MakeTileEffect()
◆ gColors
Initial value:= {
}
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
Definition at line 160 of file SlidesSlide.cpp.
◆ gGradData
Initial value:= {
}
static const SkScalar gPos2[]
static const SkScalar gPos1[]
static const SkScalar gPos0[]
static const SkColor gColors[]
Definition at line 169 of file SlidesSlide.cpp.
◆ gGradMakers
Initial value:= {
}
static sk_sp< SkShader > Make2Conical(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static sk_sp< SkShader > MakeSweep(const SkPoint pts[2], const GradData &data, SkTileMode tm)
static sk_sp< SkShader > MakeRadial()
static sk_sp< SkShader > MakeLinear()
Definition at line 208 of file SlidesSlide.cpp.
◆ gPE
Definition at line 88 of file SlidesSlide.cpp.
static void one_d_pe(SkPaint *paint)
static void hair_pe(SkPaint *paint)
static void stroke_pe(SkPaint *paint)
static void dash_pe(SkPaint *paint)
static void hair2_pe(SkPaint *paint)
◆ gPE2
Definition at line 113 of file SlidesSlide.cpp.
static void fill_pe(SkPaint *paint)
static void tile_pe(SkPaint *paint)
static void discrete_pe(SkPaint *paint)
◆ gPos0
◆ gPos1
◆ gPos2
◆ gProc
Initial value:= {
}
static void mesh_slide(SkCanvas *canvas)
static void gradient_slide(SkCanvas *canvas)
static void patheffect_slide(SkCanvas *canvas)
Definition at line 395 of file SlidesSlide.cpp.
◆ gXY
Initial value:= {
4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
}
Definition at line 63 of file SlidesSlide.cpp.
63 {
644, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
65};