Class: Zint::Structs::Vector
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Zint::Structs::Vector
- Defined in:
- lib/zint/structs/vector.rb
Instance Method Summary collapse
-
#each_circle(&block) ⇒ Object
Calls the given block and passes a VectorCircle object for each circle to be printed.
-
#each_hexagon(&block) ⇒ Object
Calls the given block and passes a VectorHexagon object for each hexagon to be printed.
-
#each_rectangle(&block) ⇒ Object
Calls the given block and passes a VectorRect object for each rectangle to be printed.
-
#each_string(&block) ⇒ Object
Calls the given block and passes a VectorString object for each text string to be printed.
-
#height ⇒ Object
Height of barcode image (including text, whitespace).
-
#width ⇒ Object
Width of barcode image (including text, whitespace).
Instance Method Details
#each_circle(&block) ⇒ Object
Calls the given block and passes a Zint::Structs::VectorCircle object for each circle to be printed.
37 38 39 |
# File 'lib/zint/structs/vector.rb', line 37 def each_circle(&block) each_vector(:circles, &block) end |
#each_hexagon(&block) ⇒ Object
Calls the given block and passes a Zint::Structs::VectorHexagon object for each hexagon to be printed.
27 28 29 |
# File 'lib/zint/structs/vector.rb', line 27 def each_hexagon(&block) each_vector(:hexagons, &block) end |
#each_rectangle(&block) ⇒ Object
Calls the given block and passes a Zint::Structs::VectorRect object for each rectangle to be printed.
22 23 24 |
# File 'lib/zint/structs/vector.rb', line 22 def each_rectangle(&block) each_vector(:rectangles, &block) end |
#each_string(&block) ⇒ Object
Calls the given block and passes a Zint::Structs::VectorString object for each text string to be printed.
32 33 34 |
# File 'lib/zint/structs/vector.rb', line 32 def each_string(&block) each_vector(:strings, &block) end |
#height ⇒ Object
Height of barcode image (including text, whitespace)
12 13 14 |
# File 'lib/zint/structs/vector.rb', line 12 def height self[:height] end |
#width ⇒ Object
Width of barcode image (including text, whitespace)
17 18 19 |
# File 'lib/zint/structs/vector.rb', line 17 def width self[:width] end |