Class | Origami::XRefStream |
In: |
sources/parser/xreftable.rb
|
Parent: | Stream |
XREF_FREE | = | 0 |
XREF_USED | = | 1 |
XREF_COMPRESSED | = | 2 |
W | = | [ 1, 2, 2 ] unless has_field?(:W) |
Size | = | @xrefs.length + 1 |
xrefs | [R] |
# File sources/parser/xreftable.rb, line 337 337: def initialize(data = "", dictionary = {}) 338: super(data, dictionary) 339: 340: @xrefs = nil 341: end
Returns an XRef matching this object number.
# File sources/parser/xreftable.rb, line 375 375: def find(no) 376: load! if @xrefs.nil? 377: 378: ranges = self.Index || [ 0, @xrefs.length ] 379: 380: index = 0 381: (ranges.size / 2).times do |i| 382: brange = ranges[i*2].to_i 383: size = ranges[i*2+1].to_i 384: return @xrefs[index + no - brange] if Range.new(brange, brange + size) === no 385: 386: index += size 387: end 388: 389: nil 390: end