23 return (
unsigned)(c -
min) <= (
unsigned)(
max -
min);
26static inline bool is_ws(
int c) {
35 return is_ws(c) || c ==
',';
46static const char*
skip_ws(
const char str[]) {
65 bool isRelative,
SkPoint* relative) {
68 for (
int index = 0; index <
count; index++) {
69 value[index].fX += relative->
fX;
70 value[index].fY += relative->
fY;
79 bool isRelative,
SkScalar relative) {
99 if (str[0] !=
'1' && str[0] !=
'0') {
102 *
value = str[0] !=
'0';
121 char previousOp =
'\0';
122 bool relative =
false;
129 if (
data[0] ==
'\0') {
133 if (
is_digit(ch) || ch ==
'-' || ch ==
'+' || ch ==
'.') {
134 if (op ==
'\0' || op ==
'Z') {
171 path.lineTo(scratch, c.
fY);
176 path.lineTo(c.
fX, scratch);
185 if (previousOp ==
'C' || previousOp ==
'S') {
196 goto quadraticCommon;
200 if (previousOp ==
'Q' || previousOp ==
'T') {
212 bool largeArc, sweep;
234 if (previousOp == 0) {
252 const auto append_command = [&](
char cmd,
const SkPoint pts[],
size_t count) {
254 cmd += 32 * rel_selector;
257 for (
size_t i = 0;
i <
count; ++
i) {
258 const auto pt = pts[
i] - current_point;
262 stream.writeScalarAsText(pt.fX);
264 stream.writeScalarAsText(pt.fY);
269 current_point = pts[
count - 1] * rel_selector;
276 switch (iter.
next(pts)) {
282 append_command(
'Q', &quadPts[
i*2 + 1], 2);
286 append_command(
'M', &pts[0], 1);
289 append_command(
'L', &pts[1], 1);
292 append_command(
'Q', &pts[1], 2);
295 append_command(
'C', &pts[1], 3);
static const int points[]
static bool is_sep(int c)
static const char * skip_sep(const char str[])
static int to_upper(int c)
static bool is_digit(int c)
static const char * find_flag(const char str[], bool *value)
static const char * skip_ws(const char str[])
static bool is_between(int c, int min, int max)
static const char * find_scalar(const char str[], SkScalar *value, bool isRelative, SkScalar relative)
static const char * find_points(const char str[], SkPoint value[], int count, bool isRelative, SkPoint *relative)
static bool is_lower(int c)
const SkPoint * computeQuads(const SkConic &conic, SkScalar tol)
static SkString ToSVGString(const SkPath &, PathEncoding=PathEncoding::Absolute)
static bool FromSVGString(const char str[], SkPath *)
static const char * FindScalar(const char str[], SkScalar *value)
static const char * FindScalars(const char str[], SkScalar value[], int count)
Verb next(SkPoint pts[4])
SkScalar conicWeight() const
const char * data() const
static float max(float r, float g, float b)
static float min(float r, float g, float b)
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
std::shared_ptr< const fml::Mapping > data