Class: DynamicPDFApi::TextBarcodeElement
- Inherits:
-
BarcodeElement
- Object
- Element
- BarcodeElement
- DynamicPDFApi::TextBarcodeElement
- Defined in:
- lib/ruby_client/Elements/TextBarcodeElement.rb
Overview
Base class from which barcode page elements that display text are derived.
Direct Known Subclasses
Code11BarcodeElement, Code128BarcodeElement, Code25BarcodeElement, Code39BarcodeElement, Code93BarcodeElement, Gs1DataBarBarcodeElement, Iata25BarcodeElement, MsiBarcodeElement, StackedGs1DataBarBarcodeElement
Instance Attribute Summary collapse
-
#_font_name ⇒ Object
Returns the value of attribute _font_name.
-
#_resource ⇒ Object
Returns the value of attribute _resource.
-
#_text_font ⇒ Object
Returns the value of attribute _text_font.
-
#font_size ⇒ Object
Gets or sets the font size to use when displaying the text.
-
#show_text ⇒ Object
Gets or sets a value indicating if the value should be placed as text below the barcode.
-
#text_color ⇒ Object
Gets or sets the color of the text.
Attributes inherited from BarcodeElement
#_color_name, #value, #x_dimension
Attributes inherited from Element
#_input_value, #_type, #even_pages, #odd_pages, #placement, #x_offset, #y_offset
Instance Method Summary collapse
-
#font(value) ⇒ Object
Gets or sets the font to use when displaying the text.
- #get_font ⇒ Object
-
#initialize(value, placement, x_offset, y_offset) ⇒ TextBarcodeElement
constructor
A new instance of TextBarcodeElement.
Methods inherited from BarcodeElement
Constructor Details
#initialize(value, placement, x_offset, y_offset) ⇒ TextBarcodeElement
Returns a new instance of TextBarcodeElement.
8 9 10 11 12 13 14 15 16 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 8 def initialize(value, placement, x_offset, y_offset) @text_color = nil @font_size = nil @show_text = nil @_resource = nil @_text_font = nil @_font_name = nil super(value, placement, x_offset, y_offset) end |
Instance Attribute Details
#_font_name ⇒ Object
Returns the value of attribute _font_name.
33 34 35 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 33 def _font_name @_font_name end |
#_resource ⇒ Object
Returns the value of attribute _resource.
33 34 35 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 33 def _resource @_resource end |
#_text_font ⇒ Object
Returns the value of attribute _text_font.
33 34 35 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 33 def _text_font @_text_font end |
#font_size ⇒ Object
Gets or sets the font size to use when displaying the text.
26 27 28 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 26 def font_size @font_size end |
#show_text ⇒ Object
Gets or sets a value indicating if the value should be placed as text below the barcode.
31 32 33 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 31 def show_text @show_text end |
#text_color ⇒ Object
Gets or sets the color of the text.
21 22 23 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 21 def text_color @text_color end |
Instance Method Details
#font(value) ⇒ Object
Gets or sets the font to use when displaying the text.
38 39 40 41 42 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 38 def font(value) @_text_font = value @_font_name = @_text_font._name @_resource = @_text_font._resource end |
#get_font ⇒ Object
44 45 46 |
# File 'lib/ruby_client/Elements/TextBarcodeElement.rb', line 44 def get_font @_text_font end |