31 const SkPoint pts[] = { { 100.f / 4.f, 0.f }, { 3.f * 100.f / 4.f, 100.f } };
50 paint.setStrokeWidth(0.5f);
51 SkPoint corners[4] = { bottom[0], bottom[3], top[0], top[3] };
62 paint.setStrokeWidth(2);
83 {100,100},{150,50},{250,150}, {300,100},
87 {300,300},{250,250},{150,350},{100,300},
93 {0.0f, 0.0f}, {100.0f, 0.0f}, {100.0f,100.0f}, {0.0f, 100.0f}
116 texStorage[0].
set(0, 0);
117 texStorage[1].
set(
w, 0);
118 texStorage[2].
set(
w,
h);
119 texStorage[3].
set(0,
h);
126 for (
int y = 0;
y < 3;
y++) {
127 for (
int x = 0;
x < 4;
x++) {
138 paint.setShader(shader);
140 paint.setShader(
nullptr);
143 paint.setShader(shader);
145 paint.setShader(
nullptr);
176 localM[6] = 0.00001f;
188 canvas->translate(-75, -75);
191 0x80FF0000, 0x80FF0000, 0x80FF0000, 0x80FF0000,
196 canvas->translate(300, 0);
@ kColorDodge
brighten destination to reflect source
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void drawPatch(const SkPoint cubics[12], const SkColor colors[4], const SkPoint texCoords[4], SkBlendMode mode, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
@ kLines_PointMode
draw each pair of points as a line segment
@ kPoints_PointMode
draw each point separately
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)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
static void GetTopCubic(const SkPoint cubics[12], SkPoint points[4])
static void GetRightCubic(const SkPoint cubics[12], SkPoint points[4])
static void GetLeftCubic(const SkPoint cubics[12], SkPoint points[4])
static void GetBottomCubic(const SkPoint cubics[12], SkPoint points[4])
PODArray< SkColor > colors
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
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
SkSamplingOptions(SkFilterMode::kLinear))
static void dopatch(SkCanvas *canvas, const SkColor colors[], sk_sp< SkImage > img, const SkMatrix *localMatrix)
const SkPoint gTexCoords[SkPatchUtils::kNumCorners]
DEF_SIMPLE_GM(patch_primitive, canvas, 1500, 1100)
const SkPoint gCubics[SkPatchUtils::kNumCtrlPts]
static sk_sp< SkShader > make_shader()
static void draw_control_points(SkCanvas *canvas, const SkPoint cubics[12])
void set(float x, float y)