29 {{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
30 {{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
32 {{{{5.1114602088928223, 628.77813720703125},
33 {10.834027290344238, 988.964111328125},
34 {163.40835571289062, 988.964111328125}}}, 0.72944212f},
35 {{{{163.40835571289062, 988.964111328125},
36 {5, 988.964111328125},
37 {5, 614.7423095703125}}}, 0.707106769f},
39 {{{{11.17222976684570312, -8.103978157043457031},
40 {22.91432571411132812, -10.37866020202636719},
41 {23.7764129638671875, -7.725424289703369141}}}, 1.00862849f},
42 {{{{-1.545085430145263672, -4.755282402038574219},
43 {22.23132705688476562, -12.48070907592773438},
44 {23.7764129638671875, -7.725427150726318359}}}, 0.707106769f},
46 {{{{-4,1}, {-4,5}, {0,5}}}, 0.707106769f},
47 {{{{-3,4}, {-3,1}, {0,1}}}, 0.707106769f},
49 {{{{0, 0}, {0, 1}, {1, 1}}}, 0.5f},
50 {{{{1, 0}, {0, 0}, {0, 1}}}, 0.5f},
59 for (
int cIndex = 0; cIndex < 2; ++cIndex) {
60 for (
int pIndex = 0; pIndex < 3; ++pIndex) {
62 up.
set(chopped[cIndex].
fPts[pIndex]);
63 SkASSERT(dChopped[cIndex].
fPts[pIndex].approximatelyEqual(up));
66#if DEBUG_VISUALIZE_CONICS
72#define DEBUG_VISUALIZE_CONICS 0
74#if DEBUG_VISUALIZE_CONICS
84 for (
int index = 0; index < 3; ++index) {
87 for (
int chIndex = 0; chIndex < 2; ++chIndex) {
93 chopped[0].
fW = ch[0].
fW;
94 chopped[1].
fW = ch[1].
fW;
103 paint.setAntiAlias(
true);
110 paint.setARGB(0x80, 0xFF, 0, 0);
114 path.conicTo(chopped[0].
fPts[1], chopped[0].
fPts[2], chopped[0].fW);
116 path.conicTo(chopped[1].
fPts[1], chopped[1].
fPts[2], chopped[1].fW);
117 paint.setARGB(0x80, 0, 0, 0xFF);
119 SkString filename(
"c:\\Users\\caryclark\\Documents\\");
124static void writeDPng(
const SkDConic& dC,
const char*
name) {
141 paint.setAntiAlias(
true);
146 path.moveTo(dConic.
fPts[0].asSkPoint());
148 paint.setARGB(0x80, 0xFF, 0, 0);
152 for (
int tIndex = 0; tIndex < chops; ++tIndex) {
154 (tIndex + 1) / (
double) chops);
155 path.moveTo(chopped.
fPts[0].asSkPoint());
158 paint.setARGB(0x80, 0, 0, 0xFF);
160 SkString filename(
"c:\\Users\\caryclark\\Documents\\");
161 filename.appendf(
"%s.png",
name);
168 for (
int index = 0; index < 3; ++index) {
169 conic.fPts[index] = dConic.
fPts[index].asSkPoint();
179#if DEBUG_VISUALIZE_CONICS
183#if DEBUG_VISUALIZE_CONICS
188#if DEBUG_VISUALIZE_CONICS
190{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
191{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
195{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
196{{{{306.58801299999999, -227.983994}, {212.46499600000001, -262.24200400000001}, {95.551200899999998, 58.976398500000002}}}, 0.707107008f},
197{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f},
198{{{{134.08399674208422, -155.06258330544892}, {30.390000629402859, -143.55685905168704}, {23.185499199999999, -102.697998}}}, 0.923879623f},
202{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
203{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
204{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f},
205{{{{377.21899400000001, -141.98100299999999}, {237.77799285476553, -166.56830755921084}, {134.08399674208422, -155.06258330544892}}}, 0.788580656f},
209{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
210{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
211{{{{205.78973252799028, -158.12538713371103}, {143.97848953841861, -74.076645245042371}, {95.551200899999998, 58.976398500000002}}}, 0.923879623f},
212{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f},
216{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
217{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
218{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f},
219{{{{252.08225670812539, -156.90491625851064}, {185.93099479842493, -160.81544543232982}, {134.08399674208422, -155.06258330544892}}}, 0.835816324f},
223{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
224{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
225{{{{205.78973252799028, -158.12538713371103}, {174.88411103320448, -116.10101618937664}, {145.19509369736275, -56.857102571363754}}}, 0.871667147f},
226{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f},
230{{{{306.588013,-227.983994}, {212.464996,-262.242004}, {95.5512009,58.9763985}}}, 0.707107008f},
231{{{{377.218994,-141.981003}, {40.578701,-201.339996}, {23.1854992,-102.697998}}}, 0.707107008f},
232{{{{205.78973252799028, -158.12538713371103}, {190.33692178059735, -137.11320166154385}, {174.87004877564593, -111.2132534799228}}}, 0.858117759f},
233{{{{252.08225670812539, -156.90491625851064}, {219.70109133058406, -158.81912754088933}, {190.17095392508796, -158.38373974664466}}}, 0.858306944f},
237 frame0, frame1, frame2, frame3, frame4, frame5, frame6
246static void writeFrames() {
249 for (
int index = 0; index < (
int)
std::size(frameSizes); ++index) {
251 bool boundsSet =
false;
252 int frameSize = frameSizes[index];
253 for (
int fIndex = 0; fIndex < frameSize; ++fIndex) {
254 const SkDConic& dC = frames[index][fIndex];
278 paint.setAntiAlias(
true);
282 for (
int fIndex = 0; fIndex < frameSize; ++fIndex) {
283 const SkDConic& dC = frames[index][fIndex];
288 path.moveTo(dConic.
fPts[0].asSkPoint());
291 paint.setARGB(0x80, 0xFF, 0, 0);
293 paint.setARGB(0x80, 0, 0, 0xFF);
297 SkString filename(
"c:\\Users\\caryclark\\Documents\\");
298 filename.appendf(
"f%d.png", index);
306#if DEBUG_VISUALIZE_CONICS
314#if DEBUG_VISUALIZE_CONICS
325 for (
int pt3 = 0; pt3 < intersections.
used(); ++pt3) {
326 tt1 = intersections[0][pt3];
328 tt2 = intersections[1][pt3];
345 for (
int outer = 0; outer <
testSetCount - 1; ++outer) {
346 for (
int inner = outer + 1; inner <
testSetCount; ++inner) {
static void chopBothWays(const SkDConic &dConic, double t, const char *name)
static const ConicPts testSet[]
static void oneOff(skiatest::Reporter *reporter, const ConicPts &conic1, const ConicPts &conic2, bool coin)
static void oneOffTests(skiatest::Reporter *reporter)
DEF_TEST(PathOpsConicIntersectionOneOff, reporter)
static void chopCompare(const SkConic chopped[2], const SkDConic dChopped[2])
bool ValidConic(const SkDConic &conic)
constexpr SkColor SK_ColorWHITE
bool roughly_equal(double x, double y)
#define SkScalarRoundToInt(x)
#define SkDoubleToScalar(x)
#define REPORTER_ASSERT(r, cond,...)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
void drawPath(const SkPath &path, const SkPaint &paint)
int intersect(const SkDLine &, const SkDLine &)
const SkDPoint & pt(int index) const
@ kStroke_Style
set to stroke geometry
const char * c_str() const
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
Optional< SkRect > bounds
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
DEF_SWITCHES_START aot vmservice shared library name
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
SkDPoint fPts[kPointCount]
SkDPoint ptAtT(double t) const
SkDConic subDivide(double t1, double t2) const
void debugSet(const SkDPoint *pts, SkScalar weight)
void set(const SkPoint &pt)
bool approximatelyEqual(const SkDPoint &a) const
void setBounds(const SkDConic &curve)
static SkImageInfo MakeN32Premul(int width, int height)