25constexpr SkScalar kShadowAmbientAlpha = 0.039;
26constexpr SkScalar kShadowSpotAlpha = 0.25;
27constexpr SkScalar kShadowLightRadius = 1.1;
28constexpr SkScalar kShadowLightHeight = 600.0;
29constexpr SkScalar kShadowLightXOffset = 0;
30constexpr SkScalar kShadowLightYOffset = -450;
63 canvas->
scale(sx, sy);
156 canvas->
drawArc(*
rect, startAngleDegrees, sweepAngleDegrees, useCenter,
171 bool transparentOccluder) {
178 uint32_t
flags = transparentOccluder
185 kShadowLightHeight * devicePixelRatio),
186 devicePixelRatio * kShadowLightRadius, outAmbient, outSpot,
flags);
193 paragraph->
paint(canvas,
x,
y);
static const int points[]
static constexpr SkColor SkColorSetA(SkColor c, U8CPU a)
#define SkColorGetA(color)
@ kDirectionalLight_ShadowFlag
@ kTransparentOccluder_ShadowFlag
SKWASM_EXPORT void canvas_drawPicture(SkCanvas *canvas, SkPicture *picture)
SKWASM_EXPORT void canvas_translate(SkCanvas *canvas, SkScalar dx, SkScalar dy)
SKWASM_EXPORT void canvas_saveLayer(SkCanvas *canvas, SkRect *rect, SkPaint *paint, SkImageFilter *backdrop)
SKWASM_EXPORT void canvas_drawArc(SkCanvas *canvas, const SkRect *rect, SkScalar startAngleDegrees, SkScalar sweepAngleDegrees, bool useCenter, SkPaint *paint)
SKWASM_EXPORT void canvas_transform(SkCanvas *canvas, const SkM44 *matrix44)
SKWASM_EXPORT void canvas_skew(SkCanvas *canvas, SkScalar sx, SkScalar sy)
SKWASM_EXPORT void canvas_clipRRect(SkCanvas *canvas, const SkScalar *rrectValues, bool antialias)
SKWASM_EXPORT void canvas_drawLine(SkCanvas *canvas, SkScalar x1, SkScalar y1, SkScalar x2, SkScalar y2, SkPaint *paint)
SKWASM_EXPORT void canvas_drawImageNine(SkCanvas *canvas, SkImage *image, SkIRect *centerRect, SkRect *destinationRect, SkPaint *paint, FilterQuality quality)
SKWASM_EXPORT int canvas_getSaveCount(SkCanvas *canvas)
SKWASM_EXPORT void canvas_drawImageRect(SkCanvas *canvas, SkImage *image, SkRect *sourceRect, SkRect *destRect, SkPaint *paint, FilterQuality quality)
SKWASM_EXPORT void canvas_restore(SkCanvas *canvas)
SKWASM_EXPORT void canvas_drawPaint(SkCanvas *canvas, SkPaint *paint)
SKWASM_EXPORT void canvas_drawOval(SkCanvas *canvas, const SkRect *rect, SkPaint *paint)
SKWASM_EXPORT void canvas_drawAtlas(SkCanvas *canvas, SkImage *atlas, SkRSXform *transforms, SkRect *rects, SkColor *colors, int spriteCount, SkBlendMode mode, SkRect *cullRect, SkPaint *paint)
SKWASM_EXPORT void canvas_drawRRect(SkCanvas *canvas, const SkScalar *rrectValues, SkPaint *paint)
SKWASM_EXPORT void canvas_rotate(SkCanvas *canvas, SkScalar degrees)
SKWASM_EXPORT void canvas_getTransform(SkCanvas *canvas, SkM44 *outTransform)
SKWASM_EXPORT void canvas_drawPath(SkCanvas *canvas, SkPath *path, SkPaint *paint)
SKWASM_EXPORT void canvas_scale(SkCanvas *canvas, SkScalar sx, SkScalar sy)
SKWASM_EXPORT void canvas_drawDRRect(SkCanvas *canvas, const SkScalar *outerRrectValues, const SkScalar *innerRrectValues, SkPaint *paint)
SKWASM_EXPORT void canvas_drawColor(SkCanvas *canvas, SkColor color, SkBlendMode blendMode)
SKWASM_EXPORT void canvas_drawShadow(SkCanvas *canvas, SkPath *path, SkScalar elevation, SkScalar devicePixelRatio, SkColor color, bool transparentOccluder)
SKWASM_EXPORT void canvas_drawVertices(SkCanvas *canvas, SkVertices *vertices, SkBlendMode mode, SkPaint *paint)
SKWASM_EXPORT void canvas_drawParagraph(SkCanvas *canvas, Paragraph *paragraph, SkScalar x, SkScalar y)
SKWASM_EXPORT void canvas_getDeviceClipBounds(SkCanvas *canvas, SkIRect *outRect)
SKWASM_EXPORT void canvas_drawRect(SkCanvas *canvas, SkRect *rect, SkPaint *paint)
SKWASM_EXPORT void canvas_drawImage(SkCanvas *canvas, SkImage *image, SkScalar offsetX, SkScalar offsetY, SkPaint *paint, FilterQuality quality)
SKWASM_EXPORT void canvas_drawPoints(SkCanvas *canvas, SkCanvas::PointMode mode, SkPoint *points, int pointCount, SkPaint *paint)
SKWASM_EXPORT void canvas_save(SkCanvas *canvas)
SKWASM_EXPORT void canvas_clipPath(SkCanvas *canvas, SkPath *path, bool antialias)
SKWASM_EXPORT void canvas_drawCircle(SkCanvas *canvas, SkScalar x, SkScalar y, SkScalar radius, SkPaint *paint)
SKWASM_EXPORT void canvas_clipRect(SkCanvas *canvas, const SkRect *rect, SkClipOp op, bool antialias)
SKWASM_EXPORT void canvas_getLocalClipBounds(SkCanvas *canvas, SkRect *outRect)
SKWASM_EXPORT void canvas_restoreToCount(SkCanvas *canvas, int count)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawImageNine(const SkImage *image, const SkIRect ¢er, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
SkRect getLocalClipBounds() const
void drawPaint(const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
SkM44 getLocalToDevice() const
void rotate(SkScalar degrees)
void restoreToCount(int saveCount)
void drawRRect(const SkRRect &rrect, const SkPaint &paint)
void drawArc(const SkRect &oval, SkScalar startAngle, SkScalar sweepAngle, bool useCenter, const SkPaint &paint)
void clipPath(const SkPath &path, SkClipOp op, bool doAntiAlias)
SkIRect getDeviceClipBounds() const
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void drawAtlas(const SkImage *atlas, const SkRSXform xform[], const SkRect tex[], const SkColor colors[], int count, SkBlendMode mode, const SkSamplingOptions &sampling, const SkRect *cullRect, const SkPaint *paint)
void drawDRRect(const SkRRect &outer, const SkRRect &inner, const SkPaint &paint)
void scale(SkScalar sx, SkScalar sy)
void concat(const SkMatrix &matrix)
void drawPicture(const SkPicture *picture)
void drawVertices(const SkVertices *vertices, SkBlendMode mode, const SkPaint &paint)
void skew(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void clipRRect(const SkRRect &rrect, SkClipOp op, bool doAntiAlias)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static void DrawShadow(SkCanvas *canvas, const SkPath &path, const SkPoint3 &zPlaneParams, const SkPoint3 &lightPos, SkScalar lightRadius, SkColor ambientColor, SkColor spotColor, uint32_t flags=SkShadowFlags::kNone_ShadowFlag)
static void ComputeTonalColors(SkColor inAmbientColor, SkColor inSpotColor, SkColor *outAmbientColor, SkColor *outSpotColor)
virtual void paint(SkCanvas *canvas, SkScalar x, SkScalar y)=0
FlutterSemanticsFlag flags
sk_sp< const SkImage > atlas
sk_sp< const SkImage > image
sk_sp< const SkPicture > picture
sk_sp< const SkImageFilter > backdrop
sk_sp< SkBlender > blender SkRect rect
PODArray< SkColor > colors
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SkRRect createRRect(const SkScalar *f)
SkSamplingOptions samplingOptionsForQuality(FilterQuality quality)
SkFilterMode filterModeForQuality(FilterQuality quality)
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 mode
static SkPoint3 Make(SkScalar x, SkScalar y, SkScalar z)