// TODO(chudy): Refactor into non subclass model.
-SkDrawCommand::SkDrawCommand(DrawType type)
+SkDrawCommand::SkDrawCommand(DrawType type)
: fDrawType(type)
, fVisible(true) {
}
canvas->drawData(fData, fLength);
}
-BeginCommentGroup::BeginCommentGroup(const char* description)
+BeginCommentGroup::BeginCommentGroup(const char* description)
: INHERITED(BEGIN_COMMENT_GROUP)
, fDescription(description) {
SkString* temp = new SkString;
// do nothing. Subclasses may do something with the data
}
- /** Add comments. beginCommentGroup/endCommentGroup open/close a new group.
- Each comment added via addComment is notionally attached to its
+ /** Add comments. beginCommentGroup/endCommentGroup open/close a new group.
+ Each comment added via addComment is notionally attached to its
enclosing group. Top-level comments simply belong to no group.
*/
virtual void beginCommentGroup(const char* description) {
int r = SkClampMax(SkFixedRoundToInt(fr), a);
int g = SkClampMax(SkFixedRoundToInt(fg), a);
int b = SkClampMax(SkFixedRoundToInt(fb), a);
-
+
return SkPackARGB32(a, r, g, b);
}
const int maxX = s.fBitmap->width() - 1;
const int maxY = s.fBitmap->height() - 1;
-
+
while (count-- > 0) {
SkPoint srcPt;
s.fInvProc(*s.fInvMatrix, SkIntToScalar(x),
srcPt.fY -= SK_ScalarHalf;
SkScalar fractx = srcPt.fX - SkScalarFloorToScalar(srcPt.fX);
SkScalar fracty = srcPt.fY - SkScalarFloorToScalar(srcPt.fY);
-
+
SkFixed coeffX[4], coeffY[4];
build_coeff4(coeffX, coefficients, fractx);
build_coeff4(coeffY, coefficients, fracty);
-
+
int sx = SkScalarFloorToInt(srcPt.fX);
int sy = SkScalarFloorToInt(srcPt.fY);
-
+
// Here is where we can support other tile modes (e.g. repeat or mirror)
int x0 = SkClampMax(sx - 1, maxX);
int x1 = SkClampMax(sx , maxX);
// don't have to worry about getting caught in a loop. Thus anywhere
// we call a virtual method, we explicitly prefix it with
// SkCanvas:: to be sure to call the base-class.
-
+
if (inverseFilled) {
switch (op) {
case SkRegion::kIntersect_Op: