Class: DynamicPDFApi::PngImageFormat
- Inherits:
-
ImageFormat
- Object
- ImageFormat
- DynamicPDFApi::PngImageFormat
- Defined in:
- lib/ruby_client/Imaging/PngImageFormat.rb
Overview
Represents PNG image format with color format.
Instance Attribute Summary collapse
-
#color_format ⇒ Object
Gets or sets the PngColorFormat for PNG.
Attributes inherited from ImageFormat
Instance Method Summary collapse
-
#initialize ⇒ PngImageFormat
constructor
Initializes a new instance of the PngImageFormat class.
-
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the PngImageFormat object.
Constructor Details
#initialize ⇒ PngImageFormat
Initializes a new instance of the PngImageFormat class.
15 16 17 18 |
# File 'lib/ruby_client/Imaging/PngImageFormat.rb', line 15 def initialize super(ImageFormatType::PNG) @color_format = nil end |
Instance Attribute Details
#color_format ⇒ Object
Gets or sets the PngColorFormat for PNG.
10 11 12 |
# File 'lib/ruby_client/Imaging/PngImageFormat.rb', line 10 def color_format @color_format end |
Instance Method Details
#to_json(_options = {}) ⇒ String
Returns a JSON representation of the PngImageFormat object.
25 26 27 28 29 30 31 |
# File 'lib/ruby_client/Imaging/PngImageFormat.rb', line 25 def to_json( = {}) json_array = {} json_array['type'] = 'png' json_array['colorFormat'] = @color_format JSON.pretty_generate(json_array) end |