Definition at line 29 of file morphology.cpp.
◆ MorphologyGM()
skiagm::MorphologyGM::MorphologyGM |
( |
| ) |
|
|
inline |
◆ drawClippedBitmap()
Definition at line 52 of file morphology.cpp.
52 {
58 }
void translate(SkScalar dx, SkScalar dy)
void clipIRect(const SkIRect &irect, SkClipOp op=SkClipOp::kIntersect)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
SkSamplingOptions(SkFilterMode::kLinear))
◆ getISize()
SkISize skiagm::MorphologyGM::getISize |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ getName()
SkString skiagm::MorphologyGM::getName |
( |
| ) |
const |
|
inlineoverrideprotectedvirtual |
◆ onDraw()
void skiagm::MorphologyGM::onDraw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 60 of file morphology.cpp.
60 {
61 struct {
62 int fWidth, fHeight;
63 int fRadiusX, fRadiusY;
64 } samples[] = {
65 { 140, 140, 0, 0 },
66 { 140, 140, 0, 2 },
67 { 140, 140, 2, 0 },
68 { 140, 140, 2, 2 },
69 { 24, 24, 25, 25 },
70 };
73
74 for (unsigned j = 0; j < 4; ++j) {
76 const SkIRect* cr = j & 0x02 ? &cropRect :
nullptr;
77 if (j & 0x01) {
79 samples[
i].fRadiusX, samples[
i].fRadiusY,
nullptr, cr));
80 } else {
82 samples[
i].fRadiusX, samples[
i].fRadiusY,
nullptr, cr));
83 }
85 }
86 }
87 }
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
void drawClippedBitmap(SkCanvas *canvas, const SkPaint &paint, int x, int y)
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 constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
◆ onOnceBeforeDraw()
void skiagm::MorphologyGM::onOnceBeforeDraw |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
Reimplemented from skiagm::GM.
Definition at line 38 of file morphology.cpp.
38 {
40
43 paint.setColor(0xFFFFFFFF);
44 surf->getCanvas()->drawString(
"ABC", 10, 55,
font,
paint);
45 surf->getCanvas()->drawString(
"XYZ", 10, 110,
font,
paint);
46
47 fImage = surf->makeImageSnapshot();
48 }
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
font
Font Metadata and Metrics.
static SkImageInfo MakeN32Premul(int width, int height)
The documentation for this class was generated from the following file: