Class: PDF::Inspector::Graphics::Color
- Inherits:
-
PDF::Inspector
- Object
- PDF::Inspector
- PDF::Inspector::Graphics::Color
- Defined in:
- lib/pdf/inspector/graphics.rb
Instance Attribute Summary collapse
-
#color_space ⇒ Object
readonly
Returns the value of attribute color_space.
-
#fill_color ⇒ Object
readonly
Returns the value of attribute fill_color.
-
#fill_color_count ⇒ Object
readonly
Returns the value of attribute fill_color_count.
-
#stroke_color ⇒ Object
readonly
Returns the value of attribute stroke_color.
-
#stroke_color_count ⇒ Object
readonly
Returns the value of attribute stroke_color_count.
-
#stroke_color_space_count ⇒ Object
readonly
Returns the value of attribute stroke_color_space_count.
Instance Method Summary collapse
-
#initialize ⇒ Color
constructor
A new instance of Color.
- #set_color_for_nonstroking_and_special(*params) ⇒ Object
- #set_color_for_stroking_and_special(*params) ⇒ Object
- #set_stroke_color_space(*params) ⇒ Object
Methods inherited from PDF::Inspector
Constructor Details
#initialize ⇒ Color
Returns a new instance of Color.
62 63 64 65 66 |
# File 'lib/pdf/inspector/graphics.rb', line 62 def initialize @stroke_color_count = 0 @fill_color_count = 0 @stroke_color_space_count = {:DeviceCMYK => 0, :DeviceRGB => 0} end |
Instance Attribute Details
#color_space ⇒ Object (readonly)
Returns the value of attribute color_space.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def color_space @color_space end |
#fill_color ⇒ Object (readonly)
Returns the value of attribute fill_color.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def fill_color @fill_color end |
#fill_color_count ⇒ Object (readonly)
Returns the value of attribute fill_color_count.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def fill_color_count @fill_color_count end |
#stroke_color ⇒ Object (readonly)
Returns the value of attribute stroke_color.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def stroke_color @stroke_color end |
#stroke_color_count ⇒ Object (readonly)
Returns the value of attribute stroke_color_count.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def stroke_color_count @stroke_color_count end |
#stroke_color_space_count ⇒ Object (readonly)
Returns the value of attribute stroke_color_space_count.
59 60 61 |
# File 'lib/pdf/inspector/graphics.rb', line 59 def stroke_color_space_count @stroke_color_space_count end |
Instance Method Details
#set_color_for_nonstroking_and_special(*params) ⇒ Object
73 74 75 76 |
# File 'lib/pdf/inspector/graphics.rb', line 73 def set_color_for_nonstroking_and_special(*params) @fill_color_count += 1 @fill_color = params end |
#set_color_for_stroking_and_special(*params) ⇒ Object
68 69 70 71 |
# File 'lib/pdf/inspector/graphics.rb', line 68 def set_color_for_stroking_and_special(*params) @stroke_color_count += 1 @stroke_color = params end |
#set_stroke_color_space(*params) ⇒ Object
78 79 80 81 |
# File 'lib/pdf/inspector/graphics.rb', line 78 def set_stroke_color_space(*params) @stroke_color_space_count[params[0]] += 1 @color_space = params[0] end |