31#define FAT_PIXEL_COLOR SK_ColorBLACK
32#define PIXEL_CENTER_SIZE 3
33#define WIRE_FRAME_COLOR 0xFFFF0000
34#define WIRE_FRAME_SIZE 1.5f
68 bool getAA()
const {
return fAA; }
69 void setAA(
bool aa) { fAA = aa; }
83 if (fShader == fShader0) {
128 bool fAA, fGrid, fShowSkeleton, fUseClip, fRectAsOval, fUseTriangle;
132 SkRect fBounds, fClipRect;
140 bool aa = this->
getAA();
144 paint->setStrokeWidth(0);
150 paint->setAntiAlias(aa);
157 paint->setAntiAlias(
true);
164 this->setupSkeletonPaint(&
paint);
167 fRectAsOval ?
path.addOval(r) :
path.addRect(r);
171 void copyMinToMax() {
176 fMinSurface->
draw(canvas, 0, 0);
181 for (
int iy = 1; iy < fH; ++iy) {
185 for (
int ix = 1; ix < fW; ++ix) {
195 paint.setShader(fShader);
197 paint.setShader(
nullptr);
212 for (
int iy = 0; iy < fH; ++iy) {
214 for (
int ix = 0; ix < fW; ++ix) {
227 fClipRect.
fLeft * fZoom,
228 fClipRect.
fTop * fZoom,
238 this->setupSkeletonPaint(&
paint);
269 this->setupPaint(&
paint);
281 this->copyMinToMax();
286 this->drawLineSkeleton(
max, pts);
288 fMaxSurface->
draw(canvas, 0, 0);
304 this->setupPaint(&
paint);
310 this->copyMinToMax();
316 this->drawRectSkeleton(
max, r);
318 fMaxSurface->
draw(canvas, 0, 0);
323 this->setupSkeletonPaint(&
paint);
350 this->setupPaint(&
paint);
353 this->copyMinToMax();
358 this->drawTriangleSkeleton(
max, pts);
360 fMaxSurface->
draw(canvas, 0, 0);
382 fFB.
setWHZ(24*2, 16*2, fZoom);
447 }
else if (fIsRect) {
457 fFB.
getAA() ?
"AA" :
"BW",
485 if (index >= 0 && index <= 2) {
SkStrokeRec::Style fStyle
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static SkScalar apply_grid(SkScalar x)
static void erase(SkSurface *surface)
#define PIXEL_CENTER_SIZE
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorTRANSPARENT
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
#define SkScalarRoundToScalar(x)
void setStyle(FatBits::Style s)
Click * onFindClickHandler(SkScalar x, SkScalar y, skui::ModifierKey modi) override
bool onChar(SkUnichar uni) override
bool onClick(Click *click) override
void draw(SkCanvas *canvas) override
void drawLine(SkCanvas *, SkPoint pts[2])
void setTriangle(bool ut)
void setWHZ(int width, int height, int zoom)
void setShowSkeleton(bool ss)
void drawTriangle(SkCanvas *canvas, SkPoint pts[3])
void drawRect(SkCanvas *canvas, SkPoint pts[2])
bool getShowSkeleton() const
static int GetIndex(Click *click)
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void drawPath(const SkPath &path, const SkPaint &paint)
void concat(const SkMatrix &matrix)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
@ kButt_Cap
no stroke extension
void setColor(SkColor color)
void setAntiAlias(bool aa)
void setStrokeCap(Cap cap)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
static bool EqualsWithinTolerance(const SkPoint &p1, const SkPoint &p2)
void printf(const char format[],...) SK_PRINTF_LIKE(2
void draw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint)
static float max(float r, float g, float b)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SK_API sk_sp< SkShader > Color(SkColor)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
font
Font Metadata and Metrics.
SK_API bool FillPathWithPaint(const SkPath &src, const SkPaint &paint, SkPath *dst, const SkRect *cullRect, SkScalar resScale=1)
static SkImageInfo MakeN32Premul(int width, int height)
void offset(float dx, float dy)
void set(float x, float y)
SkScalar fBottom
larger y-axis bounds
void inset(float dx, float dy)
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
void setIWH(int32_t width, int32_t height)
void setLTRB(float left, float top, float right, float bottom)
void setBounds(const SkPoint pts[], int count)
SkScalar fTop
smaller y-axis bounds