|
void | drawPaint (const SkPaint &) const |
|
void | drawPoints (SkCanvas::PointMode, size_t count, const SkPoint[], const SkPaint &, bool forceUseDevice=false) const |
|
void | drawRect (const SkRect &prePaintRect, const SkPaint &, const SkMatrix *paintMatrix, const SkRect *postPaintRect) const |
|
void | drawRect (const SkRect &rect, const SkPaint &paint) const |
|
void | drawRRect (const SkRRect &, const SkPaint &) const |
|
void | drawPath (const SkPath &path, const SkPaint &paint, const SkMatrix *prePathMatrix, bool pathIsMutable) const |
| To save on mallocs, we allow a flag that tells us that srcPath is mutable, so that we don't have to make copies of it as we transform it. More...
|
|
void | drawPath (const SkPath &path, const SkPaint &paint, SkBlitter *customBlitter=NULL) const |
|
void | drawBitmap (const SkBitmap &, const SkMatrix &, const SkRect *dstOrNull, const SkPaint &) const |
|
void | drawSprite (const SkBitmap &, int x, int y, const SkPaint &) const |
|
void | drawText (const char text[], size_t byteLength, SkScalar x, SkScalar y, const SkPaint &paint) const |
|
void | drawPosText (const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, const SkPoint &offset, const SkPaint &paint) const |
|
void | drawVertices (SkCanvas::VertexMode mode, int count, const SkPoint vertices[], const SkPoint textures[], const SkColor colors[], SkXfermode *xmode, const uint16_t indices[], int ptCount, const SkPaint &paint) const |
|
void | drawPathCoverage (const SkPath &src, const SkPaint &paint, SkBlitter *customBlitter=NULL) const |
| Overwrite the target with the path's coverage (i.e. More...
|
|
void | drawText_asPaths (const char text[], size_t byteLength, SkScalar x, SkScalar y, const SkPaint &) const |
|
void | drawPosText_asPaths (const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, const SkPoint &offset, const SkPaint &) const |
|
void | validate () const |
|
|
static bool | DrawToMask (const SkPath &devPath, const SkIRect *clipBounds, const SkMaskFilter *, const SkMatrix *filterMatrix, SkMask *mask, SkMask::CreateMode mode, SkStrokeRec::InitStyle style) |
| Helper function that creates a mask from a path and an optional maskfilter. More...
|
|
static RectType | ComputeRectType (const SkPaint &, const SkMatrix &, SkPoint *strokeSize) |
| Based on the paint's style, strokeWidth, and the matrix, classify how to draw the rect. More...
|
|
static bool | ShouldDrawTextAsPaths (const SkPaint &, const SkMatrix &) |
|
static SkScalar | ComputeResScaleForStroking (const SkMatrix &) |
|
|
void | drawDevMask (const SkMask &mask, const SkPaint &) const |
|
void | drawBitmapAsMask (const SkBitmap &, const SkPaint &) const |
|
void | drawPath (const SkPath &, const SkPaint &, const SkMatrix *preMatrix, bool pathIsMutable, bool drawCoverage, SkBlitter *customBlitter=NULL) const |
|
void | drawLine (const SkPoint[2], const SkPaint &) const |
|
void | drawDevPath (const SkPath &devPath, const SkPaint &paint, bool drawCoverage, SkBlitter *customBlitter, bool doFill) const |
|
bool SK_WARN_UNUSED_RESULT | computeConservativeLocalClipBounds (SkRect *bounds) const |
| Return the current clip bounds, in local coordinates, with slop to account for antialiasing or hairlines (i.e. More...
|
|
uint32_t SK_WARN_UNUSED_RESULT | scalerContextFlags () const |
| Returns the current setting for using fake gamma and contrast. More...
|
|
bool SK_WARN_UNUSED_RESULT SkDraw::computeConservativeLocalClipBounds |
( |
SkRect * |
bounds | ) |
const |
|
private |
Return the current clip bounds, in local coordinates, with slop to account for antialiasing or hairlines (i.e.
device-bounds outset by 1, and then run through the inverse of the matrix).
If the matrix cannot be inverted, or the current clip is empty, return false and ignore bounds parameter.
Based on the paint's style, strokeWidth, and the matrix, classify how to draw the rect.
If no special-case is available, returns kPath_RectType.
Iff RectType == kStroke_RectType, then strokeSize is set to the device width and height of the stroke.
void SkDraw::drawPath |
( |
const SkPath & |
path, |
|
|
const SkPaint & |
paint, |
|
|
const SkMatrix * |
prePathMatrix, |
|
|
bool |
pathIsMutable |
|
) |
| const |
|
inline |
To save on mallocs, we allow a flag that tells us that srcPath is mutable, so that we don't have to make copies of it as we transform it.
If prePathMatrix is not null, it should logically be applied before any stroking or other effects. If there are no effects on the paint that affect the geometry/rasterization, then the pre matrix can just be pre-concated with the current matrix.