Skip to content

Commit b44f76f

Browse files
committed
tidy up
1 parent a893d0e commit b44f76f

File tree

7 files changed

+473
-12
lines changed

7 files changed

+473
-12
lines changed

contributed/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ end
1515

1616
def run_sample(sample_name)
1717
puts "Running #{sample_name}...quit to run next sample"
18-
system "k9 -r #{sample_name}"
18+
system "jruby --dev -S k9 -r #{sample_name}"
1919
end

contributed/data/java_args.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/sun.java2d.opengl=ALL-UNNAMED
1+
--add-opens java.base/java.nio=ALL-UNNAMED
2+
--add-opens java.desktop/java.awt=ALL-UNNAMED
3+

contributed/data/sutcliffe.png

237 KB
Loading

contributed/fading.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
load_libraries :my_dot, :color_group
1+
load_libraries :my_dot
22

33
NUM_ELEM = 100
44
PALETTE = %w[#F58F12 #0B9EE7 #4EA731 #F4D910 #F334E3 #202020]
5-
attr_reader :my_dots, :frm, :save_anim, :group
5+
attr_reader :my_dots, :frm, :save_anim, :colors
66

77
def setup
88
sketch_title 'Fading Arcs'
9-
@group = ColorGroup.from_web_array(PALETTE)
10-
colors = group.colors
11-
background(group.last)
9+
@colors = web_to_color_array(PALETTE)
10+
background(colors.last)
1211
no_stroke
1312
@save_anim = false
1413
@my_dots = (0..NUM_ELEM).map do
@@ -22,7 +21,7 @@ def setup
2221
end
2322

2423
def draw
25-
fill(group.last, 10)
24+
fill(colors.last, 10)
2625
rect(0, 0, width, height)
2726
my_dots.each(&:display)
2827
return unless save_anim

contributed/recursive_pentagon.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def setup
77
sketch_title 'Recursive Pentagons'
88
@strut_factor = 0.2
99
@renderer = GfxRender.new self.g # so we can send Vec2D :to_vertex
10-
group = ColorGroup.from_web_array(PALETTE.to_java(:string))
10+
group = ColorGroup.from_web_array(PALETTE)
1111
@cols = group.colors
1212
background(cols.last)
1313
no_loop

external_library/gem/ruby_wordcram/render_to_buffer.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def draw_progress_bar(progress)
4545
rect(100, (height / 2) - 30, (width - 200), 60)
4646
# Fill in the portion that's done:
4747
fill(gray)
48-
rect(100, (height/2)-30, (width-200) * progress, 60)
48+
rect(100, (height / 2) - 30, (width - 200) * progress, 60)
4949
end
5050

51-
def draw_progress_text(progress)
52-
text(format('%d%', (progress * 100).round), width / 2, (height / 2) + 50)
51+
def draw_progress_text(progress = 0)
52+
text "#{(progress * 100).round}%", width / 2, (height / 2) + 50
5353
end

0 commit comments

Comments
 (0)