Class: Pdfrb::Action::Trans

Inherits:
Base
  • Object
show all
Defined in:
lib/pdfrb/action/types.rb

Overview

Trans — page transition for slide-show mode. §12.4.3

Class Method Summary collapse

Methods inherited from Base

register_as

Class Method Details

.action_typeObject



152
# File 'lib/pdfrb/action/types.rb', line 152

def action_type; :Trans; end

.to_pdf(style:, duration: nil, direction: nil) ⇒ Object



154
155
156
157
158
159
# File 'lib/pdfrb/action/types.rb', line 154

def to_pdf(style:, duration: nil, direction: nil)
  trans = { S: style }
  trans[:D] = duration if duration
  trans[:Di] = direction if direction
  { S: :Trans, Trans: trans }
end