Class: PSD::SolidColor
Instance Attribute Summary
Attributes inherited from LayerInfo
#data
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from LayerInfo
#initialize, #skip
Constructor Details
This class inherits a constructor from PSD::LayerInfo
Class Method Details
.should_parse?(key) ⇒ Boolean
5
6
7
|
# File 'lib/psd/layer/info/solid_color.rb', line 5
def self.should_parse?(key)
key == 'SoCo'
end
|
Instance Method Details
#b ⇒ Object
26
27
28
|
# File 'lib/psd/layer/info/solid_color.rb', line 26
def b
@b ||= color_data['Bl '].round
end
|
#color ⇒ Object
14
15
16
|
# File 'lib/psd/layer/info/solid_color.rb', line 14
def color
ChunkyPNG::Color.rgb(r, g, b)
end
|
#g ⇒ Object
22
23
24
|
# File 'lib/psd/layer/info/solid_color.rb', line 22
def g
@g ||= color_data['Grn '].round
end
|
#parse ⇒ Object
9
10
11
12
|
# File 'lib/psd/layer/info/solid_color.rb', line 9
def parse
@file.seek 4, IO::SEEK_CUR
@data = Descriptor.new(@file).parse
end
|
#r ⇒ Object
18
19
20
|
# File 'lib/psd/layer/info/solid_color.rb', line 18
def r
@r ||= color_data['Rd '].round
end
|