Class: Dvi::Opcode::Post
Overview
Post is a class for post opcode.
Instance Attribute Summary collapse
-
#den ⇒ Object
readonly
Returns the value of attribute den.
-
#final_bop ⇒ Object
readonly
Returns the value of attribute final_bop.
-
#l ⇒ Object
readonly
Returns the value of attribute l.
-
#mag ⇒ Object
readonly
Returns the value of attribute mag.
-
#num ⇒ Object
readonly
Returns the value of attribute num.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#stack_depath ⇒ Object
readonly
Returns the value of attribute stack_depath.
-
#u ⇒ Object
readonly
Returns the value of attribute u.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pointer, num, den, mag, l, u, stack_depth, total_pages) ⇒ Post
constructor
A new instance of Post.
- #interpret(ps) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(pointer, num, den, mag, l, u, stack_depth, total_pages) ⇒ Post
Returns a new instance of Post.
461 462 463 464 465 466 467 468 469 470 |
# File 'lib/dvi/opcode.rb', line 461 def initialize(pointer, num, den, mag, l, u, stack_depth, total_pages) @final_bop = pointer # final bop pointer @num = num # same as preamble @den = den # same as preamble @mag = mag # same as preamble @l = l # height plus depth of the tallest page @u = u # width of the widest page @stack_depth = stack_depth # maximum stack depth @total_pages = total_pages # total number of pages end |
Instance Attribute Details
#den ⇒ Object (readonly)
Returns the value of attribute den.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def den @den end |
#final_bop ⇒ Object (readonly)
Returns the value of attribute final_bop.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def final_bop @final_bop end |
#l ⇒ Object (readonly)
Returns the value of attribute l.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def l @l end |
#mag ⇒ Object (readonly)
Returns the value of attribute mag.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def mag @mag end |
#num ⇒ Object (readonly)
Returns the value of attribute num.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def num @num end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def pages @pages end |
#stack_depath ⇒ Object (readonly)
Returns the value of attribute stack_depath.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def stack_depath @stack_depath end |
#u ⇒ Object (readonly)
Returns the value of attribute u.
459 460 461 |
# File 'lib/dvi/opcode.rb', line 459 def u @u end |
Class Method Details
.read(cmd, io) ⇒ Object
472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/dvi/opcode.rb', line 472 def self.read(cmd, io) pointer = io.read_uint4 num = io.read_uint4 den = io.read_uint4 mag = io.read_uint4 l = io.read_uint4 u = io.read_uint4 stack_size = io.read_uint2 pages = io.read_uint2 return self.new(pointer, num, den, mag, l, u, stack_size, pages) end |
Instance Method Details
#interpret(ps) ⇒ Object
484 485 486 |
# File 'lib/dvi/opcode.rb', line 484 def interpret(ps) ps.total_pages = @total_pages end |