fn draw_paper_texture2(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,
      start_angle.sin() * win.h() * 1.5 + start_offset,
    );
    let end = pt2(
      start_angle.cos() * win.w() * -1.5 + end_offset,
      start_angle.sin() * win.h() * -1.5 + end_offset,
    );
    draw
      .line()
      .start(start)
      .end(end)
      .color(hsla(0.0, 0.0, 0.1, 0.01));
  }
}
// nicer paper texture but collects around center too much
nicer paper texture but collects around center too much
nicer paper texture but collects around center too much
fn draw_paper_texture2(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,
      start_angle.sin() * win.h() * 1.5 + start_offset,
    );
    let end = pt2(
      start_angle.cos() * win.w() * -1.5 + end_offset,
      start_angle.sin() * win.h() * -1.5 + end_offset,
    );
    draw
      .line()
      .start(start)
      .end(end)
      .color(hsla(0.0, 0.0, 0.1, 0.01));
  }
}
fn draw_paper_texture2 ( 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 , start_angle . sin ( ) * win . h ( ) * 1.5 + start_offset , ) ; let end = pt2 ( start_angle . cos ( ) * win . w ( ) * - 1.5 + end_offset , start_angle . sin ( ) * win . h ( ) * - 1.5 + end_offset , ) ; draw . line ( ) . start ( start ) . end ( end ) . color ( hsla ( 0.0 , 0.0 , 0.1 , 0.01 ) ) ; } }
nicer paper texture but collects around center too much
nicer paper texture but collects around center too much
draw
&Draw
win
&Rect