From c24f68da7afc49861b14a86866296819bb1175b7 Mon Sep 17 00:00:00 2001 From: Jon Allured Date: Thu, 7 Nov 2024 07:53:53 -0600 Subject: [PATCH] Add star field section separator --- app/models/daily_packet/pdf_view.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/models/daily_packet/pdf_view.rb b/app/models/daily_packet/pdf_view.rb index 9391a83..6cfd554 100644 --- a/app/models/daily_packet/pdf_view.rb +++ b/app/models/daily_packet/pdf_view.rb @@ -44,6 +44,20 @@ def draw_front_page move_down 20 + bounding_box([0, cursor], width: bounds.width, height: 40) do + stroke_bounds + star_count = Random.rand(20..50) + gap_size = 6 + star_count.times do + star_size = Random.rand(1..4) + star_x = Random.rand(gap_size..(bounds.width - gap_size)) + star_y = Random.rand(gap_size..(bounds.height - gap_size)) + fill_rectangle [star_x, star_y], star_size, star_size + end + end + + move_down 20 + text "Reading Pace", style: :bold, size: 20 text daily_packet.reading_list_phrase, size: 12