4REG_FIDDLE(Canvas_accessTopLayerPixels_b, 256, 256,
false, 0) {
19 int v = imageInfo.
width();
20 int rowWords = rowBytes /
sizeof(uint32_t);
21 for (
int y = 0;
y <
h; ++
y) {
22 int newY = (
y -
h / 2) * 2 +
h / 2;
23 if (newY < 0 || newY >=
h) {
26 for (
int x = 0;
x < v; ++
x) {
27 int newX = (
x - v / 2) * 2 + v / 2;
28 if (newX < 0 || newX >= v) {
REG_FIDDLE(Canvas_accessTopLayerPixels_b, 256, 256, false, 0)
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
int saveLayerAlpha(const SkRect *bounds, U8CPU alpha)
void clear(SkColor color)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void * accessTopLayerPixels(SkImageInfo *info, size_t *rowBytes, SkIPoint *origin=nullptr)
sk_sp< SkTypeface > matchFamilyStyle(const char familyName[], const SkFontStyle &) const
sk_sp< SkFontMgr > fontMgr
font
Font Metadata and Metrics.
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)