Class: DynamicPDFApi::BmpMonochromeColorFormat
- Inherits:
-
BmpColorFormat
- Object
- ColorFormat
- BmpColorFormat
- DynamicPDFApi::BmpMonochromeColorFormat
- Defined in:
- lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb
Overview
Represents monochrome color format for BMP.
Instance Attribute Summary collapse
-
#black_threshold ⇒ Object
Gets or sets the black threshold for monochrome BMP, ranges from 0-255.
-
#dithering_algorithm ⇒ Object
Gets or sets the dithering algorithm for BMP.
-
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for BMP.
Attributes inherited from ColorFormat
Instance Method Summary collapse
-
#initialize ⇒ BmpMonochromeColorFormat
constructor
Creates object for monochrome color format for BMP image format.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the BmpMonochromeColorFormat object.
Constructor Details
#initialize ⇒ BmpMonochromeColorFormat
Creates object for monochrome color format for BMP image format.
17 18 19 20 21 22 |
# File 'lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb', line 17 def initialize super(ColorFormatType::Monochrome) @black_threshold = nil @dithering_percent = nil @dithering_algorithm = nil end |
Instance Attribute Details
#black_threshold ⇒ Object
Gets or sets the black threshold for monochrome BMP, ranges from 0-255.
10 11 12 |
# File 'lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb', line 10 def black_threshold @black_threshold end |
#dithering_algorithm ⇒ Object
Gets or sets the dithering algorithm for BMP.
12 13 14 |
# File 'lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb', line 12 def dithering_algorithm @dithering_algorithm end |
#dithering_percent ⇒ Object
Gets or sets the dithering percentage for BMP.
11 12 13 |
# File 'lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb', line 11 def dithering_percent @dithering_percent end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the BmpMonochromeColorFormat object.
29 30 31 32 33 34 35 |
# File 'lib/ruby_client/Imaging/BmpMonochromeColorFormat.rb', line 29 def to_json( = {}) json_array = {} json_array['blackThreshold'] = @black_threshold json_array['ditheringPercent'] = @dithering_percent json_array['ditheringAlgorithm'] = @dithering_algorithm JSON.pretty_generate(json_array) end |