psd 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/psd/node.rb +9 -1
- data/lib/psd/nodes/layer.rb +2 -12
- data/lib/psd/version.rb +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: 2a7b8aa2fdc727961204ba934d689d5216a5a8f4
|
4
|
+
data.tar.gz: ab928409ec35488d7ec85115e08be60c0b119145
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf126da9f345dcabf2cff7774fce4202eb12cc72cf8261f4e50f9bb3b9c4a3b32d8b322506a5f0b1860737f5db3025f6a8eb98d7e8f0d59450e01aba9c2ba606
|
7
|
+
data.tar.gz: 95507b3c5a2d302e3ff42ef51b05ed4a7953ad0aed399634af50b12cda8c8e339a928f77bafaa42a6cf37f6630e3a995686970d2b7391c43279fb8aed1fd03fe
|
data/lib/psd/node.rb
CHANGED
@@ -106,13 +106,21 @@ class PSD
|
|
106
106
|
type: nil,
|
107
107
|
visible: visible?,
|
108
108
|
opacity: @layer.opacity / 255.0,
|
109
|
-
blending_mode: @layer.blending_mode
|
109
|
+
blending_mode: @layer.blending_mode,
|
110
|
+
layer_comps: {}
|
110
111
|
}
|
111
112
|
|
112
113
|
PROPERTIES.each do |p|
|
113
114
|
hash[p] = self.send(p)
|
114
115
|
end
|
115
116
|
|
117
|
+
root.psd.layer_comps.each do |comp|
|
118
|
+
hash[:layer_comps][comp[:name]] = {
|
119
|
+
visible: visible_in_comp?(comp[:id]),
|
120
|
+
position: position_in_comp(comp[:id])
|
121
|
+
}
|
122
|
+
end
|
123
|
+
|
116
124
|
hash
|
117
125
|
end
|
118
126
|
|
data/lib/psd/nodes/layer.rb
CHANGED
@@ -16,7 +16,7 @@ class PSD
|
|
16
16
|
|
17
17
|
# Exports this layer to a Hash.
|
18
18
|
def to_hash
|
19
|
-
|
19
|
+
super.merge({
|
20
20
|
type: :layer,
|
21
21
|
text: @layer.text,
|
22
22
|
ref_x: reference_point.x,
|
@@ -26,18 +26,8 @@ class PSD
|
|
26
26
|
width: @layer.image.width,
|
27
27
|
height: @layer.image.height,
|
28
28
|
channels: @layer.channels_info
|
29
|
-
},
|
30
|
-
layer_comps: {}
|
31
|
-
})
|
32
|
-
|
33
|
-
root.psd.layer_comps.each do |comp|
|
34
|
-
hash[:layer_comps][comp[:name]] = {
|
35
|
-
visible: visible_in_comp?(comp[:id]),
|
36
|
-
position: position_in_comp(comp[:id])
|
37
29
|
}
|
38
|
-
|
39
|
-
|
40
|
-
hash
|
30
|
+
})
|
41
31
|
end
|
42
32
|
|
43
33
|
# In case the layer doesn't have a reference point
|
data/lib/psd/version.rb
CHANGED