Lines Matching refs:rand
17 static void rnd_quad(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_quad() argument
18 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_quad()
20 p->quadTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_quad()
21 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H)); in rnd_quad()
23 paint->setColor(rand.nextU()); in rnd_quad()
24 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_quad()
30 static void rnd_cubic(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_cubic() argument
31 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_cubic()
33 p->cubicTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_cubic()
34 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H), in rnd_cubic()
35 rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(H / 4, H)); in rnd_cubic()
37 paint->setColor(rand.nextU()); in rnd_cubic()
38 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_cubic()
64 SkRandom rand; in onDraw() local
67 rnd_quad(&p, &paint, rand); in onDraw()
73 rnd_cubic(&p, &paint, rand); in onDraw()