Class: Dvi::Processor
- Inherits:
-
Object
- Object
- Dvi::Processor
- Defined in:
- lib/dvi.rb
Instance Attribute Summary collapse
-
#chars ⇒ Object
readonly
Returns the value of attribute chars.
-
#denominator ⇒ Object
Returns the value of attribute denominator.
-
#dvi_version ⇒ Object
Returns the value of attribute dvi_version.
-
#font ⇒ Object
Returns the value of attribute font.
-
#fonts ⇒ Object
Returns the value of attribute fonts.
-
#h ⇒ Object
Returns the value of attribute h.
-
#lsr ⇒ Object
readonly
Returns the value of attribute lsr.
-
#mag ⇒ Object
Returns the value of attribute mag.
-
#numerator ⇒ Object
Returns the value of attribute numerator.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#stack ⇒ Object
readonly
Returns the value of attribute stack.
-
#total_pages ⇒ Object
Returns the value of attribute total_pages.
-
#v ⇒ Object
Returns the value of attribute v.
-
#w ⇒ Object
Returns the value of attribute w.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
-
#z ⇒ Object
Returns the value of attribute z.
Instance Method Summary collapse
-
#initialize(lsr = Dvi::LsR.default) ⇒ Processor
constructor
A new instance of Processor.
- #process(opcode) ⇒ Object
Constructor Details
#initialize(lsr = Dvi::LsR.default) ⇒ Processor
Returns a new instance of Processor.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dvi.rb', line 8 def initialize(lsr=Dvi::LsR.default) @h = 0 # horizontal position @v = 0 # vertical position @w = 0 # @x = 0 @y = 0 @z = 0 @font = nil @stack = [] @chars = [] @rules = [] @fonts = Hash.new @lsr = lsr end |
Instance Attribute Details
#chars ⇒ Object (readonly)
Returns the value of attribute chars.
4 5 6 |
# File 'lib/dvi.rb', line 4 def chars @chars end |
#denominator ⇒ Object
Returns the value of attribute denominator.
5 6 7 |
# File 'lib/dvi.rb', line 5 def denominator @denominator end |
#dvi_version ⇒ Object
Returns the value of attribute dvi_version.
5 6 7 |
# File 'lib/dvi.rb', line 5 def dvi_version @dvi_version end |
#font ⇒ Object
Returns the value of attribute font.
3 4 5 |
# File 'lib/dvi.rb', line 3 def font @font end |
#fonts ⇒ Object
Returns the value of attribute fonts.
3 4 5 |
# File 'lib/dvi.rb', line 3 def fonts @fonts end |
#h ⇒ Object
Returns the value of attribute h.
3 4 5 |
# File 'lib/dvi.rb', line 3 def h @h end |
#lsr ⇒ Object (readonly)
Returns the value of attribute lsr.
4 5 6 |
# File 'lib/dvi.rb', line 4 def lsr @lsr end |
#mag ⇒ Object
Returns the value of attribute mag.
5 6 7 |
# File 'lib/dvi.rb', line 5 def mag @mag end |
#numerator ⇒ Object
Returns the value of attribute numerator.
5 6 7 |
# File 'lib/dvi.rb', line 5 def numerator @numerator end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
4 5 6 |
# File 'lib/dvi.rb', line 4 def rules @rules end |
#stack ⇒ Object (readonly)
Returns the value of attribute stack.
4 5 6 |
# File 'lib/dvi.rb', line 4 def stack @stack end |
#total_pages ⇒ Object
Returns the value of attribute total_pages.
6 7 8 |
# File 'lib/dvi.rb', line 6 def total_pages @total_pages end |
#v ⇒ Object
Returns the value of attribute v.
3 4 5 |
# File 'lib/dvi.rb', line 3 def v @v end |
#w ⇒ Object
Returns the value of attribute w.
3 4 5 |
# File 'lib/dvi.rb', line 3 def w @w end |
#x ⇒ Object
Returns the value of attribute x.
3 4 5 |
# File 'lib/dvi.rb', line 3 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
3 4 5 |
# File 'lib/dvi.rb', line 3 def y @y end |
#z ⇒ Object
Returns the value of attribute z.
3 4 5 |
# File 'lib/dvi.rb', line 3 def z @z end |
Instance Method Details
#process(opcode) ⇒ Object
23 24 25 |
# File 'lib/dvi.rb', line 23 def process(opcode) opcode.interpret(self) end |