diff --git a/gm/stringart.cpp b/gm/stringart.cpp index 1dc86efef7..006dfe7524 100644 --- a/gm/stringart.cpp +++ b/gm/stringart.cpp @@ -11,8 +11,8 @@ // Reproduces https://code.google.com/p/chromium/issues/detail?id=279014 -static const int kWidth = 640; -static const int kHeight = 480; +static const SkScalar kWidth = SkIntToScalar(640); +static const SkScalar kHeight = SkIntToScalar(480); static const SkScalar kAngle = 0.305f; // Renders a string art shape. @@ -33,7 +33,7 @@ protected: virtual void onDraw(SkCanvas* canvas) { SkScalar angle = kAngle*SK_ScalarPI + SkScalarHalf(SK_ScalarPI); - SkScalar size = SkMin32(kWidth, kHeight); + SkScalar size = SkMinScalar(kWidth, kHeight); SkPoint center = SkPoint::Make(SkScalarHalf(kWidth), SkScalarHalf(kHeight)); SkScalar length = 5; SkScalar step = angle; diff --git a/samplecode/SampleStringArt.cpp b/samplecode/SampleStringArt.cpp index c6547ed4fa..353d4cc957 100644 --- a/samplecode/SampleStringArt.cpp +++ b/samplecode/SampleStringArt.cpp @@ -37,7 +37,7 @@ protected: SkPath path; path.moveTo(center); - while (length < (SkScalarHalf(SkMin32(this->width(), this->height())) - 10.f)) + while (length < (SkScalarHalf(SkMinScalar(this->width(), this->height())) - 10.f)) { SkPoint rp = SkPoint::Make(length*SkScalarCos(step) + center.fX, length*SkScalarSin(step) + center.fY);