Class: DynamicPDFApi::BarcodeElement

Inherits:
Element
  • Object
show all
Defined in:
lib/ruby_client/Elements/BarcodeElement.rb

Overview

Base class from which barcode page elements are derived.

Direct Known Subclasses

Dim2BarcodeElement, TextBarcodeElement

Instance Attribute Summary collapse

Attributes inherited from Element

#_input_value, #_resource, #_text_font, #_type, #even_pages, #odd_pages, #placement, #x_offset, #y_offset

Instance Method Summary collapse

Constructor Details

#initialize(value, placement, x_offset, y_offset) ⇒ BarcodeElement

Returns a new instance of BarcodeElement.



9
10
11
12
13
14
15
# File 'lib/ruby_client/Elements/BarcodeElement.rb', line 9

def initialize(value, placement, x_offset, y_offset)
  @color = nil
  @x_dimension = nil

  super(value, placement, x_offset, y_offset)
  @value = value
end

Instance Attribute Details

#_color_nameObject

Returns the value of attribute _color_name.



17
18
19
# File 'lib/ruby_client/Elements/BarcodeElement.rb', line 17

def _color_name
  @_color_name
end

#valueObject

Gets or sets the value of the barcode.



35
36
37
# File 'lib/ruby_client/Elements/BarcodeElement.rb', line 35

def value
  @value
end

#x_dimensionObject

Gets or sets the XDimension of the barcode.



30
31
32
# File 'lib/ruby_client/Elements/BarcodeElement.rb', line 30

def x_dimension
  @x_dimension
end

Instance Method Details

#color=(color_value) ⇒ Object

Gets or sets the Color of the barcode.



22
23
24
25
# File 'lib/ruby_client/Elements/BarcodeElement.rb', line 22

def color=(color_value)
  @color = color_value
  @_color_name = @color._color_string
end