10 #ifndef SkDraw_DEFINED
11 #define SkDraw_DEFINED
16 #include "SkStrokeRec.h"
34 void drawPaint(
const SkPaint&)
const;
36 const SkPaint&,
bool forceUseDevice =
false)
const;
38 const SkRect* postPaintRect)
const;
39 void drawRect(
const SkRect& rect,
const SkPaint& paint)
const {
40 this->drawRect(rect, paint, NULL, NULL);
53 const SkMatrix* prePathMatrix,
bool pathIsMutable)
const {
54 this->
drawPath(path, paint, prePathMatrix, pathIsMutable,
false);
58 SkBlitter* customBlitter = NULL)
const {
59 this->
drawPath(path, paint, NULL,
false,
false, customBlitter);
66 void drawText(
const char text[],
size_t byteLength, SkScalar x,
67 SkScalar y,
const SkPaint& paint)
const;
68 void drawPosText(
const char text[],
size_t byteLength,
69 const SkScalar pos[],
int scalarsPerPosition,
71 void drawVertices(SkCanvas::VertexMode mode,
int count,
74 const uint16_t indices[],
int ptCount,
84 SkBlitter* customBlitter = NULL)
const {
85 this->
drawPath(src, paint, NULL,
false,
true, customBlitter);
96 SkStrokeRec::InitStyle style);
117 void drawText_asPaths(
const char text[],
size_t byteLength,
118 SkScalar x, SkScalar y,
const SkPaint&)
const;
119 void drawPosText_asPaths(
const char text[],
size_t byteLength,
120 const SkScalar pos[],
int scalarsPerPosition,
122 static SkScalar ComputeResScaleForStroking(
const SkMatrix& );
128 bool pathIsMutable,
bool drawCoverage,
129 SkBlitter* customBlitter = NULL)
const;
132 void drawDevPath(
const SkPath& devPath,
const SkPaint& paint,
bool drawCoverage,
133 SkBlitter* customBlitter,
bool doFill)
const;
142 bool SK_WARN_UNUSED_RESULT
151 const SkRasterClip* fRC;
157 void validate()
const;
159 void validate()
const {}
The SkRRect class represents a rounded rect with a potentially different radii for each corner...
Definition: SkRRect.h:48
The SkPath class encapsulates compound (multiple contour) geometric paths consisting of straight line...
Definition: SkPath.h:27
void drawPathCoverage(const SkPath &src, const SkPaint &paint, SkBlitter *customBlitter=NULL) const
Overwrite the target with the path's coverage (i.e.
Definition: SkDraw.h:83
uint32_t SK_WARN_UNUSED_RESULT scalerContextFlags() const
Returns the current setting for using fake gamma and contrast.
CreateMode
Definition: SkMask.h:120
PointMode
Definition: SkCanvas.h:620
Pairs SkImageInfo with actual pixels and rowbytes.
Definition: SkPixmap.h:23
Definition: SkPoint.h:156
The SkMatrix class holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:26
bool SK_WARN_UNUSED_RESULT computeConservativeLocalClipBounds(SkRect *bounds) const
Return the current clip bounds, in local coordinates, with slop to account for antialiasing or hairli...
The SkPaint class holds the style and color information about how to draw geometries, text and bitmaps.
Definition: SkPaint.h:46
SkMask is used to describe alpha bitmaps, either 1bit, 8bit, or the 3-channel 3D format.
Definition: SkMask.h:19
SkXfermode is the base class for objects that are called to implement custom "transfer-modes" in the ...
Definition: SkXfermode.h:34
The SkBitmap class specifies a raster bitmap.
Definition: SkBitmap.h:41
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...
SkMaskFilter is the base class for object that perform transformations on an alpha-channel mask befor...
Definition: SkMaskFilter.h:44
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.
The SkRegion class encapsulates the geometric region used to specify clipping areas for drawing...
Definition: SkRegion.h:30
uint32_t SkColor
32 bit ARGB color value, not premultiplied.
Definition: SkColor.h:28
Definition: SkDevice.h:28
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 m...
Definition: SkDraw.h:52
SkIRect holds four 32 bit integer coordinates for a rectangle.
Definition: SkRect.h:20
Definition: SkClipStack.h:26