Class: DynamicPDFApi::Grayscale
- Defined in:
- lib/ruby_client/Grayscale.rb
Overview
Represents a grayscale color.
Instance Attribute Summary collapse
-
#_color_string ⇒ Object
Returns the value of attribute _color_string.
Class Method Summary collapse
-
.black ⇒ Object
Gets the color black.
- .create_grayscale(gray_level) ⇒ Object
-
.white ⇒ Object
Gets the color white.
Instance Method Summary collapse
-
#initialize(gray_level = 0) ⇒ Grayscale
constructor
Initializes a new instance of the Grayscale class.
Constructor Details
#initialize(gray_level = 0) ⇒ Grayscale
Initializes a new instance of the Grayscale class.
13 14 15 16 17 |
# File 'lib/ruby_client/Grayscale.rb', line 13 def initialize(gray_level = 0) super() @gray_level = gray_level @_color_string = "gray(#{gray_level})" end |
Instance Attribute Details
#_color_string ⇒ Object
Returns the value of attribute _color_string.
39 40 41 |
# File 'lib/ruby_client/Grayscale.rb', line 39 def _color_string @_color_string end |
Class Method Details
.black ⇒ Object
Gets the color black.
28 29 30 |
# File 'lib/ruby_client/Grayscale.rb', line 28 def self.black Grayscale.new(0) end |