Canvas

pyfdl.Canvas(label=None, id_=None, source_canvas_id=None, dimensions=None, effective_dimensions=None, effective_anchor_point=None, photosite_dimensions=None, physical_dimensions=None, anamorphic_squeeze=None, framing_decisions=None)

Bases: Base

adjust_effective_anchor_point()

Adjust the effective_anchor_point of this Canvas if effective_dimensions are set

from_canvas_template(canvas_template, source_canvas, source_framing_decision=0) classmethod

Create a new Canvas from the provided source_canvas and framing_decision based on a CanvasTemplate

Parameters:
  • canvas_template (CanvasTemplate) –

    describing how to handle incoming Canvas and FramingDecision

  • source_canvas (Canvas) –

    to use as base for new canvas

  • source_framing_decision (Union[FramingDecision, int], default: 0 ) –

    either a FramingDecision from the source canvas or the index (int) of one.

Returns:
  • canvas( Canvas ) –

    based on the provided canvas template and sources

get_dimensions()

Get the most relevant dimensions and anchor point for the canvas. effective_dimensions and effective_anchor_point win over dimensions

Returns:
  • (dimensions, anchor_point)

place_framing_intent(framing_intent)

Create a new FramingDecision based on the provided FramingIntent and add it to the collection of framing decisions.

The framing decision's properties are calculated for you. If the canvas has effective dimensions set, these will be used for the calculations. Otherwise, we use the dimensions

Parameters:
  • framing_intent (FramingIntent) –

    framing intent to place in canvas

Returns:
  • framing_decision_id( str ) –

    id of the newly created framing decision