33 auto tmpCanvas = surf->getCanvas();
37 paint.setAntiAlias(
true);
38 const SkPoint pts[] = { { 0, 0 }, { 64, 64 } };
41 tmpCanvas->drawCircle(32, 32, 32,
paint);
55 str.
printf(
"bitmaprect_%s", fUseIRect ?
"i" :
"s");
77 SkRect dstR = { 0, 200, 128, 380 };
110 const SkColor textureData[xSize][ySize] = {
116 bitmap->allocN32Pixels(xSize, ySize,
true);
120 for (
int y = 0;
y < ySize;
y++) {
121 for (
int x = 0;
x < xSize;
x++) {
122 paint.setColor(textureData[
x][
y]);
144 str.
printf(
"3x3bitmaprect");
155 SkRect srcR = { 0.5f, 0.5f, 2.5f, 2.5f };
156 SkRect dstR = { 100, 100, 300, 200 };
170 constexpr int gXSize = 4096;
171 constexpr int gYSize = 4096;
172 constexpr int gBorderWidth = 10;
175 bitmap.allocN32Pixels(gXSize, gYSize);
176 for (
int y = 0;
y < gYSize; ++
y) {
177 for (
int x = 0;
x < gXSize; ++
x) {
178 if (x <= gBorderWidth || x >= gXSize-gBorderWidth ||
179 y <= gBorderWidth || y >= gYSize-gBorderWidth) {
206 str.
printf(
"bigbitmaprect_%s", fUseIRect ?
"i" :
"s");
222 SkRect srcR1 = { 0.0f, 0.0f, 4096.0f, 2040.0f };
223 SkRect dstR1 = { 10.1f, 10.1f, 629.9f, 400.9f };
225 SkRect srcR2 = { 4085.0f, 10.0f, 4087.0f, 12.0f };
226 SkRect dstR2 = { 10, 410, 30, 430 };
254 str.
printf(
"bitmaprect_rounding");
275 canvas->
scale(0.9f, 0.9f);
293#ifndef SK_BUILD_FOR_ANDROID
@ kXor
r = s*(1-da) + d*(1-sa)
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
SK_API SkPMColor SkPreMultiplyColor(SkColor c)
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
static void make_3x3_bitmap(SkBitmap *bitmap)
static sk_sp< SkImage > make_big_bitmap(SkCanvas *canvas)
static sk_sp< SkImage > make_image(SkCanvas *destCanvas)
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void onOnceBeforeDraw() override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
DrawBitmapRect2(bool useIRect)
SkString getName() const override
SkISize getISize() override
void onDraw(SkCanvas *canvas) override
SkString getName() const override
SkISize getISize() override
DrawBitmapRect4(bool useIRect)
void onDraw(SkCanvas *canvas) override
sk_sp< SkImage > asImage() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void drawIRect(const SkIRect &rect, const SkPaint &paint)
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
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)
@ kStroke_Style
set to stroke geometry
void printf(const char format[],...) SK_PRINTF_LIKE(2
sk_sp< const SkImage > image
PODArray< SkColor > colors
SkSamplingOptions sampling
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
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
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
void roundOut(SkIRect *dst) const
void set(const SkIRect &src)