Flutter Engine
The Flutter Engine
Point_Offset.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(Point_Offset, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 paint.setAntiAlias(true);
8 SkPoint points[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 },
9 { 6, 4 }, { 7, 5 }, { 5, 7 },
10 { 4, 6 }, { 3, 7 }, { 1, 5 },
11 { 2, 4 }, { 1, 3 }, { 3, 1 } };
12 canvas->scale(30, 15);
17}
18} // END FIDDLE
static const int points[]
REG_FIDDLE(Point_Offset, 256, 256, false, 0)
Definition: Point_Offset.cpp:4
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
Definition: SkCanvas.cpp:1710
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
@ kPolygon_PointMode
draw the array of points as a open polygon
Definition: SkCanvas.h:1243
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
const Paint & paint
Definition: color_source.cc:38
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
static void Offset(SkPoint points[], int count, const SkVector &offset)
Definition: SkPoint_impl.h:247