32 std::optional<SkIRect>
rect,
53 text.setAntiAlias(
true);
65 hintedOutputBounds ?
SkIRect(*hintedOutputBounds) : std::optional<SkIRect>{},
77 text.setAntiAlias(
true);
88 paint.setStrokeWidth(0.f);
90 paint.setAntiAlias(
true);
100 for (
float y =
rect.fTop + axisSpace;
y <=
rect.fBottom;
y += axisSpace) {
104 for (
float x =
rect.fLeft + axisSpace;
x <=
rect.fRight;
x += axisSpace) {
112 { { 0.05f, 0.0f, 6.f, 1.f },
113 { 0.6f, 0.6f, 0.8f, 0.6f },
114 { 1.f, 1.f, 1.f, 0.2f },
115 { 0.95f, 0.6f, 0.5f, 0.6f },
116 { 0.8f, 0.1f, 0.f, 1.f } };
138 testPoints[0] = {
rect.centerX(),
rect.centerY()};
139 rect.toQuad(testPoints + 1);
140 for (
int i = 0;
i < 5; ++
i) {
161 color = {
a.fR +
b.fR,
a.fG +
b.fG,
a.fB +
b.fB,
a.fA +
b.fA};
169 p.setAntiAlias(
true);
170 p.setColor4f(
color,
nullptr);
172 testPoints[
i].fX + 4.f, testPoints[
i].fY + 4.f),
p);
194 canvas->
saveLayer(&localContentRect, &blurPaint);
215 canvas->
setMatrix(mapping.layerToDevice());
233 mapping, targetOutput, contentBounds);
235 mapping, targetOutput, {});
237 canvas->
setMatrix(mapping.layerToDevice());
246 std::optional<skif::DeviceSpace<SkIRect>> hintedOutputBounds =
248 if (hintedOutputBounds) {
254 mapping.paramToLayer(contentBounds).roundOut(),
257 unhintedLayerBounds);
static const int kStopCount
static float print_size(SkCanvas *canvas, const char *prefix, std::optional< SkIRect > rect, float x, float y, const SkFont &font, const SkPaint &paint)
static const SkColor4f kScaleGradientColors[]
static constexpr float kLineHeight
static void print_label(SkCanvas *canvas, float x, float y, float value)
static const SkScalar kGradientStops[]
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)
static constexpr float kLineInset
static const SkScalar kLogScaleFactors[]
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorDKGRAY
static bool SkIsFinite(T x, Pack... values)
static SkImageFilter_Base * as_IFB(SkImageFilter *filter)
#define SkScalarPow(b, e)
void load(SkScalar w, SkScalar h) override
void draw(SkCanvas *canvas) override
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)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
SkImageInfo imageInfo() const
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
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)
@ kInterpolateColorsInPremul_Flag
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 sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static SkScalar DifferentialAreaScale(const SkMatrix &m, const SkPoint &p)
static const SkMatrix & I()
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
@ kStroke_Style
set to stroke geometry
void setShader(sk_sp< SkShader > shader)
SkPath & moveTo(SkScalar x, SkScalar y)
SkPath & lineTo(SkScalar x, SkScalar y)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void void void appendf(const char format[],...) SK_PRINTF_LIKE(2
const SkMatrix & layerToDevice() const
LayerSpace< T > paramToLayer(const ParameterSpace< T > ¶mGeometry) const
sk_sp< SkBlender > blender SkRect rect
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
font
Font Metadata and Metrics.
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float centerX() const
constexpr float centerY() const
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)