pixelart 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pixelart/composite.rb +1 -1
- data/lib/pixelart/image.rb +7 -0
- data/lib/pixelart/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c2b93e1779a1c06ff0b13dbfcae471648cd2f2dc153b17da3fd864615f6f6c1
|
4
|
+
data.tar.gz: cef870177214b37eb902a99a41410dc8c080b613fed7c48cccd801290392fd28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac5ad9fd3e16d9d490d7c43c38fa2b95ee6318a7c0f319e142fc59084ab70315ebb3d0e800d4536a098214768cab3adae99b1ec2c482ce93a4ab1e902d36cc5
|
7
|
+
data.tar.gz: 67e9e1214ae9f614a2694d30a9b63ce5aa2c83dad17a98dac141913b86cb4375ea22fc0630e2e3160f6b768b4b79ab2236555d0467471fd6a127f477ca48f6db
|
data/lib/pixelart/composite.rb
CHANGED
@@ -60,7 +60,7 @@ class ImageComposite < Image # check: (re)name to Collage, Sheet, Sprites, or s
|
|
60
60
|
# get tile
|
61
61
|
|
62
62
|
def tile( index )
|
63
|
-
y, x = index.divmod( @
|
63
|
+
y, x = index.divmod( @tile_cols )
|
64
64
|
img = @img.crop( x*@tile_width, y*@tile_height, @tile_width, @tile_height )
|
65
65
|
Image.new( img.width, img.height, img ) ## wrap in pixelart image
|
66
66
|
end
|
data/lib/pixelart/image.rb
CHANGED
@@ -95,6 +95,13 @@ def grayscale
|
|
95
95
|
Image.new( img.width, img.height, img )
|
96
96
|
end
|
97
97
|
|
98
|
+
def mirror
|
99
|
+
img = @img.mirror
|
100
|
+
Image.new( img.width, img.height, img )
|
101
|
+
end
|
102
|
+
alias_method :flip_vertically, :mirror
|
103
|
+
|
104
|
+
|
98
105
|
## add replace_colors alias too? - why? why not?
|
99
106
|
def change_colors( color_map )
|
100
107
|
color_map = _parse_color_map( color_map )
|
data/lib/pixelart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pixelart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chunky_png
|