36#include <initializer_list>
74 path.moveTo(460.2881309415525f,
76 path.cubicTo(463.36378422175284f,
84 fillR = path.getBounds();
94 paint.getStrokeWidth() * miter :
95 paint.getStrokeWidth();
119#define FOR_SETUP(index, array, setter) \
120 for (size_t index = 0; index < std::size(array); ++index) { \
121 paint.setter(array[index]);
124 paint.setAntiAlias(
true);
136 writer.writeToMemory(buf.
get());
161#define ASSERT(expr) REPORTER_ASSERT(r, expr)
165 paint.setColor(0x00AABBCC);
172 writer.writeToMemory(buf.
get());
190 paint.setAlpha(0xFF);
209 const char text[] =
"Hamburgefons!@#!#23425,./;'[]";
223 for (
bool subpix : {
false,
true }) {
224 font.setSubpixel(subpix);
226 font.setHinting(hint);
227 for (
auto size : { 1.0f, 12.0f, 100.0f }) {
239 for (
int i = 0; i <
count; ++i) {
#define FOR_SETUP(index, array, setter)
@ kSrcOver
r = s + (1-sa)*d
@ kNormal_SkBlurStyle
fuzzy inside and outside
@ kBGRA_8888_SkColorType
pixel with 8 bits for blue, green, red, alpha; in 32-bit word
@ kNormal
glyph outlines modified to improve constrast
@ kNone
glyph outlines unchanged
@ kSlight
minimal modification to improve constrast
@ kFull
modifies glyph outlines for maximum constrast
@ kUTF8
uses bytes to represent UTF-8 or ASCII
#define DEF_TEST(name, reporter)
#define REPORTER_ASSERT(r, cond,...)
static SkScalar SK_SPI ConvertRadiusToSigma(SkScalar radius)
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
void postTranslate(float dr, float dg, float db, float da)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
static bool ShouldDither(const SkPaint &, SkColorType)
static void Flatten(const SkPaint &paint, SkWriteBuffer &buffer)
@ kButt_Cap
no stroke extension
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
@ kStrokeAndFill_Style
sets to stroke and fill geometry
@ kMiter_Join
extends to miter limit
@ kBevel_Join
connects outside edges
std::optional< SkBlendMode > asBlendMode() const
const SkRect & getBounds() const
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
static SkRect inset(const SkRect &r)
void inset(float dx, float dy)
bool contains(SkScalar x, SkScalar y) const
void setLTRB(float left, float top, float right, float bottom)