Definition at line 374 of file FatBitsSlide.cpp.
◆ DrawLineSlide()
DrawLineSlide::DrawLineSlide |
( |
| ) |
|
|
inline |
Definition at line 381 of file FatBitsSlide.cpp.
381 {
382 fFB.
setWHZ(24*2, 16*2, fZoom);
387 fIsRect = false;
389 }
void setWHZ(int width, int height, int zoom)
static SkMatrix Scale(SkScalar sx, SkScalar sy)
void mapPoints(SkPoint dst[], const SkPoint src[], int count) const
void set(float x, float y)
◆ draw()
void DrawLineSlide::draw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverridevirtual |
Implements Slide.
Definition at line 443 of file FatBitsSlide.cpp.
443 {
447 } else if (fIsRect) {
449 } else {
451 }
453
454 {
457 fFB.
getAA() ?
"AA" :
"BW",
464 }
465 }
constexpr SkColor SK_ColorBLUE
void drawLine(SkCanvas *, SkPoint pts[2])
void drawTriangle(SkCanvas *canvas, SkPoint pts[3])
void drawRect(SkCanvas *canvas, SkPoint pts[2])
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void printf(const char format[],...) SK_PRINTF_LIKE(2
font
Font Metadata and Metrics.
◆ onChar()
Reimplemented from Slide.
Definition at line 393 of file FatBitsSlide.cpp.
393 {
394 switch (uni) {
395 case 'c':
397 return true;
398 case 'r':
399 fIsRect = !fIsRect;
400 return true;
401 case 'o':
403 return true;
404 case 'x':
406 return true;
407 case 's':
410 } else {
412 }
413 return true;
414 case 'k': {
417 };
419 return true;
420 }
421 case 'a':
423 return true;
424 case 'w':
426 return true;
427 case 'g':
429 return true;
430 case 't':
432 return true;
433 case '-':
435 return true;
436 case '=':
438 return true;
439 }
440 return false;
441 }
void setStyle(FatBits::Style s)
void setTriangle(bool ut)
void setShowSkeleton(bool ss)
bool getShowSkeleton() const
@ kButt_Cap
no stroke extension
◆ onClick()
bool DrawLineSlide::onClick |
( |
Click * |
| ) |
|
|
inlineoverrideprotectedvirtual |
Override to track clicks. Return true as long as you want to track the pen/mouse.
Implements ClickHandlerSlide.
Definition at line 483 of file FatBitsSlide.cpp.
483 {
485 if (index >= 0 && index <= 2) {
486 fPts[index] = click->fCurr;
487 } else {
488 SkScalar dx = click->fCurr.fX - click->fPrev.fX;
489 SkScalar dy = click->fCurr.fY - click->fPrev.fY;
493 }
494 return true;
495 }
static int GetIndex(Click *click)
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
void offset(float dx, float dy)
◆ onFindClickHandler()
|
inlineoverrideprotectedvirtual |
Return a Click object to handle the click. onClick will be called repeatedly with the latest mouse state tracked on the Click object until it returns false.
Implements ClickHandlerSlide.
Definition at line 468 of file FatBitsSlide.cpp.
468 {
470 int index = -1;
473
477 break;
478 }
479 }
481 }
static bool EqualsWithinTolerance(const SkPoint &p1, const SkPoint &p2)
◆ setStyle()
The documentation for this class was generated from the following file: