Class: DynamicPDFApi::TiffMonochromeColorFormat
- Inherits:
-
TiffColorFormat
- Object
- ColorFormat
- TiffColorFormat
- DynamicPDFApi::TiffMonochromeColorFormat
- Defined in:
- lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb
Overview
Represents monochrome color format for TIFF with black threshold and compression type.
Instance Attribute Summary collapse
-
#black_threshold ⇒ Object
Gets or sets the black threshold for monochrome TIFF.
-
#compression_type ⇒ Object
Gets or sets the CompressionType for monochrome TIFF.
-
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for TIFF.
-
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for TIFF.
Attributes inherited from ColorFormat
Instance Method Summary collapse
-
#initialize ⇒ TiffMonochromeColorFormat
constructor
Initializes a new instance of the TiffMonochromeColorFormat class with monochrome color format type.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the TiffMonochromeColorFormat object.
Constructor Details
#initialize ⇒ TiffMonochromeColorFormat
Initializes a new instance of the TiffMonochromeColorFormat class with monochrome color format type.
17 18 19 20 21 22 23 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 17 def initialize super(ColorFormatType::Monochrome) @black_threshold = nil @compression_type = nil @dithering_percent = nil @dithering_algorithm = nil end |
Instance Attribute Details
#black_threshold ⇒ Object
Gets or sets the black threshold for monochrome TIFF.
9 10 11 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 9 def black_threshold @black_threshold end |
#compression_type ⇒ Object
Gets or sets the CompressionType for monochrome TIFF.
10 11 12 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 10 def compression_type @compression_type end |
#dithering_algorithm ⇒ Object
Gets or sets the DitheringAlgorithm for TIFF.
12 13 14 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 12 def dithering_algorithm @dithering_algorithm end |
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for TIFF.
11 12 13 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 11 def dithering_percent @dithering_percent end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the TiffMonochromeColorFormat object.
30 31 32 33 34 35 36 37 38 |
# File 'lib/ruby_client/Imaging/TiffMonochromeColorFormat.rb', line 30 def to_json( = {}) json_array = {} json_array['blackThreshold'] = @black_threshold json_array['compressionType'] = @compression_type json_array['ditheringPercent'] = @dithering_percent json_array['ditheringAlgorithm'] = @dithering_algorithm JSON.pretty_generate(json_array) end |