teaas 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/CHANGELOG.md +3 -0
- data/README.md +0 -2
- data/lib/teaas/marquee.rb +8 -6
- data/teaas.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39ad7c50dd5f51145ba9cfdc088909a8125a48a5
|
4
|
+
data.tar.gz: c677973b6901b8102aaf86cb64825e3074556a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85dd22ff6614c0167b5240bcbfac27b8f2f3744428cad84cc29a7c3c4a28cb7b9a96fdac1deea49dfe576a73b1df7dddd342afff8dab3f2b7d74260eec8f2fb3
|
7
|
+
data.tar.gz: 4707bb6253ea504b30233ee84befc124722b05b4efd8a3303b5113d879ba63f5a51dd1618f79fad709f7513a61f5fea85011798e1b283f99cba161cc832e5748
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -27,8 +27,6 @@ Making an image a marquee involves taking a static image, and making intermediat
|
|
27
27
|
|
28
28
|
**NOTE**: Marquee removes any transparency from the image.
|
29
29
|
|
30
|
-
**NOTE**: Marquee does not work on all images right now. This initial version works best on small images that make sense to be converted into a marquee. Larger images might not work as expected.
|
31
|
-
|
32
30
|
## Documentation
|
33
31
|
Docs are in [YARD](http://yardoc.org/) format. To build the HTML docs, just `gem install yard` then run `yard`. If you'd rather not use YARD, you can just read the documentation for the methods in the source files.
|
34
32
|
|
data/lib/teaas/marquee.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Teaas
|
2
2
|
class Marquee
|
3
3
|
|
4
|
-
# Takes in an image, rolls it
|
4
|
+
# Takes in an image, rolls it 20%, 40%, 60%, and 80%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds.
|
5
5
|
#
|
6
6
|
# @param original_img [Magick::ImageList] The image to be created into a marquee
|
7
7
|
# @return [Magick::ImageList] The marquee image
|
@@ -10,16 +10,18 @@ module Teaas
|
|
10
10
|
img = original_img.flatten_images
|
11
11
|
img.format = "gif"
|
12
12
|
|
13
|
+
img_width = img.columns
|
14
|
+
|
13
15
|
marquee_image << img
|
14
|
-
marquee_image << img.roll(
|
15
|
-
marquee_image << img.roll(
|
16
|
-
marquee_image << img.roll(
|
17
|
-
marquee_image << img.roll(
|
16
|
+
marquee_image << img.roll(img_width * 0.2, 0)
|
17
|
+
marquee_image << img.roll(img_width * 0.4, 0)
|
18
|
+
marquee_image << img.roll(img_width * 0.6, 0)
|
19
|
+
marquee_image << img.roll(img_width * 0.8, 0)
|
18
20
|
|
19
21
|
marquee_image
|
20
22
|
end
|
21
23
|
|
22
|
-
# Takes in an image, rolls it
|
24
|
+
# Takes in an image, rolls it 20%, 40%, 60%, and 80%, then returns an animated marquee image. Best when used with {Teaas::Turboize.turbo} to generate multiple marquee speeds. This is a wrapper around {Teaas::Marquee.marquee}
|
23
25
|
#
|
24
26
|
# @param path [String] Path to the image to be created to a marquee image
|
25
27
|
# @return [Magick::ImageList] The marquee image
|
data/teaas.gemspec
CHANGED