зеркало из https://github.com/mozilla/moz-skia.git
Type warning fix for: Add string art GM and sample.
R=robertphillips@google.com Review URL: https://codereview.chromium.org/24258003 git-svn-id: http://skia.googlecode.com/svn/trunk@11384 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
4ea2878f07
Коммит
417446a1ce
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче