Skip to content

Commit ef649d9

Browse files
committed
fix web color
1 parent 41406ab commit ef649d9

File tree

11 files changed

+4470
-4420
lines changed

11 files changed

+4470
-4420
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
v1.2.0 Update samples to use safer fonts, add linux specific suggestion on missing fonts PFont.java, fix :web_to_color_array(web).
2+
13
v1.1.0 Bring up to date with latest development branch, except still target Stretch and Oracle jdk8, add Gemfile to help version locking.
24

35
v1.0.0 Release for Raspbian Stretch and Oracle java

lib/picrate/helper_methods.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def color(*args)
5555
super(hex_color(args[0]))
5656
end
5757

58+
def web_to_color_array(web)
59+
Java::Monkstone::ColorUtil.webArray(web.to_java(:string))
60+
end
61+
5862
def int_to_ruby_colors(hex)
5963
Java::Monkstone::ColorUtil.rubyString(hex)
6064
end

lib/picrate/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module PiCrate
4-
VERSION = '1.1.0'
4+
VERSION = '1.2.0'
55
end

pom.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project 'picrate', 'http://maven.apache.org' do
22

33
model_version '4.0.0'
4-
id 'ruby-processing:picrate:1.1.0'
4+
id 'ruby-processing:picrate:1.2.0'
55
packaging 'jar'
66

77
description 'An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.'

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>ruby-processing</groupId>
1313
<artifactId>picrate</artifactId>
14-
<version>1.1.0</version>
14+
<version>1.2.0</version>
1515
<name>picrate</name>
1616
<description>An integrated processing-core (somewhat hacked), with additional java code for a jruby version of processing.</description>
1717
<url>http://maven.apache.org</url>

src/main/java/monkstone/ColorUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ static public int colorString(String hexstring) {
5050
}
5151

5252
/**
53-
*
53+
* Avoid using VarArgs here
5454
* @param web Array of web (hex) String
5555
* @return cols of p5 color (int)
5656
*/
57-
static public int[] webArray(String... web) {
57+
static public int[] webArray(String[] web) {
5858
int[] result = new int[web.length];
5959
for (int i = 0; i < web.length; i++) {
6060
result[i] = java.awt.Color.decode(web[i]).getRGB();

0 commit comments

Comments
 (0)