Module fpdf.transitions
Classes
class BlindsTransition (dimension)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Blinds /DM /{self.dimension}>>"
class BoxTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Blinds /M /{self.direction}>>"
class CoverTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Cover /Di /{self.direction}>>"
class DissolveTransition
-
Expand source code Browse git
class DissolveTransition(Transition): def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Trans /S /Dissolve>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Trans /S /Dissolve>>"
class FadeTransition
-
Expand source code Browse git
class FadeTransition(Transition): def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Fade /S /Dissolve>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return "<</Type /Fade /S /Dissolve>>"
class FlyTransition (dimension, direction=None)
-
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}>>" )
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return ( f"<</Type /Trans /S /Glitter /M /{self.dimension} /Di /{self.direction}>>" )
class GlitterTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Glitter /Di /{self.direction}>>"
class PushTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Push /Di /{self.direction}>>"
class SplitTransition (dimension, direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Split /DM /{self.dimension} /M /{self.direction}>>"
class Transition
-
Expand source code Browse git
class Transition(ABC): def serialize(self, _security_handler=None, _obj_id=None): raise NotImplementedError
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- abc.ABC
Subclasses
- BlindsTransition
- BoxTransition
- CoverTransition
- DissolveTransition
- FadeTransition
- FlyTransition
- GlitterTransition
- PushTransition
- SplitTransition
- UncoverTransition
- WipeTransition
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): raise NotImplementedError
class UncoverTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Uncover /Di /{self.direction}>>"
class WipeTransition (direction)
-
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}>>"
Helper class that provides a standard way to create an ABC using inheritance.
Ancestors
- Transition
- abc.ABC
Methods
def serialize(self)
-
Expand source code Browse git
def serialize(self, _security_handler=None, _obj_id=None): return f"<</Type /Trans /S /Wipe /Di /{self.direction}>>"