Definition at line 51 of file FatBitsSlide.cpp.
◆ Style
◆ FatBits()
Definition at line 53 of file FatBitsSlide.cpp.
53 {
54 fAA = false;
56 fGrid = false;
57 fShowSkeleton = true;
58 fUseClip = false;
59 fRectAsOval = false;
60 fUseTriangle = false;
62
64 }
@ kButt_Cap
no stroke extension
void setLTRB(float left, float top, float right, float bottom)
◆ drawBG()
void FatBits::drawBG |
( |
SkCanvas * |
canvas | ) |
|
Definition at line 192 of file FatBitsSlide.cpp.
192 {
194
195 paint.setShader(fShader);
197 paint.setShader(
nullptr);
198}
void drawRect(const SkRect &rect, const SkPaint &paint)
◆ drawFG()
void FatBits::drawFG |
( |
SkCanvas * |
canvas | ) |
|
Definition at line 200 of file FatBitsSlide.cpp.
200 {
202
206
210
212 for (int iy = 0; iy < fH; ++iy) {
214 for (int ix = 0; ix < fW; ++ix) {
216
219 }
220 }
221
222 if (fUseClip) {
227 fClipRect.
fLeft * fZoom,
228 fClipRect.
fTop * fZoom,
231 };
233 }
234}
#define PIXEL_CENTER_SIZE
constexpr SkColor SK_ColorLTGRAY
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void setColor(SkColor color)
void setAntiAlias(bool aa)
@ kStroke_Style
set to stroke geometry
void setStrokeWidth(SkScalar width)
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds
◆ drawLine()
Definition at line 259 of file FatBitsSlide.cpp.
259 {
261
263
264 if (fGrid) {
266 }
267
269 this->setupPaint(&
paint);
271 if (fUseClip) {
276 }
278 if (fUseClip) {
280 }
281 this->copyMinToMax();
282
284
286 this->drawLineSkeleton(
max, pts);
287
288 fMaxSurface->
draw(canvas, 0, 0);
289}
static SkScalar apply_grid(SkScalar x)
static void erase(SkSurface *surface)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
void draw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &sampling, const SkPaint *paint)
static float max(float r, float g, float b)
void inset(float dx, float dy)
◆ drawRect()
Definition at line 291 of file FatBitsSlide.cpp.
291 {
293
295
296 if (fGrid) {
298 }
299
302
304 this->setupPaint(&
paint);
306 {
309 }
310 this->copyMinToMax();
311
313
316 this->drawRectSkeleton(
max, r);
317
318 fMaxSurface->
draw(canvas, 0, 0);
319}
void drawOval(const SkRect &oval, const SkPaint &paint)
void setBounds(const SkPoint pts[], int count)
◆ drawTriangle()
Definition at line 334 of file FatBitsSlide.cpp.
334 {
336
338
339 if (fGrid) {
341 }
342
348
350 this->setupPaint(&
paint);
353 this->copyMinToMax();
354
356
358 this->drawTriangleSkeleton(
max, pts);
359
360 fMaxSurface->
draw(canvas, 0, 0);
361}
void drawPath(const SkPath &path, const SkPaint &paint)
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
◆ getAA()
bool FatBits::getAA |
( |
| ) |
const |
|
inline |
◆ getGrid()
bool FatBits::getGrid |
( |
| ) |
const |
|
inline |
◆ getShowSkeleton()
bool FatBits::getShowSkeleton |
( |
| ) |
const |
|
inline |
◆ getStyle()
Style FatBits::getStyle |
( |
| ) |
const |
|
inline |
◆ getTriangle()
bool FatBits::getTriangle |
( |
| ) |
const |
|
inline |
◆ getUseClip()
bool FatBits::getUseClip |
( |
| ) |
const |
|
inline |
◆ getZoom()
int FatBits::getZoom |
( |
| ) |
const |
|
inline |
◆ setAA()
void FatBits::setAA |
( |
bool |
aa | ) |
|
|
inline |
◆ setGrid()
void FatBits::setGrid |
( |
bool |
g | ) |
|
|
inline |
◆ setShowSkeleton()
void FatBits::setShowSkeleton |
( |
bool |
ss | ) |
|
|
inline |
◆ setStyle()
void FatBits::setStyle |
( |
Style |
s | ) |
|
|
inline |
◆ setTriangle()
void FatBits::setTriangle |
( |
bool |
ut | ) |
|
|
inline |
◆ setUseClip()
void FatBits::setUseClip |
( |
bool |
uc | ) |
|
|
inline |
◆ setWHZ()
void FatBits::setWHZ |
( |
int |
width, |
|
|
int |
height, |
|
|
int |
zoom |
|
) |
| |
|
inline |
Definition at line 102 of file FatBitsSlide.cpp.
102 {
105 fZoom = zoom;
111 fShader = fShader0;
112
117 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
SK_API sk_sp< SkShader > Color(SkColor)
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeN32Premul(int width, int height)
void setIWH(int32_t width, int32_t height)
◆ togglePixelColors()
void FatBits::togglePixelColors |
( |
| ) |
|
|
inline |
Definition at line 82 of file FatBitsSlide.cpp.
82 {
83 if (fShader == fShader0) {
84 fShader = fShader1;
85 } else {
86 fShader = fShader0;
87 }
88 }
◆ toggleRectAsOval()
void FatBits::toggleRectAsOval |
( |
| ) |
|
|
inline |
◆ fStrokeCap
◆ fStrokeWidth
float FatBits::fStrokeWidth = 1 |
The documentation for this class was generated from the following file: