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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 066a13d4aff234657b8685f611168ed012fd6b949a292add28e7729f31c1bdc7
4
- data.tar.gz: a7f748b8c246bb4c944da848baef19d4fdc6cd9c74ac96050c38aa907e680247
3
+ metadata.gz: 3c2b93e1779a1c06ff0b13dbfcae471648cd2f2dc153b17da3fd864615f6f6c1
4
+ data.tar.gz: cef870177214b37eb902a99a41410dc8c080b613fed7c48cccd801290392fd28
5
5
  SHA512:
6
- metadata.gz: de3a072fd7dd9fe939340f1914fdeab6cc16dd5a2c25fb86548a3d5d89eb043b8d236dd62e2be86ac191bc0a5689eec2d3d6a3b465e08853a85cc285f394701a
7
- data.tar.gz: 6fc5ffec090a5fbdc29b990812168d7716b4a563f3faffe8bd69ed09da70ca079af6334fa523cfdf3ed96f1228fd35842bc44d72139eeb6dc1b1d6299bf08b09
6
+ metadata.gz: 8ac5ad9fd3e16d9d490d7c43c38fa2b95ee6318a7c0f319e142fc59084ab70315ebb3d0e800d4536a098214768cab3adae99b1ec2c482ce93a4ab1e902d36cc5
7
+ data.tar.gz: 67e9e1214ae9f614a2694d30a9b63ce5aa2c83dad17a98dac141913b86cb4375ea22fc0630e2e3160f6b768b4b79ab2236555d0467471fd6a127f477ca48f6db
@@ -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( @tile_rows )
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
@@ -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 )
@@ -3,7 +3,7 @@ module Pixelart
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- PATCH = 1
6
+ PATCH = 2
7
7
  VERSION = [MAJOR,MINOR,PATCH].join('.')
8
8
 
9
9
  def self.version
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.1
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-15 00:00:00.000000000 Z
11
+ date: 2021-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chunky_png