aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/strokes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r--gm/strokes.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/gm/strokes.cpp b/gm/strokes.cpp
index d8b21b2f2e..862a517d5f 100644
--- a/gm/strokes.cpp
+++ b/gm/strokes.cpp
@@ -25,11 +25,9 @@ static void rnd_rect(SkRect* r, SkPaint* paint, SkRandom& rand) {
SkScalar y = rand.nextUScalar1() * H;
SkScalar w = rand.nextUScalar1() * (W >> 2);
SkScalar h = rand.nextUScalar1() * (H >> 2);
- SkScalar hoffset = rand.nextSScalar1();
- SkScalar woffset = rand.nextSScalar1();
r->set(x, y, x + w, y + h);
- r->offset(-w/2 + woffset, -h/2 + hoffset);
+ r->offset(-w/2 + rand.nextSScalar1(), -h/2 + + rand.nextSScalar1());
paint->setColor(rand.nextU());
paint->setAlpha(0xFF);