Index: src/animator/SkDrawPaint.cpp |
diff --git a/src/animator/SkDrawPaint.cpp b/src/animator/SkDrawPaint.cpp |
index 4d1bd8b4305921499cbaf5732287f591be2eb93b..c0ca38df75b1f9a29fcf0763a6f75dc3b5a9ce76 100644 |
--- a/src/animator/SkDrawPaint.cpp |
+++ b/src/animator/SkDrawPaint.cpp |
@@ -224,7 +224,7 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const { |
// stroke is legacy; style setting if present overrides stroke |
if (stroke != -1) |
paint->setStyle(SkToBool(stroke) ? SkPaint::kStroke_Style : SkPaint::kFill_Style); |
- if (style != (SkPaint::Style) -1) |
+ if (style != SkPaint::kStyleCount) |
reed1
2013/03/28 13:13:07
For all of these changes, do you know that style (
|
paint->setStyle((SkPaint::Style) style); |
if (linearText != -1) |
paint->setLinearText(SkToBool(linearText)); |
@@ -242,15 +242,15 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const { |
SkSafeUnref(paint->setShader(shader->getShader())); |
if (strikeThru != -1) |
paint->setStrikeThruText(SkToBool(strikeThru)); |
- if (strokeCap != (SkPaint::Cap) -1) |
+ if (strokeCap != SkPaint::kCapCount) |
paint->setStrokeCap((SkPaint::Cap) strokeCap); |
- if (strokeJoin != (SkPaint::Join) -1) |
+ if (strokeJoin != SkPaint::kJoinCount) |
paint->setStrokeJoin((SkPaint::Join) strokeJoin); |
if (SkScalarIsNaN(strokeMiter) == false) |
paint->setStrokeMiter(strokeMiter); |
if (SkScalarIsNaN(strokeWidth) == false) |
paint->setStrokeWidth(strokeWidth); |
- if (textAlign != (SkPaint::Align) -1) |
+ if (textAlign != SkPaint::kAlignCount) |
paint->setTextAlign((SkPaint::Align) textAlign); |
if (SkScalarIsNaN(textScaleX) == false) |
paint->setTextScaleX(textScaleX); |
@@ -264,6 +264,6 @@ void SkDrawPaint::setupPaint(SkPaint* paint) const { |
SkSafeUnref(paint->setTypeface(typeface->getTypeface())); |
if (underline != -1) |
paint->setUnderlineText(SkToBool(underline)); |
- if (xfermode != (SkXfermode::Mode) -1) |
+ if (xfermode != SkXfermode::kModeCount) |
paint->setXfermodeMode((SkXfermode::Mode) xfermode); |
} |