Lines Matching refs:rand
18 static void rnd_quad(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_quad() argument
19 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_quad()
21 p->quadTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_quad()
22 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H)); in rnd_quad()
24 paint->setColor(rand.nextU()); in rnd_quad()
25 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_quad()
31 static void rnd_cubic(SkPath* p, SkPaint* paint, SkRandom& rand) { in rnd_cubic() argument
32 p->moveTo(rand.nextRangeScalar(0, W), rand.nextRangeScalar(0, H)); in rnd_cubic()
34 p->cubicTo(rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(0, H), in rnd_cubic()
35 rand.nextRangeScalar(0, W), rand.nextRangeScalar(H / 4, H), in rnd_cubic()
36 rand.nextRangeScalar(W / 4, W), rand.nextRangeScalar(H / 4, H)); in rnd_cubic()
38 paint->setColor(rand.nextU()); in rnd_cubic()
39 SkScalar width = rand.nextRangeScalar(1, 5); in rnd_cubic()
65 SkRandom rand; in onDraw() local
68 rnd_quad(&p, &paint, rand); in onDraw()
74 rnd_cubic(&p, &paint, rand); in onDraw()