186 {
187
190
191
194 canvas->
saveLayer(&localContentRect, &blurPaint);
199
200
204 return;
205 }
212
213
215 canvas->
setMatrix(mapping.layerToDevice());
219
220
222
223
224
225
228
229
230
233 mapping, targetOutput, contentBounds);
235 mapping, targetOutput, {});
236
237 canvas->
setMatrix(mapping.layerToDevice());
242
243
244
246 std::optional<skif::DeviceSpace<SkIRect>> hintedOutputBounds =
248 if (hintedOutputBounds) {
250 }
251
254 mapping.paramToLayer(contentBounds).roundOut(),
255 targetOutput,
256 hintedOutputBounds,
257 unhintedLayerBounds);
258
259
261 }
static SkPaint line_paint(SkColor color, bool dashed=false)
static SkPath create_axis_path(const SkRect &rect, float axisSpace)
static void draw_scale_key(SkCanvas *canvas, float y)
static void draw_scale_factors(SkCanvas *canvas, const skif::Mapping &mapping, const SkRect &rect)
static float print_info(SkCanvas *canvas, const skif::LayerSpace< SkIRect > &layerContentBounds, const skif::DeviceSpace< SkIRect > &outputBounds, std::optional< skif::DeviceSpace< SkIRect > > hintedOutputBounds, const skif::LayerSpace< SkIRect > &unhintedLayerBounds)
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorDKGRAY
static SkImageFilter_Base * as_IFB(SkImageFilter *filter)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
SkMatrix getLocalToDeviceAs3x3() const
@ kFast_SrcRectConstraint
sample outside bounds; faster
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void drawPath(const SkPath &path, const SkPaint &paint)
void setMatrix(const SkM44 &matrix)
SkImageInfo imageInfo() const
std::optional< skif::DeviceSpace< SkIRect > > getOutputBounds(const skif::Mapping &mapping, const skif::ParameterSpace< SkRect > &contentBounds) const
skif::LayerSpace< SkIRect > getInputBounds(const skif::Mapping &mapping, const skif::DeviceSpace< SkIRect > &desiredOutput, std::optional< skif::ParameterSpace< SkRect > > knownContentBounds) const
static const SkMatrix & I()
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
constexpr float centerX() const
constexpr float centerY() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)