Module fpdf.transitions
Classes
class BlindsTransition (dimension)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class BlindsTransition(Transition): def __init__(self, dimension): if dimension not in ("H", "V"): raise ValueError( f"Unsupported dimension '{dimension}', must be H(horizontal) or V(ertical)" ) self.dimension = dimension def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Blinds /DM /{self.dimension}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class BoxTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class BoxTransition(Transition): def __init__(self, direction): if direction not in ("I", "O"): raise ValueError( f"Unsupported direction '{direction}', must be I(nward) or O(utward)" ) self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Blinds /M /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class CoverTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class CoverTransition(Transition): def __init__(self, direction): if direction not in (0, 270): raise ValueError(f"Unsupported direction '{direction}', must 0 or 270") self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Cover /Di /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class DissolveTransition
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class DissolveTransition(Transition): def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Trans /S /Dissolve>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class FadeTransition
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class FadeTransition(Transition): def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Fade /S /Dissolve>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class FlyTransition (dimension, direction=None)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class FlyTransition(Transition): def __init__(self, dimension, direction=None): if dimension not in ("H", "V"): raise ValueError( f"Unsupported dimension '{dimension}', must be H(horizontal) or V(ertical)" ) self.dimension = dimension if direction not in (0, 270, None): raise ValueError( f"Unsupported direction '{direction}', must 0, 270 or None" ) self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return ( f"<</Type /Trans /S /Glitter /M /{self.dimension} /Di /{self.direction}>>" )
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class GlitterTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class GlitterTransition(Transition): def __init__(self, direction): if direction not in (0, 270, 315): raise ValueError(f"Unsupported direction '{direction}', must 0, 270 or 315") self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Glitter /Di /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class PushTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class PushTransition(Transition): def __init__(self, direction): if direction not in (0, 270): raise ValueError(f"Unsupported direction '{direction}', must 0 or 270") self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Push /Di /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class SplitTransition (dimension, direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class SplitTransition(Transition): def __init__(self, dimension, direction): if dimension not in ("H", "V"): raise ValueError( f"Unsupported dimension '{dimension}', must be H(horizontal) or V(ertical)" ) self.dimension = dimension if direction not in ("I", "O"): raise ValueError( f"Unsupported direction '{direction}', must be I(nward) or O(utward)" ) self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Split /DM /{self.dimension} /M /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class Transition
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class Transition(ABC): def serialize(self, _security_handler=None, _obj_id=None): raise NotImplementedError
Ancestors
- abc.ABC
Subclasses
- BlindsTransition
- BoxTransition
- CoverTransition
- DissolveTransition
- FadeTransition
- FlyTransition
- GlitterTransition
- PushTransition
- SplitTransition
- UncoverTransition
- WipeTransition
Methods
def serialize(self)
class UncoverTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class UncoverTransition(Transition): def __init__(self, direction): if direction not in (0, 270): raise ValueError(f"Unsupported direction '{direction}', must 0 or 270") self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Uncover /Di /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
class WipeTransition (direction)
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code Browse git
class WipeTransition(Transition): def __init__(self, direction): if direction not in (0, 90, 180, 270): raise ValueError( f"Unsupported direction '{direction}', must 0, 90, 180 or 270" ) self.direction = direction def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Wipe /Di /{self.direction}>>"
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)