187 {
192 *errorMsg = "Image creation failed";
194 }
195 }
196
199
200 const int kPadX = 30;
201 const int kPadY = 40;
205 &alphaPaint);
212
214
218
220 int rowCount = 0;
222 for (
int w = 1;
w <= kMaxSrcRectSize;
w *= 4) {
223 for (
int h = 1;
h <= kMaxSrcRectSize;
h *= 4) {
224
227 nullptr);
228
239 canvas->
drawRect(dstRect, blackPaint);
240
242 ++rowCount;
243 if ((dstRect.
width() + kPadX) * rowCount >
gSize) {
247 rowCount = 0;
248 }
249 }
250 }
251
252 {
253
254
259
264
265 fProc(canvas, img, bm, srcRect, dstRect,
267 }
268
270 }
@ kNormal_SkBlurStyle
fuzzy inside and outside
constexpr SkColor SK_ColorBLACK
static int SkNextLog2(uint32_t value)
sk_sp< SkImage > asImage() const
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
virtual GrRecordingContext * recordingContext() const
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
virtual bool isValid(GrRecordingContext *context) const =0
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
void setStyle(Style style)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void setMaskFilter(sk_sp< SkMaskFilter > maskFilter)
void setStrokeWidth(SkScalar width)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
static SkBitmap make_chessbm(int w, int h)
static sk_sp< SkImage > makebm(SkCanvas *origCanvas, SkBitmap *resultBM, int w, int h)
font
Font Metadata and Metrics.
SkSamplingOptions(SkFilterMode::kLinear))
void setXYWH(int32_t x, int32_t y, int32_t width, int32_t height)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static SkRect MakeIWH(int w, int h)
constexpr float height() const
constexpr float width() const