68 paint.setAntiAlias(
true);
70 paint.setStrokeWidth(2);
71 paint.setColor(0xFF660000);
75 for (
SkScalar angle = 0; angle <= 45; angle += 45) {
76 for (
int oHeight = 2; oHeight >= 1; --oHeight) {
93 paint.setStrokeWidth(5);
94 const SkColor purple = 0xFF800080;
95 const SkColor darkgreen = 0xFF008000;
97 const char* arcstrs[] = {
98 "M250,400 A120,80 0 0,0 250,500",
99 "M250,400 A120,80 0 1,1 250,500",
100 "M250,400 A120,80 0 1,0 250,500",
101 "M250,400 A120,80 0 0,1 250,500"
104 for (
const char* arcstr : arcstrs) {
114 path.moveTo(100, 100)
118 path.moveTo(200, 100)
146const char gWhiteSpace[] = { 0, 0, 0, 0, 0, 0, 0, 0,
' ',
' ',
' ',
' ', 0x09, 0x0D, 0x0A };
154 for (
int rep = 0; rep < reps; ++rep) {
192 for (
int rep = 0; rep < reps; ++rep) {
193 for (
int index = 0; index < legal.
fScalars; ++index) {
197 if (rep < reps - 1 && index < legal.
fScalars - 1) {
202 if (
'A' == legal.
fSymbol && 1 == index) {
226 paint.setAntiAlias(
true);
231 str.
printf(
"<g transform='translate(%d,%d) scale(%d,%d)'>\n", xStart, yStart,
234 str.
printf(
"<clipPath id='clip_%d_%d'>\n", xStart, yStart);
236 str.
printf(
"<rect width='100' height='100' x='0' y='0'></rect>\n");
238 str.
printf(
"</clipPath>\n");
258 str.
printf(
"<path d='\n");
261 str.
printf(
"\n' fill='#%06x' fill-opacity='%g'",
paint.getColor() & 0xFFFFFF,
262 paint.getAlpha() / 255.f);
264 str.
printf(
" clip-path='url(#clip_%d_%d)'/>\n", xStart, yStart);
267 }
while (--
count > 0);
272 canvas->translate(0, 100);
275 canvas->translate(100, 0);
278 const char trailer[] =
"</svg>\n";
285 canvas->translate(111, 0);
288 p.moveTo(-43.44464063610148f, 79.43535936389853f);
292 p.arcTo(
oval, 1.25f * 180, .5f * 180,
false);
297 paint.setStrokeWidth(15.36f);
299 canvas->drawPath(
p.detach(),
paint);
303 const char*
d=
"M60,60 A50,50 0 0 0 160,60 A50,50 0 0 0 60,60z";
306 p.setStrokeWidth(100);
307 p.setAntiAlias(
true);
308 p.setColor(0xFF008200);
317 canvas->drawPath(
path,
p);
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
FILE * sk_fopen(const char path[], SkFILE_Flags)
size_t sk_fwrite(const void *buffer, size_t byteCount, FILE *)
@ kParsePathTestDimension
static void add_some_white(SkRandom *rand, SkString *atom)
static void add_comma(SkRandom *rand, SkString *atom)
static constexpr bool GENERATE_SVG_REFERENCE
DEF_SIMPLE_GM(arcto, canvas, 500, 600)
const struct Legal gLegal[]
static SkString make_random_svg_path(SkRandom *rand)
static void add_white(SkRandom *rand, SkString *atom)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
@ kStroke_Style
set to stroke geometry
static bool FromSVGString(const char str[], SkPath *)
SkPathBuilder & arcTo(const SkRect &oval, SkScalar startAngleDeg, SkScalar sweepAngleDeg, bool forceMoveTo)
SkPathBuilder & moveTo(SkPoint pt)
@ kSmall_ArcSize
smaller of arc pair
@ kLarge_ArcSize
larger of arc pair
float nextRangeF(float min, float max)
uint32_t nextRangeU(uint32_t min, uint32_t max)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void append(const char text[])
void appendScalar(SkScalar value)
void appendU32(uint32_t value)
const char * c_str() const
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
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
SkScalar fLeft
smaller x-axis bounds
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
void offset(float dx, float dy)
constexpr float height() const
constexpr float right() const
constexpr float width() const
constexpr float bottom() const
SkScalar fTop
smaller y-axis bounds