backgrounds 0.1.0 → 0.1.1

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: ef9525f2d62a95bfe870dc67de9dac2da261841552f6125fe82b97b5c63605eb
4
- data.tar.gz: 14cf97d01d360c1cc839a5eb2230a3100c5cde2e8a876a4df85f9f4ddbcd1729
3
+ metadata.gz: ce5ceaeec5820f6228efef0307ce81074b0abe17150d783103f0f14ab94c9cb9
4
+ data.tar.gz: 0d85d1ff3f7654eba5e5a27549061920c82057591b1af87400336eed770e08d1
5
5
  SHA512:
6
- metadata.gz: f592ad164a6e94f6644a3a6ddd1fadda9189f37e9dea4dab044f6ca06b60daf921ab57c6ae61238c7db0e387085329474e1044573df5cbf3ad2a3bfa131b73c7
7
- data.tar.gz: 7eae74af8cba9636b9ef5f8b9d0b3c26986ef1535184c27ec8b2f4306c228dbc9e48cf18e54a722f9a2306df5cff189cd1b81d5023f87c1debc09dd8fda36763
6
+ metadata.gz: a351154a8111ac3d164e499588c177b6d0d58548d1caa9f3fcc1c37f981367bea20d1750885c4e01a5c7a6fa44a48cadeb6c8d4def93ea15178afd36f0380c21
7
+ data.tar.gz: 50161fa579c83011271b9e441c60a730881fcfd1828c1bf7581f3ef9dde21331955373cc7faeffa2e20636c3d575f2f929577beb212d6e814c49aa6032a62fdd
data/Manifest.txt CHANGED
@@ -5,5 +5,6 @@ Rakefile
5
5
  config/spritesheet-24x24.csv
6
6
  config/spritesheet-24x24.png
7
7
  lib/backgrounds.rb
8
+ lib/backgrounds/base.rb
8
9
  lib/backgrounds/image.rb
9
10
  lib/backgrounds/version.rb
@@ -0,0 +1,27 @@
1
+ ## 3rd party
2
+ require 'pixelart/base'
3
+ require 'spritesheet/base'
4
+
5
+
6
+ ## our own code
7
+ require 'backgrounds/version' # note: let version always go first
8
+ require 'backgrounds/image'
9
+
10
+
11
+
12
+
13
+ module Pixelart
14
+ class Image
15
+ def background( *values )
16
+ img = Background::Image.generate( *values,
17
+ width: @img.width,
18
+ height: @img.height )
19
+ img.compose!( self )
20
+ img # note: return new image
21
+ end
22
+ end # class Image
23
+ end # module Pixelart
24
+
25
+
26
+
27
+ puts Pixelart::Module::Backgrounds.banner # say hello
@@ -47,7 +47,7 @@ class Image < Pixelart::Image
47
47
  img.ukraine
48
48
  elsif ['pride','rainbow'].include?( value.downcase )
49
49
  img.pride
50
- elsif sheet && pattern=sheet.find_by( name: value ) ## try some built-in background patterns
50
+ elsif sheet && pattern=sheet.find_by( name: value, warn: false ) ## try some built-in background patterns
51
51
  img.compose!( pattern )
52
52
  img
53
53
  else ### assume color
@@ -5,7 +5,7 @@ module Backgrounds
5
5
 
6
6
  MAJOR = 0
7
7
  MINOR = 1
8
- PATCH = 0
8
+ PATCH = 1
9
9
  VERSION = [MAJOR,MINOR,PATCH].join('.')
10
10
 
11
11
  def self.version
data/lib/backgrounds.rb CHANGED
@@ -1,27 +1,10 @@
1
- ## 3rd party
2
- require 'pixelart/base'
3
- require 'spritesheet'
1
+ ## our own code (without "top-level" shortcuts e.g. "modular version")
2
+ require 'backgrounds/base' # aka "strict(er)" version
4
3
 
5
4
 
6
- ## our own code
7
- require 'backgrounds/version' # note: let version always go first
8
- require 'backgrounds/image'
5
+ ###
6
+ # add convenience top-level shortcuts / aliases
7
+ # make Image, Color, Palette8bit, etc top-level
8
+ include Pixelart
9
9
 
10
10
 
11
-
12
-
13
- module Pixelart
14
- class Image
15
- def background( *values )
16
- img = Background::Image.generate( *values,
17
- width: @img.width,
18
- height: @img.height )
19
- img.compose!( self )
20
- img # note: return new image
21
- end
22
- end # class Image
23
- end # module Pixelart
24
-
25
-
26
-
27
- puts Pixelart::Module::Backgrounds.banner # say hello
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backgrounds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerald Bauer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pixelart
@@ -90,6 +90,7 @@ files:
90
90
  - config/spritesheet-24x24.csv
91
91
  - config/spritesheet-24x24.png
92
92
  - lib/backgrounds.rb
93
+ - lib/backgrounds/base.rb
93
94
  - lib/backgrounds/image.rb
94
95
  - lib/backgrounds/version.rb
95
96
  homepage: https://github.com/pixelartexchange/pixelart