Class: Zint::Structs::VectorString
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Zint::Structs::VectorString
- Defined in:
- lib/zint/structs/vector_string.rb
Instance Method Summary collapse
-
#fsize ⇒ Object
font size.
-
#halign ⇒ Object
Horizontal alignment: 0 for centre, 1 for left, 2 for right (end).
-
#rotation ⇒ Object
0, 90, 180, 270 degrees.
-
#text ⇒ Object
the text string to be printed.
-
#width ⇒ Object
Suggested string width, may be 0 if none recommended.
-
#x ⇒ Object
x position relative to halign.
-
#y ⇒ Object
y position.
Instance Method Details
#fsize ⇒ Object
font size
25 26 27 |
# File 'lib/zint/structs/vector_string.rb', line 25 def fsize self[:fsize] end |
#halign ⇒ Object
Horizontal alignment: 0 for centre, 1 for left, 2 for right (end)
40 41 42 |
# File 'lib/zint/structs/vector_string.rb', line 40 def halign self[:halign] end |
#rotation ⇒ Object
0, 90, 180, 270 degrees
35 36 37 |
# File 'lib/zint/structs/vector_string.rb', line 35 def rotation self[:rotation] end |
#text ⇒ Object
the text string to be printed
45 46 47 |
# File 'lib/zint/structs/vector_string.rb', line 45 def text self[:text].read_bytes(self[:length]) end |
#width ⇒ Object
Suggested string width, may be 0 if none recommended
30 31 32 |
# File 'lib/zint/structs/vector_string.rb', line 30 def width self[:width] end |
#x ⇒ Object
x position relative to halign
15 16 17 |
# File 'lib/zint/structs/vector_string.rb', line 15 def x self[:x] end |
#y ⇒ Object
y position
20 21 22 |
# File 'lib/zint/structs/vector_string.rb', line 20 def y self[:y] end |