24 const float endAngle = nextafter(startAngle, 360.0f);
90 int left = kPad, top = kPad;
91 for (
auto f : {
empty, degen_sweep, degen_linear, degen_radial, degen_conical }) {
101 left += kSize + kPad;
110 static constexpr int kPad = 8;
111 static constexpr int kSize = 32;
116DEF_GM(
return new EmptyShaderGM;)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static bool left(const SkPoint &p0, const SkPoint &p1)
void drawRect(const SkRect &rect, const SkPaint &paint)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
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)
void setStyle(Style style)
@ kStroke_Style
set to stroke geometry
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
EMSCRIPTEN_KEEPALIVE void empty()
PODArray< SkColor > colors
static constexpr SkISize Make(int32_t w, int32_t h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float centerX() const
constexpr float centerY() const
constexpr SkPoint center() const