geo_pattern 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/geo_pattern/pattern.rb +22 -22
- data/lib/geo_pattern/version.rb +1 -1
- metadata +1 -1
data/lib/geo_pattern/pattern.rb
CHANGED
@@ -8,25 +8,25 @@ module GeoPattern
|
|
8
8
|
:base_color => '#933c3c'
|
9
9
|
}
|
10
10
|
|
11
|
-
PATTERNS = [
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
]
|
11
|
+
PATTERNS = %w[
|
12
|
+
octogons
|
13
|
+
overlapping_circles
|
14
|
+
plus_signs
|
15
|
+
xes
|
16
|
+
sine_waves
|
17
|
+
hexagons
|
18
|
+
overlapping_rings
|
19
|
+
plaid
|
20
|
+
triangles
|
21
|
+
squares
|
22
|
+
concentric_circles
|
23
|
+
diamonds
|
24
|
+
tessellation
|
25
|
+
nested_squares
|
26
|
+
mosaic_squares
|
27
|
+
triangles_rotated
|
28
|
+
chevrons
|
29
|
+
].freeze
|
30
30
|
|
31
31
|
FILL_COLOR_DARK = "#222"
|
32
32
|
FILL_COLOR_LIGHT = "#ddd"
|
@@ -81,7 +81,7 @@ module GeoPattern
|
|
81
81
|
|
82
82
|
def generate_pattern
|
83
83
|
if opts[:generator]
|
84
|
-
if PATTERNS.include?(opts[:generator]
|
84
|
+
if PATTERNS.include?(opts[:generator])
|
85
85
|
send("geo_#{opts[:generator]}")
|
86
86
|
else
|
87
87
|
abort("Error: the requested generator is invalid.")
|
@@ -431,7 +431,7 @@ module GeoPattern
|
|
431
431
|
}
|
432
432
|
})
|
433
433
|
|
434
|
-
val = hex_val(
|
434
|
+
val = hex_val(39-i, 1)
|
435
435
|
opacity = opacity(val)
|
436
436
|
fill = fill_color(val)
|
437
437
|
|
@@ -654,7 +654,7 @@ module GeoPattern
|
|
654
654
|
y*square_size + y*block_size*2 + block_size/2,
|
655
655
|
square_size, square_size, styles)
|
656
656
|
|
657
|
-
val = hex_val(
|
657
|
+
val = hex_val(39-i, 1)
|
658
658
|
opacity = opacity(val)
|
659
659
|
fill = fill_color(val)
|
660
660
|
|
data/lib/geo_pattern/version.rb
CHANGED