39 : fColor4f{0, 0, 0, 1}
42 , fBitfields{(unsigned)
false,
44 (unsigned)
SkPaint::kDefault_Cap,
45 (unsigned)
SkPaint::kDefault_Join,
67#define EQUAL(field) (a.field == b.field)
68 return EQUAL(fPathEffect)
71 &&
EQUAL(fColorFilter)
73 &&
EQUAL(fImageFilter)
77 &&
EQUAL(fBitfieldsUInt)
82#define DEFINE_FIELD_REF(type) \
83 sk_sp<Sk##type> SkPaint::ref##type() const { return f##type; }
90#undef DEFINE_FIELD_REF
92#define DEFINE_FIELD_SET(Field) \
93 void SkPaint::set##Field(sk_sp<Sk##Field> f) { f##Field = std::move(f); }
99#undef DEFINE_FIELD_SET
109#ifdef SK_REPORT_API_RANGE_CHECK
110 SkDebugf(
"SkPaint::setStyle(%d) out of range\n", style);
120 fColor4f = SkColor4f::FromColor(
color);
127 steps.apply(fColor4f.vec());
131 fColor4f.fA =
SkTPin(
a, 0.0f, 1.0f);
156 fBlender = std::move(blender);
163#ifdef SK_REPORT_API_RANGE_CHECK
164 SkDebugf(
"SkPaint::setStrokeWidth() called with negative value\n");
173#ifdef SK_REPORT_API_RANGE_CHECK
174 SkDebugf(
"SkPaint::setStrokeMiter() called with negative value\n");
183#ifdef SK_REPORT_API_RANGE_CHECK
184 SkDebugf(
"SkPaint::setStrokeCap(%d) out of range\n", ct);
193#ifdef SK_REPORT_API_RANGE_CHECK
194 SkDebugf(
"SkPaint::setStrokeJoin(%d) out of range\n", jt);
219 uintptr_t effects = 0;
220 effects |=
reinterpret_cast<uintptr_t
>(this->
getMaskFilter());
221 effects |=
reinterpret_cast<uintptr_t
>(this->
getPathEffect());
246 *storage =
src->makeOutset(radius, radius);
270 return imf !=
nullptr;
278 switch (bm.value()) {
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
#define SkPaintDefaults_MiterLimit
@ kSrcOver
r = s + (1-sa)*d
@ kSrcATop
r = s*da + d*(1-sa)
@ kDstOver
r = d + (1-da)*s
SkBlenderBase * as_BB(SkBlender *blend)
static SkColorFilterBase * as_CFB(SkColorFilter *filter)
SkColorSpace * sk_srgb_singleton()
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
SkMaskFilterBase * as_MFB(SkMaskFilter *mf)
#define DEFINE_FIELD_REF(type)
static bool affects_alpha(const SkColorFilter *cf)
#define DEFINE_FIELD_SET(Field)
bool operator==(const SkPaint &a, const SkPaint &b)
static SkPathEffectBase * as_PEB(SkPathEffect *effect)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
constexpr uint8_t SkToU8(S x)
virtual std::optional< SkBlendMode > asBlendMode() const
static sk_sp< SkBlender > Mode(SkBlendMode mode)
bool isAlphaUnchanged() const
virtual SkRect computeFastBounds(const SkRect &bounds) const
virtual void computeFastBounds(const SkRect &src, SkRect *dest) const
const SkRect & doComputeFastBounds(const SkRect &orig, SkRect *storage, Style style) const
void setStyle(Style style)
static constexpr int kCapCount
static constexpr int kStyleCount
void setColor(SkColor color)
void setStrokeMiter(SkScalar miter)
SkPathEffect * getPathEffect() const
void setStrokeCap(Cap cap)
const SkRect & computeFastBounds(const SkRect &orig, SkRect *storage) const
SkBlendMode getBlendMode_or(SkBlendMode defaultMode) const
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void setStrokeJoin(Join join)
SkPaint & operator=(const SkPaint &paint)
bool nothingToDraw() const
static constexpr int kJoinCount
void setARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
SkMaskFilter * getMaskFilter() const
void setBlendMode(SkBlendMode mode)
struct SkPaint::@272::@274 fBitfields
SkImageFilter * getImageFilter() const
void setBlender(sk_sp< SkBlender > blender)
bool canComputeFastBounds() const
void setStrokeWidth(SkScalar width)
std::optional< SkBlendMode > asBlendMode() const
static SkScalar GetInflationRadius(const SkPaint &, SkPaint::Style)
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 mode
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)