Flutter Engine
The Flutter Engine
|
#include "tools/fiddle/examples.h"
Go to the source code of this file.
Functions | |
REG_FIDDLE (SkPath_arcto_conic_parametric2, 512, 512, false, 0) | |
REG_FIDDLE | ( | SkPath_arcto_conic_parametric2 | , |
512 | , | ||
512 | , | ||
false | , | ||
0 | |||
) |
Add a weighted quadratic bezier from the last point, approaching control point (x1,y1), and ending at (x2,y2). If no moveTo() call has been made for this contour, the first point is automatically set to (0,0). If the starting point is (x0, y0), then this curve is defined as the paramentric curve as t
goes from 0 to 1: s := 1 - t x := ((s * s * x0) + (w * 2 * s * t * x1) + (t * t * x2)) / ((s * s) + (w * 2 * s * t) + (t * t)) y := ((s * s * y0) + (w * 2 * s * t * y1) + (t * t * y2)) / ((s * s) + (w * 2 * s * t) + (t * t))
x1 | The x-coordinate of the control point on a quadratic curve |
y1 | The y-coordinate of the control point on a quadratic curve |
x2 | The x-coordinate of the end point on a quadratic curve |
y2 | The y-coordinate of the end point on a quadratic curve |
w | The weight of the control point (x1,y1) |
Definition at line 4 of file SkPath_arcto_conic_parametric2.cpp.