Go to the source code of this file.
|
static void | make_transparency (SkCanvas *canvas, SkScalar width, SkScalar height) |
|
static sk_sp< SkShader > | create_checkerboard_shader (SkColor c1, SkColor c2, int size) |
|
static void | checkerboard (SkCanvas *canvas, SkColor c1, SkColor c2, int size) |
|
| DEF_SIMPLE_GM (transparency_check, canvas, 1792, 1080) |
|
◆ checkerboard()
Definition at line 60 of file transparency.cpp.
60 {
64}
void drawPaint(const SkPaint &paint)
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
static sk_sp< SkShader > create_checkerboard_shader(SkColor c1, SkColor c2, int size)
◆ create_checkerboard_shader()
Definition at line 50 of file transparency.cpp.
50 {
57}
void eraseArea(const SkIRect &area, SkColor c) const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
◆ DEF_SIMPLE_GM()
DEF_SIMPLE_GM |
( |
transparency_check |
, |
|
|
canvas |
, |
|
|
1792 |
, |
|
|
1080 |
|
|
) |
| |
This GM verifies that a transparent bitmap drawn over a checkerboard pattern looks correct.
Definition at line 70 of file transparency.cpp.
70 {
72 {
76 canvas->scale(7.0f, 120.0f);
78 }
79}
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeN32Premul(int width, int height)
static void make_transparency(SkCanvas *canvas, SkScalar width, SkScalar height)
static void checkerboard(SkCanvas *canvas, SkColor c1, SkColor c2, int size)
◆ make_transparency()
Definition at line 23 of file transparency.cpp.
23 {
37 };
46 }
47}
constexpr SkColor SK_ColorYELLOW
constexpr SkColor SK_ColorMAGENTA
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
constexpr SkAlpha SK_AlphaTRANSPARENT
void drawRect(const SkRect &rect, const SkPaint &paint)
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)
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)