fn draw_paper_texture3(draw: &Draw, win: &Rect) {
  for n in 0..10000 {
    let start_angle = random_range(0.0, PI);
    let start_offset = random_range(win.w() / -2.0, win.w() / 2.0);
    let end_offset = random_range(win.w() / -2.0, win.w() / 2.0);
    let start = pt2(
      start_angle.cos() * win.w() * 1.5 + start_offset + win.left(),
      start_angle.sin() * win.h() * 1.5 + start_offset + win.top(),
    );
    let end = pt2(
      start_angle.cos() * win.w() * -1.5 + end_offset + win.left(),
      start_angle.sin() * win.h() * -1.5 + end_offset + win.top(),
    );
    draw
      .line()
      .start(start)
      .end(end)
      .color(hsla(0.0, 0.0, 0.1, 0.01));
  }
}
// nicer paper texture, but is not uniform, collects at top left
nicer paper texture, but is not uniform, collects at top left
nicer paper texture but is not uniform collects at top left
fn draw_paper_texture3(draw: &Draw, win: &Rect) {
  for n in 0..10000 {
    let start_angle = random_range(0.0, PI);
    let start_offset = random_range(win.w() / -2.0, win.w() / 2.0);
    let end_offset = random_range(win.w() / -2.0, win.w() / 2.0);
    let start = pt2(
      start_angle.cos() * win.w() * 1.5 + start_offset + win.left(),
      start_angle.sin() * win.h() * 1.5 + start_offset + win.top(),
    );
    let end = pt2(
      start_angle.cos() * win.w() * -1.5 + end_offset + win.left(),
      start_angle.sin() * win.h() * -1.5 + end_offset + win.top(),
    );
    draw
      .line()
      .start(start)
      .end(end)
      .color(hsla(0.0, 0.0, 0.1, 0.01));
  }
}
fn draw_paper_texture3 ( draw : & Draw , win : & Rect ) { for n in 0 .. 10000 { let start_angle = random_range ( 0.0 , PI ) ; let start_offset = random_range ( win . w ( ) / - 2.0 , win . w ( ) / 2.0 ) ; let end_offset = random_range ( win . w ( ) / - 2.0 , win . w ( ) / 2.0 ) ; let start = pt2 ( start_angle . cos ( ) * win . w ( ) * 1.5 + start_offset + win . left ( ) , start_angle . sin ( ) * win . h ( ) * 1.5 + start_offset + win . top ( ) , ) ; let end = pt2 ( start_angle . cos ( ) * win . w ( ) * - 1.5 + end_offset + win . left ( ) , start_angle . sin ( ) * win . h ( ) * - 1.5 + end_offset + win . top ( ) , ) ; draw . line ( ) . start ( start ) . end ( end ) . color ( hsla ( 0.0 , 0.0 , 0.1 , 0.01 ) ) ; } }
nicer paper texture, but is not uniform, collects at top left
nicer paper texture but is not uniform collects at top left
draw
&Draw
win
&Rect