Class: DynamicPDFApi::PngIndexedColorFormat
- Inherits:
-
PngColorFormat
- Object
- ColorFormat
- PngColorFormat
- DynamicPDFApi::PngIndexedColorFormat
- Defined in:
- lib/ruby_client/Imaging/PngIndexedColorFormat.rb
Overview
Represents indexed color format for PNG.
Instance Attribute Summary collapse
-
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for PNG.
-
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for PNG.
-
#quantization_algorithm ⇒ Object
Gets or sets the QuantizationAlgorithm for PNG.
Attributes inherited from ColorFormat
Instance Method Summary collapse
-
#initialize ⇒ PngIndexedColorFormat
constructor
Initializes a new instance of the PngIndexedColorFormat class with indexed color format type.
- #to_json(_options = {}) ⇒ Object
Constructor Details
#initialize ⇒ PngIndexedColorFormat
Initializes a new instance of the PngIndexedColorFormat class with indexed color format type.
16 17 18 19 20 21 |
# File 'lib/ruby_client/Imaging/PngIndexedColorFormat.rb', line 16 def initialize super(ColorFormatType::Indexed) @quantization_algorithm = nil @dithering_percent = nil @dithering_algorithm = nil end |
Instance Attribute Details
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for PNG.
11 12 13 |
# File 'lib/ruby_client/Imaging/PngIndexedColorFormat.rb', line 11 def dithering_algorithm @dithering_algorithm end |
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for PNG.
10 11 12 |
# File 'lib/ruby_client/Imaging/PngIndexedColorFormat.rb', line 10 def dithering_percent @dithering_percent end |
#quantization_algorithm ⇒ Object
Gets or sets the QuantizationAlgorithm for PNG.
9 10 11 |
# File 'lib/ruby_client/Imaging/PngIndexedColorFormat.rb', line 9 def quantization_algorithm @quantization_algorithm end |
Instance Method Details
#to_json(_options = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ruby_client/Imaging/PngIndexedColorFormat.rb', line 23 def to_json( = {}) json_array = {} json_array['quantizationAlgorithm'] = @quantization_algorithm json_array['ditheringPercent'] = @dithering_percent json_array['ditheringAlgorithm'] = @dithering_algorithm JSON.pretty_generate(json_array) end |