|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
C ABI wrapper for framing-from-intent computation and related handle-based operations. More...
#include "fdl/fdl_core.h"#include "fdl_builder.h"#include "fdl_constants.h"#include "fdl_doc.h"#include "fdl_framing.h"Functions | |
| fdl_from_intent_result_t | fdl_compute_framing_from_intent (fdl_dimensions_f64_t canvas_dims, fdl_dimensions_f64_t working_dims, double squeeze, fdl_dimensions_i64_t aspect_ratio, double protection, fdl_round_strategy_t rounding) |
| Compute a framing decision from a framing intent. | |
| void | fdl_framing_decision_adjust_anchor (fdl_framing_decision_t *fd, const fdl_canvas_t *canvas, fdl_halign_t h_align, fdl_valign_t v_align) |
| Adjust anchor_point on a framing decision based on alignment within canvas. | |
| void | fdl_framing_decision_adjust_protection_anchor (fdl_framing_decision_t *fd, const fdl_canvas_t *canvas, fdl_halign_t h_align, fdl_valign_t v_align) |
| Adjust protection_anchor_point on a framing decision based on alignment within canvas. | |
| void | fdl_framing_decision_populate_from_intent (fdl_framing_decision_t *fd, const fdl_canvas_t *canvas, const fdl_framing_intent_t *intent, fdl_round_strategy_t rounding) |
| Populate a framing decision from a canvas and framing intent. | |
C ABI wrapper for framing-from-intent computation and related handle-based operations.
| fdl_from_intent_result_t fdl_compute_framing_from_intent | ( | fdl_dimensions_f64_t | canvas_dims, |
| fdl_dimensions_f64_t | working_dims, | ||
| double | squeeze, | ||
| fdl_dimensions_i64_t | aspect_ratio, | ||
| double | protection, | ||
| fdl_round_strategy_t | rounding | ||
| ) |
Compute a framing decision from a framing intent.
Fits the intent's aspect ratio within the working dimensions, centers the result within the canvas, and optionally computes a protection area.
| canvas_dims | Full canvas dimensions (used for anchor centering). |
| working_dims | Effective dimensions if available, else canvas dims (used for aspect ratio fitting). |
| squeeze | Anamorphic squeeze factor of the canvas. |
| aspect_ratio | Target aspect ratio as integer width:height (e.g. {16, 9}). |
| protection | Protection factor (0.0 for no protection, > 0.0 to enable). |
| rounding | Rounding strategy for the computed dimensions. |
| void fdl_framing_decision_adjust_anchor | ( | fdl_framing_decision_t * | fd, |
| const fdl_canvas_t * | canvas, | ||
| fdl_halign_t | h_align, | ||
| fdl_valign_t | v_align | ||
| ) |
Adjust anchor_point on a framing decision based on alignment within canvas.
Reads canvas dimensions and framing dimensions, then computes the aligned anchor position according to the specified alignment.
| fd | Framing decision to modify. |
| canvas | Canvas providing the bounding dimensions. |
| h_align | Horizontal alignment (LEFT, CENTER, or RIGHT). |
| v_align | Vertical alignment (TOP, CENTER, or BOTTOM). |
| void fdl_framing_decision_adjust_protection_anchor | ( | fdl_framing_decision_t * | fd, |
| const fdl_canvas_t * | canvas, | ||
| fdl_halign_t | h_align, | ||
| fdl_valign_t | v_align | ||
| ) |
Adjust protection_anchor_point on a framing decision based on alignment within canvas.
Reads canvas dimensions and protection_dimensions, then computes the aligned protection anchor position.
| fd | Framing decision to modify. |
| canvas | Canvas providing the bounding dimensions. |
| h_align | Horizontal alignment. |
| v_align | Vertical alignment. |
| void fdl_framing_decision_populate_from_intent | ( | fdl_framing_decision_t * | fd, |
| const fdl_canvas_t * | canvas, | ||
| const fdl_framing_intent_t * | intent, | ||
| fdl_round_strategy_t | rounding | ||
| ) |
Populate a framing decision from a canvas and framing intent.
Extracts values from canvas/intent handles, calls the framing computation, and writes dimensions, anchor_point, and optionally protection to the framing decision.
| fd | Framing decision to populate. |
| canvas | Source canvas (provides dimensions and squeeze). |
| intent | Framing intent (provides aspect ratio and protection). |
| rounding | Rounding strategy for the computed values. |