FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
fdl_core.h File Reference

Public C ABI for the FDL (Framing Decision List) core library. More...

#include "fdl_export.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  fdl_abi_version_t
 ABI version triple for runtime compatibility checks. More...
 
struct  fdl_dimensions_i64_t
 Canvas dimensions in integer pixels. More...
 
struct  fdl_dimensions_f64_t
 Floating-point dimensions (used during computation). More...
 
struct  fdl_point_f64_t
 2D point in floating-point coordinates. More...
 
struct  fdl_rect_t
 Axis-aligned rectangle (x, y origin + width, height). More...
 
struct  fdl_geometry_t
 Geometry container for FDL template transformation processing. More...
 
struct  fdl_round_strategy_t
 Rounding strategy combining even-snap and direction mode. More...
 
struct  fdl_from_intent_result_t
 Result of computing a framing decision from a framing intent. More...
 
struct  fdl_parse_result_t
 Result of parsing JSON into an FDL document. More...
 
struct  fdl_template_result_t
 Result of applying a canvas template. More...
 
struct  fdl_resolve_canvas_result_t
 Result of resolving a canvas for given input dimensions. More...
 

Macros

#define FDL_TRUE   1
 Boolean constants for C ABI int fields and return values.
 
#define FDL_FALSE   0
 Boolean false.
 
#define FDL_DEFAULT_JSON_INDENT   2
 Default JSON serialization indent.
 
#define FDL_CUSTOM_ATTR_TYPE_NONE   0
 Attribute not found.
 
#define FDL_CUSTOM_ATTR_TYPE_STRING   1
 String attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_INT   2
 Integer attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_FLOAT   3
 Floating-point attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_BOOL   4
 Boolean attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_POINT_F64   5
 Point (x, y) attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_DIMS_F64   6
 Dimensions (width, height) float attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_DIMS_I64   7
 Dimensions (width, height) integer attribute.
 
#define FDL_CUSTOM_ATTR_TYPE_OTHER   8
 Unsupported JSON type.
 
#define FDL_ATTR_SCALE_FACTOR   "scale_factor"
 Custom attribute name for the template scale factor (float).
 
#define FDL_ATTR_CONTENT_TRANSLATION   "content_translation"
 Custom attribute name for the template content translation (point_f64).
 
#define FDL_ATTR_SCALED_BOUNDING_BOX   "scaled_bounding_box"
 Custom attribute name for the template scaled bounding box (dims_f64).
 
#define FDL_ROUNDING_MODE_UP   0
 Always round up (ceiling).
 
#define FDL_ROUNDING_MODE_DOWN   1
 Always round down (floor).
 
#define FDL_ROUNDING_MODE_ROUND   2
 Round to nearest (half-to-even).
 
#define FDL_ROUNDING_EVEN_WHOLE   0
 No even constraint (round to nearest integer).
 
#define FDL_ROUNDING_EVEN_EVEN   1
 Snap to nearest even integer after rounding.
 
#define FDL_GEOMETRY_PATH_CANVAS_DIMENSIONS   0
 Full canvas dimensions.
 
#define FDL_GEOMETRY_PATH_CANVAS_EFFECTIVE_DIMENSIONS   1
 Effective (active image) dimensions.
 
#define FDL_GEOMETRY_PATH_FRAMING_PROTECTION_DIMENSIONS   2
 Protection area dimensions.
 
#define FDL_GEOMETRY_PATH_FRAMING_DIMENSIONS   3
 Framing decision dimensions.
 
#define FDL_FIT_METHOD_WIDTH   0
 Scale to match target width.
 
#define FDL_FIT_METHOD_HEIGHT   1
 Scale to match target height.
 
#define FDL_FIT_METHOD_FIT_ALL   2
 Scale to fit entirely within target (letterbox/pillarbox).
 
#define FDL_FIT_METHOD_FILL   3
 Scale to fill target completely (may crop).
 
#define FDL_HALIGN_LEFT   0
 Align to left edge.
 
#define FDL_HALIGN_CENTER   1
 Center horizontally.
 
#define FDL_HALIGN_RIGHT   2
 Align to right edge.
 
#define FDL_VALIGN_TOP   0
 Align to top edge.
 
#define FDL_VALIGN_CENTER   1
 Center vertically.
 
#define FDL_VALIGN_BOTTOM   2
 Align to bottom edge.
 
#define FDL_CUSTOM_ATTR_DECL(PREFIX, HANDLE_TYPE)
 Macro to declare all 19 custom attribute functions for a handle type.
 

Typedefs

typedef uint32_t fdl_custom_attr_type_t
 Type identifier for custom attributes.
 
typedef struct fdl_abi_version_t fdl_abi_version_t
 ABI version triple for runtime compatibility checks.
 
typedef struct fdl_dimensions_i64_t fdl_dimensions_i64_t
 Canvas dimensions in integer pixels.
 
typedef struct fdl_dimensions_f64_t fdl_dimensions_f64_t
 Floating-point dimensions (used during computation).
 
typedef struct fdl_point_f64_t fdl_point_f64_t
 2D point in floating-point coordinates.
 
typedef struct fdl_rect_t fdl_rect_t
 Axis-aligned rectangle (x, y origin + width, height).
 
typedef uint64_t fdl_rounding_mode_t
 Rounding mode — direction to round fractional pixel values.
 
typedef uint64_t fdl_rounding_even_t
 Rounding even — whether to snap results to even numbers.
 
typedef uint32_t fdl_geometry_path_t
 Geometry path — selects a dimension layer within the FDL hierarchy.
 
typedef uint32_t fdl_fit_method_t
 Fit method — how source content is scaled into the target canvas.
 
typedef uint32_t fdl_halign_t
 Horizontal alignment — how content is positioned horizontally.
 
typedef uint32_t fdl_valign_t
 Vertical alignment — how content is positioned vertically.
 
typedef struct fdl_geometry_t fdl_geometry_t
 Geometry container for FDL template transformation processing.
 
typedef struct fdl_round_strategy_t fdl_round_strategy_t
 Rounding strategy combining even-snap and direction mode.
 
typedef struct fdl_from_intent_result_t fdl_from_intent_result_t
 Result of computing a framing decision from a framing intent.
 
typedef struct fdl_doc fdl_doc_t
 
 
typedef struct fdl_context fdl_context_t
 Opaque handles to FDL sub-objects (index-based, stable across mutations).
 
typedef struct fdl_canvas fdl_canvas_t
 Opaque handle to a canvas.
 
typedef struct fdl_framing_decision fdl_framing_decision_t
 Opaque handle to a framing decision.
 
typedef struct fdl_framing_intent fdl_framing_intent_t
 Opaque handle to a framing intent.
 
typedef struct fdl_canvas_template fdl_canvas_template_t
 Opaque handle to a canvas template.
 
typedef struct fdl_clip_id fdl_clip_id_t
 Opaque handle to a clip ID.
 
typedef struct fdl_file_sequence fdl_file_sequence_t
 Opaque handle to a file sequence.
 
typedef struct fdl_parse_result_t fdl_parse_result_t
 Result of parsing JSON into an FDL document.
 
typedef struct fdl_template_result_t fdl_template_result_t
 Result of applying a canvas template.
 
typedef struct fdl_resolve_canvas_result_t fdl_resolve_canvas_result_t
 Result of resolving a canvas for given input dimensions.
 
typedef struct fdl_validation_result fdl_validation_result_t
 Opaque handle to a validation result.
 

Functions

fdl_abi_version_t fdl_abi_version (void)
 Return the ABI version of the loaded library.
 
int64_t fdl_round (double value, fdl_rounding_even_t even, fdl_rounding_mode_t mode)
 Round a single value according to FDL rounding rules.
 
fdl_dimensions_f64_t fdl_round_dimensions (fdl_dimensions_f64_t dims, fdl_rounding_even_t even, fdl_rounding_mode_t mode)
 Round dimensions according to FDL rounding rules.
 
fdl_point_f64_t fdl_round_point (fdl_point_f64_t point, fdl_rounding_even_t even, fdl_rounding_mode_t mode)
 Round a point according to FDL rounding rules.
 
fdl_dimensions_f64_t fdl_dimensions_normalize (fdl_dimensions_f64_t dims, double squeeze)
 Normalize dimensions by applying anamorphic squeeze to width.
 
fdl_dimensions_f64_t fdl_dimensions_scale (fdl_dimensions_f64_t dims, double scale_factor, double target_squeeze)
 Scale normalized dimensions and apply target squeeze.
 
fdl_dimensions_f64_t fdl_dimensions_normalize_and_scale (fdl_dimensions_f64_t dims, double input_squeeze, double scale_factor, double target_squeeze)
 Normalize and scale in one step.
 
fdl_dimensions_f64_t fdl_dimensions_sub (fdl_dimensions_f64_t a, fdl_dimensions_f64_t b)
 Subtract two dimensions: result = a - b.
 
int fdl_dimensions_equal (fdl_dimensions_f64_t a, fdl_dimensions_f64_t b)
 Check if dimensions are approximately equal within FDL tolerance.
 
int fdl_dimensions_f64_gt (fdl_dimensions_f64_t a, fdl_dimensions_f64_t b)
 Check if a > b using OR logic (either width or height is greater).
 
int fdl_dimensions_f64_lt (fdl_dimensions_f64_t a, fdl_dimensions_f64_t b)
 Check if a < b using OR logic (either width or height is less).
 
int fdl_dimensions_is_zero (fdl_dimensions_f64_t dims)
 Check if both width and height are zero.
 
int fdl_dimensions_i64_is_zero (fdl_dimensions_i64_t dims)
 Check if both width and height are zero (int64 variant).
 
fdl_dimensions_f64_t fdl_dimensions_i64_normalize (fdl_dimensions_i64_t dims, double squeeze)
 Normalize int64 dimensions by applying anamorphic squeeze to width.
 
fdl_dimensions_i64_t fdl_dimensions_f64_to_i64 (fdl_dimensions_f64_t dims)
 Convert float dimensions to int64 by truncation.
 
int fdl_dimensions_i64_gt (fdl_dimensions_i64_t a, fdl_dimensions_i64_t b)
 Check if a > b using OR logic (either width or height is greater).
 
int fdl_dimensions_i64_lt (fdl_dimensions_i64_t a, fdl_dimensions_i64_t b)
 Check if a < b using OR logic (either width or height is less).
 
fdl_point_f64_t fdl_point_normalize (fdl_point_f64_t point, double squeeze)
 Normalize a point by applying anamorphic squeeze to x.
 
fdl_point_f64_t fdl_point_scale (fdl_point_f64_t point, double scale_factor, double target_squeeze)
 Scale a normalized point and apply target squeeze.
 
fdl_point_f64_t fdl_point_add (fdl_point_f64_t a, fdl_point_f64_t b)
 Add two points: result = a + b.
 
fdl_point_f64_t fdl_point_sub (fdl_point_f64_t a, fdl_point_f64_t b)
 Subtract two points: result = a - b.
 
fdl_point_f64_t fdl_point_mul_scalar (fdl_point_f64_t a, double scalar)
 Multiply point by scalar.
 
fdl_point_f64_t fdl_point_clamp (fdl_point_f64_t point, double min_val, double max_val, int has_min, int has_max)
 Clamp point values to [min_val, max_val].
 
int fdl_point_is_zero (fdl_point_f64_t point)
 Check if both x and y are zero.
 
fdl_point_f64_t fdl_point_normalize_and_scale (fdl_point_f64_t point, double input_squeeze, double scale_factor, double target_squeeze)
 Normalize and scale a point in one step.
 
int fdl_point_equal (fdl_point_f64_t a, fdl_point_f64_t b)
 Check approximate equality within FDL tolerances.
 
int fdl_point_f64_lt (fdl_point_f64_t a, fdl_point_f64_t b)
 Check if a < b using OR logic (either x or y is less).
 
int fdl_point_f64_gt (fdl_point_f64_t a, fdl_point_f64_t b)
 Check if a > b using OR logic (either x or y is greater).
 
double fdl_fp_rel_tol (void)
 Relative tolerance for floating-point comparison.
 
double fdl_fp_abs_tol (void)
 Absolute tolerance for floating-point comparison.
 
fdl_geometry_t fdl_geometry_fill_hierarchy_gaps (fdl_geometry_t geo, fdl_point_f64_t anchor_offset)
 Fill gaps in the geometry hierarchy by propagating populated dimensions upward.
 
fdl_geometry_t fdl_geometry_normalize_and_scale (fdl_geometry_t geo, double source_squeeze, double scale_factor, double target_squeeze)
 Normalize and scale all 7 fields of the geometry.
 
fdl_geometry_t fdl_geometry_round (fdl_geometry_t geo, fdl_round_strategy_t strategy)
 Round all 7 fields of the geometry.
 
fdl_geometry_t fdl_geometry_apply_offset (fdl_geometry_t geo, fdl_point_f64_t offset, fdl_point_f64_t *theo_eff, fdl_point_f64_t *theo_prot, fdl_point_f64_t *theo_fram)
 Apply offset to all anchors, clamping to canvas bounds.
 
fdl_geometry_t fdl_geometry_crop (fdl_geometry_t geo, fdl_point_f64_t theo_eff, fdl_point_f64_t theo_prot, fdl_point_f64_t theo_fram)
 Crop all dimensions to visible portion within canvas.
 
int fdl_geometry_get_dims_anchor_from_path (const fdl_geometry_t *geo, fdl_geometry_path_t path, fdl_dimensions_f64_t *out_dims, fdl_point_f64_t *out_anchor)
 Extract dimensions and anchor from geometry by path.
 
double fdl_calculate_scale_factor (fdl_dimensions_f64_t fit_norm, fdl_dimensions_f64_t target_norm, fdl_fit_method_t fit_method)
 Calculate scale factor based on fit method.
 
double fdl_output_size_for_axis (double canvas_size, double max_size, int has_max, int pad_to_max)
 Determine output canvas size for a single axis.
 
double fdl_alignment_shift (double fit_size, double fit_anchor, double output_size, double canvas_size, double target_size, int is_center, double align_factor, int pad_to_max)
 Calculate content translation shift for a single axis.
 
fdl_dimensions_f64_t fdl_dimensions_clamp_to_dims (fdl_dimensions_f64_t dims, fdl_dimensions_f64_t clamp_dims, fdl_point_f64_t *out_delta)
 Clamp dimensions to maximum bounds.
 
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.
 
fdl_doc_tfdl_doc_create (void)
 Create an empty FDL document.
 
void fdl_doc_free (fdl_doc_t *doc)
 Free an FDL document and all associated handles.
 
fdl_parse_result_t fdl_doc_parse_json (const char *json_str, size_t json_len)
 Parse a JSON string into an FDL document.
 
const char * fdl_doc_get_uuid (const fdl_doc_t *doc)
 Get the UUID from a parsed FDL document.
 
const char * fdl_doc_get_fdl_creator (const fdl_doc_t *doc)
 Get the fdl_creator from a parsed FDL document.
 
const char * fdl_doc_get_default_framing_intent (const fdl_doc_t *doc)
 Get the default_framing_intent from a parsed FDL document.
 
int fdl_doc_get_version_major (const fdl_doc_t *doc)
 Get the FDL version major number.
 
int fdl_doc_get_version_minor (const fdl_doc_t *doc)
 Get the FDL version minor number.
 
char * fdl_doc_to_json (const fdl_doc_t *doc, int indent)
 Serialize document to canonical JSON string.
 
char * fdl_context_to_json (const fdl_context_t *ctx, int indent)
 Serialize a context sub-object to canonical JSON.
 
char * fdl_canvas_to_json (const fdl_canvas_t *canvas, int indent)
 Serialize a canvas sub-object to canonical JSON.
 
char * fdl_framing_decision_to_json (const fdl_framing_decision_t *fd, int indent)
 Serialize a framing decision to canonical JSON.
 
char * fdl_framing_intent_to_json (const fdl_framing_intent_t *fi, int indent)
 Serialize a framing intent to canonical JSON.
 
char * fdl_canvas_template_to_json (const fdl_canvas_template_t *ct, int indent)
 Serialize a canvas template to canonical JSON.
 
const char * fdl_context_get_label (const fdl_context_t *ctx)
 Get the label of a context.
 
const char * fdl_context_get_context_creator (const fdl_context_t *ctx)
 Get the context_creator of a context.
 
int fdl_context_has_clip_id (const fdl_context_t *ctx)
 Check if a context has a clip_id.
 
const char * fdl_context_get_clip_id (const fdl_context_t *ctx)
 Get clip_id as a JSON string.
 
fdl_clip_id_tfdl_context_clip_id (fdl_context_t *ctx)
 Get the clip_id handle from a context.
 
const char * fdl_clip_id_get_clip_name (const fdl_clip_id_t *cid)
 Get the clip_name from a clip_id.
 
int fdl_clip_id_has_file (const fdl_clip_id_t *cid)
 Check if a clip_id has a file path.
 
const char * fdl_clip_id_get_file (const fdl_clip_id_t *cid)
 Get the file path from a clip_id.
 
int fdl_clip_id_has_sequence (const fdl_clip_id_t *cid)
 Check if a clip_id has a file sequence.
 
fdl_file_sequence_tfdl_clip_id_sequence (fdl_clip_id_t *cid)
 Get the file sequence handle from a clip_id.
 
char * fdl_clip_id_to_json (const fdl_clip_id_t *cid, int indent)
 Serialize a clip_id to canonical JSON.
 
const char * fdl_file_sequence_get_value (const fdl_file_sequence_t *seq)
 Get the sequence pattern value string.
 
const char * fdl_file_sequence_get_idx (const fdl_file_sequence_t *seq)
 Get the index variable name.
 
int64_t fdl_file_sequence_get_min (const fdl_file_sequence_t *seq)
 Get the minimum (first) frame number.
 
int64_t fdl_file_sequence_get_max (const fdl_file_sequence_t *seq)
 Get the maximum (last) frame number.
 
const char * fdl_canvas_get_label (const fdl_canvas_t *canvas)
 Get the label of a canvas.
 
const char * fdl_canvas_get_id (const fdl_canvas_t *canvas)
 Get the ID of a canvas.
 
const char * fdl_canvas_get_source_canvas_id (const fdl_canvas_t *canvas)
 Get the source_canvas_id of a canvas (the canvas this was derived from).
 
fdl_dimensions_i64_t fdl_canvas_get_dimensions (const fdl_canvas_t *canvas)
 Get the canvas dimensions in pixels.
 
int fdl_canvas_has_effective_dimensions (const fdl_canvas_t *canvas)
 Check if the canvas has effective dimensions set.
 
fdl_dimensions_i64_t fdl_canvas_get_effective_dimensions (const fdl_canvas_t *canvas)
 Get effective (active image area) dimensions.
 
fdl_point_f64_t fdl_canvas_get_effective_anchor_point (const fdl_canvas_t *canvas)
 Get the effective anchor point (offset from canvas origin).
 
double fdl_canvas_get_anamorphic_squeeze (const fdl_canvas_t *canvas)
 Get the anamorphic squeeze factor.
 
int fdl_canvas_has_photosite_dimensions (const fdl_canvas_t *canvas)
 Check if the canvas has photosite dimensions set.
 
fdl_dimensions_i64_t fdl_canvas_get_photosite_dimensions (const fdl_canvas_t *canvas)
 Get photosite (sensor) dimensions.
 
int fdl_canvas_has_physical_dimensions (const fdl_canvas_t *canvas)
 Check if the canvas has physical dimensions set.
 
fdl_dimensions_f64_t fdl_canvas_get_physical_dimensions (const fdl_canvas_t *canvas)
 Get physical dimensions (e.g.
 
const char * fdl_framing_decision_get_label (const fdl_framing_decision_t *fd)
 Get the label of a framing decision.
 
const char * fdl_framing_decision_get_id (const fdl_framing_decision_t *fd)
 Get the ID of a framing decision.
 
const char * fdl_framing_decision_get_framing_intent_id (const fdl_framing_decision_t *fd)
 Get the framing_intent_id that this framing decision references.
 
fdl_dimensions_f64_t fdl_framing_decision_get_dimensions (const fdl_framing_decision_t *fd)
 Get the framing decision dimensions (floating-point sub-pixel).
 
fdl_point_f64_t fdl_framing_decision_get_anchor_point (const fdl_framing_decision_t *fd)
 Get the anchor point of a framing decision.
 
int fdl_framing_decision_has_protection (const fdl_framing_decision_t *fd)
 Check if a framing decision has protection area set.
 
fdl_dimensions_f64_t fdl_framing_decision_get_protection_dimensions (const fdl_framing_decision_t *fd)
 Get the protection area dimensions.
 
fdl_point_f64_t fdl_framing_decision_get_protection_anchor_point (const fdl_framing_decision_t *fd)
 Get the protection anchor point.
 
const char * fdl_framing_intent_get_label (const fdl_framing_intent_t *fi)
 Get the label of a framing intent.
 
const char * fdl_framing_intent_get_id (const fdl_framing_intent_t *fi)
 Get the ID of a framing intent.
 
fdl_dimensions_i64_t fdl_framing_intent_get_aspect_ratio (const fdl_framing_intent_t *fi)
 Get the target aspect ratio of a framing intent.
 
double fdl_framing_intent_get_protection (const fdl_framing_intent_t *fi)
 Get the protection factor of a framing intent.
 
const char * fdl_canvas_template_get_label (const fdl_canvas_template_t *ct)
 Get the label of a canvas template.
 
const char * fdl_canvas_template_get_id (const fdl_canvas_template_t *ct)
 Get the ID of a canvas template.
 
fdl_dimensions_i64_t fdl_canvas_template_get_target_dimensions (const fdl_canvas_template_t *ct)
 Get the target dimensions of a canvas template.
 
double fdl_canvas_template_get_target_anamorphic_squeeze (const fdl_canvas_template_t *ct)
 Get the target anamorphic squeeze factor.
 
fdl_geometry_path_t fdl_canvas_template_get_fit_source (const fdl_canvas_template_t *ct)
 Get the fit source — which dimension layer to scale from.
 
fdl_fit_method_t fdl_canvas_template_get_fit_method (const fdl_canvas_template_t *ct)
 Get the fit method — how source is scaled into target.
 
fdl_halign_t fdl_canvas_template_get_alignment_method_horizontal (const fdl_canvas_template_t *ct)
 Get the horizontal alignment method.
 
fdl_valign_t fdl_canvas_template_get_alignment_method_vertical (const fdl_canvas_template_t *ct)
 Get the vertical alignment method.
 
int fdl_canvas_template_has_preserve_from_source_canvas (const fdl_canvas_template_t *ct)
 Check if preserve_from_source_canvas is set.
 
fdl_geometry_path_t fdl_canvas_template_get_preserve_from_source_canvas (const fdl_canvas_template_t *ct)
 Get the preserve_from_source_canvas geometry path.
 
int fdl_canvas_template_has_maximum_dimensions (const fdl_canvas_template_t *ct)
 Check if maximum_dimensions constraint is set.
 
fdl_dimensions_i64_t fdl_canvas_template_get_maximum_dimensions (const fdl_canvas_template_t *ct)
 Get the maximum_dimensions constraint.
 
int fdl_canvas_template_get_pad_to_maximum (const fdl_canvas_template_t *ct)
 Get the pad_to_maximum flag.
 
fdl_round_strategy_t fdl_canvas_template_get_round (const fdl_canvas_template_t *ct)
 Get the rounding strategy.
 
int fdl_resolve_geometry_layer (const fdl_canvas_t *canvas, const fdl_framing_decision_t *framing, fdl_geometry_path_t path, fdl_dimensions_f64_t *out_dims, fdl_point_f64_t *out_anchor)
 Resolve dimensions and anchor directly from canvas/framing handles for a path.
 
fdl_rect_t fdl_make_rect (double x, double y, double width, double height)
 Construct a rect from raw coordinates.
 
fdl_rect_t fdl_canvas_get_rect (const fdl_canvas_t *canvas)
 Get the full canvas rect: (0, 0, dims.width, dims.height).
 
int fdl_canvas_get_effective_rect (const fdl_canvas_t *canvas, fdl_rect_t *out_rect)
 Get the effective (active image) rect of a canvas.
 
fdl_rect_t fdl_framing_decision_get_rect (const fdl_framing_decision_t *fd)
 Get the framing decision rect: (anchor.x, anchor.y, dims.width, dims.height).
 
int fdl_framing_decision_get_protection_rect (const fdl_framing_decision_t *fd, fdl_rect_t *out_rect)
 Get the framing decision protection rect.
 
fdl_template_result_t fdl_apply_canvas_template (const fdl_canvas_template_t *tmpl, const fdl_canvas_t *source_canvas, const fdl_framing_decision_t *source_framing, const char *new_canvas_id, const char *new_fd_name, const char *source_context_label, const char *context_creator)
 Apply a canvas template to a source canvas/framing.
 
void fdl_template_result_free (fdl_template_result_t *result)
 Free a template result (doc + all allocated strings).
 
fdl_resolve_canvas_result_t fdl_context_resolve_canvas_for_dimensions (fdl_context_t *ctx, fdl_dimensions_f64_t input_dims, fdl_canvas_t *canvas, fdl_framing_decision_t *framing)
 Resolve canvas for given input dimensions.
 
fdl_doc_tfdl_doc_create_with_header (const char *uuid, int version_major, int version_minor, const char *fdl_creator, const char *default_framing_intent)
 Create a new FDL document with header fields and empty collections.
 
void fdl_doc_set_uuid (fdl_doc_t *doc, const char *uuid)
 Set the UUID on a document.
 
void fdl_doc_set_fdl_creator (fdl_doc_t *doc, const char *creator)
 Set the fdl_creator on a document.
 
void fdl_doc_set_default_framing_intent (fdl_doc_t *doc, const char *fi_id)
 Set the default_framing_intent on a document.
 
void fdl_doc_set_version (fdl_doc_t *doc, int major, int minor)
 Set the FDL version on a document.
 
fdl_framing_intent_tfdl_doc_add_framing_intent (fdl_doc_t *doc, const char *id, const char *label, int64_t aspect_w, int64_t aspect_h, double protection)
 Add a framing intent to the document.
 
fdl_context_tfdl_doc_add_context (fdl_doc_t *doc, const char *label, const char *context_creator)
 Add a context to the document.
 
fdl_canvas_tfdl_context_add_canvas (fdl_context_t *ctx, const char *id, const char *label, const char *source_canvas_id, int64_t dim_w, int64_t dim_h, double squeeze)
 Add a canvas to a context.
 
void fdl_canvas_set_effective_dimensions (fdl_canvas_t *canvas, fdl_dimensions_i64_t dims, fdl_point_f64_t anchor)
 Set effective dimensions and anchor on a canvas.
 
void fdl_canvas_set_photosite_dimensions (fdl_canvas_t *canvas, fdl_dimensions_i64_t dims)
 Set photosite dimensions on a canvas.
 
void fdl_canvas_set_physical_dimensions (fdl_canvas_t *canvas, fdl_dimensions_f64_t dims)
 Set physical dimensions on a canvas.
 
fdl_framing_decision_tfdl_canvas_add_framing_decision (fdl_canvas_t *canvas, const char *id, const char *label, const char *framing_intent_id, double dim_w, double dim_h, double anchor_x, double anchor_y)
 Add a framing decision to a canvas.
 
fdl_canvas_template_tfdl_doc_add_canvas_template (fdl_doc_t *doc, const char *id, const char *label, int64_t target_w, int64_t target_h, double target_squeeze, fdl_geometry_path_t fit_source, fdl_fit_method_t fit_method, fdl_halign_t halign, fdl_valign_t valign, fdl_round_strategy_t rounding)
 Add a canvas template to the document.
 
void fdl_canvas_template_set_preserve_from_source_canvas (fdl_canvas_template_t *ct, fdl_geometry_path_t path)
 Set preserve_from_source_canvas on a canvas template.
 
void fdl_canvas_template_set_maximum_dimensions (fdl_canvas_template_t *ct, fdl_dimensions_i64_t dims)
 Set maximum_dimensions on a canvas template.
 
void fdl_canvas_template_set_pad_to_maximum (fdl_canvas_template_t *ct, int pad)
 Set pad_to_maximum flag on a canvas template.
 
void fdl_framing_decision_set_protection (fdl_framing_decision_t *fd, fdl_dimensions_f64_t dims, fdl_point_f64_t anchor)
 Set protection dimensions and anchor on a framing decision.
 
void fdl_framing_intent_set_aspect_ratio (fdl_framing_intent_t *fi, fdl_dimensions_i64_t dims)
 Set aspect ratio on a framing intent.
 
void fdl_framing_intent_set_protection (fdl_framing_intent_t *fi, double protection)
 Set protection factor on a framing intent.
 
void fdl_canvas_set_dimensions (fdl_canvas_t *canvas, fdl_dimensions_i64_t dims)
 Set dimensions on a canvas.
 
void fdl_canvas_set_anamorphic_squeeze (fdl_canvas_t *canvas, double squeeze)
 Set anamorphic squeeze on a canvas.
 
void fdl_canvas_set_effective_dims_only (fdl_canvas_t *canvas, fdl_dimensions_i64_t dims)
 Set effective dimensions on a canvas.
 
void fdl_canvas_remove_effective (fdl_canvas_t *canvas)
 Remove effective dimensions and anchor from a canvas.
 
void fdl_framing_decision_set_dimensions (fdl_framing_decision_t *fd, fdl_dimensions_f64_t dims)
 Set dimensions on a framing decision.
 
void fdl_framing_decision_set_anchor_point (fdl_framing_decision_t *fd, fdl_point_f64_t point)
 Set anchor point on a framing decision.
 
void fdl_framing_decision_set_protection_dimensions (fdl_framing_decision_t *fd, fdl_dimensions_f64_t dims)
 Set protection dimensions on a framing decision (without changing anchor).
 
void fdl_framing_decision_set_protection_anchor_point (fdl_framing_decision_t *fd, fdl_point_f64_t point)
 Set protection anchor point on a framing decision (without changing dimensions).
 
void fdl_framing_decision_remove_protection (fdl_framing_decision_t *fd)
 Remove protection dimensions and anchor from a framing decision.
 
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.
 
const char * fdl_context_set_clip_id_json (fdl_context_t *ctx, const char *json_str, size_t json_len)
 Set clip_id on a context from a JSON string.
 
void fdl_context_remove_clip_id (fdl_context_t *ctx)
 Remove clip_id from a context.
 
const char * fdl_clip_id_validate_json (const char *json_str, size_t json_len)
 Validate clip_id JSON for mutual exclusion (file vs sequence).
 
fdl_validation_result_tfdl_doc_validate (const fdl_doc_t *doc)
 Run schema and semantic validators on the document.
 
uint32_t fdl_validation_result_error_count (const fdl_validation_result_t *result)
 Get the number of validation errors.
 
const char * fdl_validation_result_error_at (const fdl_validation_result_t *result, uint32_t index)
 Get a specific error message by index.
 
void fdl_validation_result_free (fdl_validation_result_t *result)
 Free a validation result.
 
void fdl_free (void *ptr)
 Free memory allocated by fdl_core functions.
 
int fdl_doc_set_custom_attr_string (fdl_doc_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_doc_set_custom_attr_int (fdl_doc_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_doc_set_custom_attr_float (fdl_doc_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_doc_set_custom_attr_bool (fdl_doc_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_doc_get_custom_attr_string (const fdl_doc_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_doc_get_custom_attr_int (const fdl_doc_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_doc_get_custom_attr_float (const fdl_doc_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_doc_get_custom_attr_bool (const fdl_doc_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_doc_has_custom_attr (const fdl_doc_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_doc_get_custom_attr_type (const fdl_doc_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_doc_remove_custom_attr (fdl_doc_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_doc_custom_attrs_count (const fdl_doc_t *h)
 Count custom attributes on this object.
 
const char * fdl_doc_custom_attr_name_at (const fdl_doc_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_doc_set_custom_attr_point_f64 (fdl_doc_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_doc_get_custom_attr_point_f64 (const fdl_doc_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_doc_set_custom_attr_dims_f64 (fdl_doc_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_doc_get_custom_attr_dims_f64 (const fdl_doc_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_doc_set_custom_attr_dims_i64 (fdl_doc_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_doc_get_custom_attr_dims_i64 (const fdl_doc_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_context_set_custom_attr_string (fdl_context_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_context_set_custom_attr_int (fdl_context_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_context_set_custom_attr_float (fdl_context_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_context_set_custom_attr_bool (fdl_context_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_context_get_custom_attr_string (const fdl_context_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_context_get_custom_attr_int (const fdl_context_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_context_get_custom_attr_float (const fdl_context_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_context_get_custom_attr_bool (const fdl_context_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_context_has_custom_attr (const fdl_context_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_context_get_custom_attr_type (const fdl_context_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_context_remove_custom_attr (fdl_context_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_context_custom_attrs_count (const fdl_context_t *h)
 Count custom attributes on this object.
 
const char * fdl_context_custom_attr_name_at (const fdl_context_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_context_set_custom_attr_point_f64 (fdl_context_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_context_get_custom_attr_point_f64 (const fdl_context_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_context_set_custom_attr_dims_f64 (fdl_context_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_context_get_custom_attr_dims_f64 (const fdl_context_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_context_set_custom_attr_dims_i64 (fdl_context_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_context_get_custom_attr_dims_i64 (const fdl_context_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_canvas_set_custom_attr_string (fdl_canvas_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_canvas_set_custom_attr_int (fdl_canvas_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_canvas_set_custom_attr_float (fdl_canvas_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_canvas_set_custom_attr_bool (fdl_canvas_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_canvas_get_custom_attr_string (const fdl_canvas_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_canvas_get_custom_attr_int (const fdl_canvas_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_canvas_get_custom_attr_float (const fdl_canvas_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_canvas_get_custom_attr_bool (const fdl_canvas_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_canvas_has_custom_attr (const fdl_canvas_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_canvas_get_custom_attr_type (const fdl_canvas_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_canvas_remove_custom_attr (fdl_canvas_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_canvas_custom_attrs_count (const fdl_canvas_t *h)
 Count custom attributes on this object.
 
const char * fdl_canvas_custom_attr_name_at (const fdl_canvas_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_canvas_set_custom_attr_point_f64 (fdl_canvas_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_canvas_get_custom_attr_point_f64 (const fdl_canvas_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_canvas_set_custom_attr_dims_f64 (fdl_canvas_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_canvas_get_custom_attr_dims_f64 (const fdl_canvas_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_canvas_set_custom_attr_dims_i64 (fdl_canvas_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_canvas_get_custom_attr_dims_i64 (const fdl_canvas_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_framing_decision_set_custom_attr_string (fdl_framing_decision_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_framing_decision_set_custom_attr_int (fdl_framing_decision_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_framing_decision_set_custom_attr_float (fdl_framing_decision_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_framing_decision_set_custom_attr_bool (fdl_framing_decision_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_framing_decision_get_custom_attr_string (const fdl_framing_decision_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_framing_decision_get_custom_attr_int (const fdl_framing_decision_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_framing_decision_get_custom_attr_float (const fdl_framing_decision_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_framing_decision_get_custom_attr_bool (const fdl_framing_decision_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_framing_decision_has_custom_attr (const fdl_framing_decision_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_framing_decision_get_custom_attr_type (const fdl_framing_decision_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_framing_decision_remove_custom_attr (fdl_framing_decision_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_framing_decision_custom_attrs_count (const fdl_framing_decision_t *h)
 Count custom attributes on this object.
 
const char * fdl_framing_decision_custom_attr_name_at (const fdl_framing_decision_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_framing_decision_set_custom_attr_point_f64 (fdl_framing_decision_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_framing_decision_get_custom_attr_point_f64 (const fdl_framing_decision_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_framing_decision_set_custom_attr_dims_f64 (fdl_framing_decision_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_framing_decision_get_custom_attr_dims_f64 (const fdl_framing_decision_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_framing_decision_set_custom_attr_dims_i64 (fdl_framing_decision_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_framing_decision_get_custom_attr_dims_i64 (const fdl_framing_decision_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_framing_intent_set_custom_attr_string (fdl_framing_intent_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_framing_intent_set_custom_attr_int (fdl_framing_intent_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_framing_intent_set_custom_attr_float (fdl_framing_intent_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_framing_intent_set_custom_attr_bool (fdl_framing_intent_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_framing_intent_get_custom_attr_string (const fdl_framing_intent_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_framing_intent_get_custom_attr_int (const fdl_framing_intent_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_framing_intent_get_custom_attr_float (const fdl_framing_intent_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_framing_intent_get_custom_attr_bool (const fdl_framing_intent_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_framing_intent_has_custom_attr (const fdl_framing_intent_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_framing_intent_get_custom_attr_type (const fdl_framing_intent_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_framing_intent_remove_custom_attr (fdl_framing_intent_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_framing_intent_custom_attrs_count (const fdl_framing_intent_t *h)
 Count custom attributes on this object.
 
const char * fdl_framing_intent_custom_attr_name_at (const fdl_framing_intent_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_framing_intent_set_custom_attr_point_f64 (fdl_framing_intent_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_framing_intent_get_custom_attr_point_f64 (const fdl_framing_intent_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_framing_intent_set_custom_attr_dims_f64 (fdl_framing_intent_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_framing_intent_get_custom_attr_dims_f64 (const fdl_framing_intent_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_framing_intent_set_custom_attr_dims_i64 (fdl_framing_intent_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_framing_intent_get_custom_attr_dims_i64 (const fdl_framing_intent_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_canvas_template_set_custom_attr_string (fdl_canvas_template_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_canvas_template_set_custom_attr_int (fdl_canvas_template_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_canvas_template_set_custom_attr_float (fdl_canvas_template_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_canvas_template_set_custom_attr_bool (fdl_canvas_template_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_canvas_template_get_custom_attr_string (const fdl_canvas_template_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_canvas_template_get_custom_attr_int (const fdl_canvas_template_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_canvas_template_get_custom_attr_float (const fdl_canvas_template_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_canvas_template_get_custom_attr_bool (const fdl_canvas_template_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_canvas_template_has_custom_attr (const fdl_canvas_template_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_canvas_template_get_custom_attr_type (const fdl_canvas_template_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_canvas_template_remove_custom_attr (fdl_canvas_template_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_canvas_template_custom_attrs_count (const fdl_canvas_template_t *h)
 Count custom attributes on this object.
 
const char * fdl_canvas_template_custom_attr_name_at (const fdl_canvas_template_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_canvas_template_set_custom_attr_point_f64 (fdl_canvas_template_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_canvas_template_get_custom_attr_point_f64 (const fdl_canvas_template_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_canvas_template_set_custom_attr_dims_f64 (fdl_canvas_template_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_canvas_template_get_custom_attr_dims_f64 (const fdl_canvas_template_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_canvas_template_set_custom_attr_dims_i64 (fdl_canvas_template_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_canvas_template_get_custom_attr_dims_i64 (const fdl_canvas_template_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_clip_id_set_custom_attr_string (fdl_clip_id_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_clip_id_set_custom_attr_int (fdl_clip_id_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_clip_id_set_custom_attr_float (fdl_clip_id_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_clip_id_set_custom_attr_bool (fdl_clip_id_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_clip_id_get_custom_attr_string (const fdl_clip_id_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_clip_id_get_custom_attr_int (const fdl_clip_id_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_clip_id_get_custom_attr_float (const fdl_clip_id_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_clip_id_get_custom_attr_bool (const fdl_clip_id_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_clip_id_has_custom_attr (const fdl_clip_id_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_clip_id_get_custom_attr_type (const fdl_clip_id_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_clip_id_remove_custom_attr (fdl_clip_id_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_clip_id_custom_attrs_count (const fdl_clip_id_t *h)
 Count custom attributes on this object.
 
const char * fdl_clip_id_custom_attr_name_at (const fdl_clip_id_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_clip_id_set_custom_attr_point_f64 (fdl_clip_id_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_clip_id_get_custom_attr_point_f64 (const fdl_clip_id_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_clip_id_set_custom_attr_dims_f64 (fdl_clip_id_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_clip_id_get_custom_attr_dims_f64 (const fdl_clip_id_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_clip_id_set_custom_attr_dims_i64 (fdl_clip_id_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_clip_id_get_custom_attr_dims_i64 (const fdl_clip_id_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
int fdl_file_sequence_set_custom_attr_string (fdl_file_sequence_t *h, const char *name, const char *value)
 Set a string custom attribute.
 
int fdl_file_sequence_set_custom_attr_int (fdl_file_sequence_t *h, const char *name, int64_t value)
 Set an integer custom attribute.
 
int fdl_file_sequence_set_custom_attr_float (fdl_file_sequence_t *h, const char *name, double value)
 Set a float custom attribute.
 
int fdl_file_sequence_set_custom_attr_bool (fdl_file_sequence_t *h, const char *name, int value)
 Set a boolean custom attribute.
 
const char * fdl_file_sequence_get_custom_attr_string (const fdl_file_sequence_t *h, const char *name)
 Get a string custom attribute.
 
int fdl_file_sequence_get_custom_attr_int (const fdl_file_sequence_t *h, const char *name, int64_t *out)
 Get an integer custom attribute.
 
int fdl_file_sequence_get_custom_attr_float (const fdl_file_sequence_t *h, const char *name, double *out)
 Get a float custom attribute.
 
int fdl_file_sequence_get_custom_attr_bool (const fdl_file_sequence_t *h, const char *name, int *out)
 Get a boolean custom attribute.
 
int fdl_file_sequence_has_custom_attr (const fdl_file_sequence_t *h, const char *name)
 Check if a custom attribute exists.
 
fdl_custom_attr_type_t fdl_file_sequence_get_custom_attr_type (const fdl_file_sequence_t *h, const char *name)
 Get the type of a custom attribute.
 
int fdl_file_sequence_remove_custom_attr (fdl_file_sequence_t *h, const char *name)
 Remove a custom attribute.
 
uint32_t fdl_file_sequence_custom_attrs_count (const fdl_file_sequence_t *h)
 Count custom attributes on this object.
 
const char * fdl_file_sequence_custom_attr_name_at (const fdl_file_sequence_t *h, uint32_t index)
 Get name of custom attribute at index (without '_' prefix).
 
int fdl_file_sequence_set_custom_attr_point_f64 (fdl_file_sequence_t *h, const char *name, fdl_point_f64_t value)
 Set a point_f64 custom attribute.
 
int fdl_file_sequence_get_custom_attr_point_f64 (const fdl_file_sequence_t *h, const char *name, fdl_point_f64_t *out)
 Get a point_f64 custom attribute.
 
int fdl_file_sequence_set_custom_attr_dims_f64 (fdl_file_sequence_t *h, const char *name, fdl_dimensions_f64_t value)
 Set a dims_f64 custom attribute.
 
int fdl_file_sequence_get_custom_attr_dims_f64 (const fdl_file_sequence_t *h, const char *name, fdl_dimensions_f64_t *out)
 Get a dims_f64 custom attribute.
 
int fdl_file_sequence_set_custom_attr_dims_i64 (fdl_file_sequence_t *h, const char *name, fdl_dimensions_i64_t value)
 Set a dims_i64 custom attribute.
 
int fdl_file_sequence_get_custom_attr_dims_i64 (const fdl_file_sequence_t *h, const char *name, fdl_dimensions_i64_t *out)
 Get a dims_i64 custom attribute.
 
Framing Intents — root-level collection
uint32_t fdl_doc_framing_intents_count (fdl_doc_t *doc)
 Get the number of framing intents in the document.
 
fdl_framing_intent_tfdl_doc_framing_intent_at (fdl_doc_t *doc, uint32_t index)
 Get a framing intent by index.
 
fdl_framing_intent_tfdl_doc_framing_intent_find_by_id (fdl_doc_t *doc, const char *id)
 Find a framing intent by its ID string.
 
Contexts — root-level collection
uint32_t fdl_doc_contexts_count (fdl_doc_t *doc)
 Get the number of contexts in the document.
 
fdl_context_tfdl_doc_context_at (fdl_doc_t *doc, uint32_t index)
 Get a context by index.
 
fdl_context_tfdl_doc_context_find_by_label (fdl_doc_t *doc, const char *label)
 Find a context by its label string.
 
Canvas Templates — root-level collection
uint32_t fdl_doc_canvas_templates_count (fdl_doc_t *doc)
 Get the number of canvas templates in the document.
 
fdl_canvas_template_tfdl_doc_canvas_template_at (fdl_doc_t *doc, uint32_t index)
 Get a canvas template by index.
 
fdl_canvas_template_tfdl_doc_canvas_template_find_by_id (fdl_doc_t *doc, const char *id)
 Find a canvas template by its ID string.
 
Canvases — child collection of context
uint32_t fdl_context_canvases_count (const fdl_context_t *ctx)
 Get the number of canvases in a context.
 
fdl_canvas_tfdl_context_canvas_at (fdl_context_t *ctx, uint32_t index)
 Get a canvas by index within a context.
 
fdl_canvas_tfdl_context_find_canvas_by_id (fdl_context_t *ctx, const char *id)
 Find a canvas by its ID within a context.
 
Framing Decisions — child collection of canvas
uint32_t fdl_canvas_framing_decisions_count (const fdl_canvas_t *canvas)
 Get the number of framing decisions in a canvas.
 
fdl_framing_decision_tfdl_canvas_framing_decision_at (fdl_canvas_t *canvas, uint32_t index)
 Get a framing decision by index within a canvas.
 
fdl_framing_decision_tfdl_canvas_find_framing_decision_by_id (fdl_canvas_t *canvas, const char *id)
 Find a framing decision by its ID within a canvas.
 

Detailed Description

Public C ABI for the FDL (Framing Decision List) core library.

Provides document parsing, serialization, validation, geometry operations, template application, and a builder API for creating FDL documents. All public symbols use the FDL_API export macro for shared-library visibility.

Thread safety: per-document mutex locking. See THREAD_SAFETY for details.

Macro Definition Documentation

◆ FDL_TRUE

#define FDL_TRUE   1

Boolean constants for C ABI int fields and return values.

Boolean true.

◆ FDL_DEFAULT_JSON_INDENT

#define FDL_DEFAULT_JSON_INDENT   2

Default JSON serialization indent.

Spaces per indent level.

◆ FDL_CUSTOM_ATTR_DECL

#define FDL_CUSTOM_ATTR_DECL (   PREFIX,
  HANDLE_TYPE 
)

Macro to declare all 19 custom attribute functions for a handle type.

Parameters
PREFIXFunction name prefix (e.g., fdl_doc_).
HANDLE_TYPEC handle type (e.g., fdl_doc_t).

Typedef Documentation

◆ fdl_abi_version_t

ABI version triple for runtime compatibility checks.

Fields are uint64_t (not uint32_t) so the struct avoids sub-register packing on ARM64, which causes field-swap bugs in CFFI ABI mode. See the Enums section comment for the full rationale.

◆ fdl_geometry_t

Geometry container for FDL template transformation processing.

Holds 4 dimension layers + 3 anchor points through the pipeline.

◆ fdl_doc_t

typedef struct fdl_doc fdl_doc_t

Thread Safety

libfdl_core provides per-document mutex locking:

  • Different documents on different threads: SAFE
  • Same document, concurrent reads: SAFE (serialized)
  • Same document, concurrent read + write: SAFE (serialized)
  • fdl_doc_free() during operations: NOT SAFE (caller must synchronize)

String accessors return thread-local pointers keyed by field name. Valid until the next call for the SAME field on the SAME thread.

Handle Validity

Handles use index-based resolution and remain valid after collection mutations (push_back). Repeated access for the same index returns the same handle (deduplication). A handle is valid until:

  • The owning document is freed (fdl_doc_free)
  • The element at the handle's index is removed (not currently supported) Opaque handle to an FDL document.

Function Documentation

◆ fdl_abi_version()

fdl_abi_version_t fdl_abi_version ( void  )

Return the ABI version of the loaded library.

Returns
ABI version triple (major, minor, patch).

◆ fdl_round()

int64_t fdl_round ( double  value,
fdl_rounding_even_t  even,
fdl_rounding_mode_t  mode 
)

Round a single value according to FDL rounding rules.

Parameters
valueThe floating-point value to round.
evenEven constraint (FDL_ROUNDING_EVEN_WHOLE or _EVEN).
modeRounding direction (FDL_ROUNDING_MODE_UP, _DOWN, or _ROUND).
Returns
Rounded integer value.

◆ fdl_round_dimensions()

fdl_dimensions_f64_t fdl_round_dimensions ( fdl_dimensions_f64_t  dims,
fdl_rounding_even_t  even,
fdl_rounding_mode_t  mode 
)

Round dimensions according to FDL rounding rules.

Parameters
dimsDimensions to round.
evenEven constraint.
modeRounding direction.
Returns
Rounded dimensions (both width and height rounded independently).

◆ fdl_round_point()

fdl_point_f64_t fdl_round_point ( fdl_point_f64_t  point,
fdl_rounding_even_t  even,
fdl_rounding_mode_t  mode 
)

Round a point according to FDL rounding rules.

Parameters
pointPoint to round.
evenEven constraint.
modeRounding direction.
Returns
Rounded point (both x and y rounded independently).

◆ fdl_dimensions_normalize()

fdl_dimensions_f64_t fdl_dimensions_normalize ( fdl_dimensions_f64_t  dims,
double  squeeze 
)

Normalize dimensions by applying anamorphic squeeze to width.

Converts from squeezed (sensor) coordinates to unsqueezed (display) coordinates. width *= squeeze; height unchanged.

Parameters
dimsDimensions to normalize.
squeezeAnamorphic squeeze factor (e.g. 2.0 for 2x anamorphic).
Returns
Normalized dimensions.

◆ fdl_dimensions_scale()

fdl_dimensions_f64_t fdl_dimensions_scale ( fdl_dimensions_f64_t  dims,
double  scale_factor,
double  target_squeeze 
)

Scale normalized dimensions and apply target squeeze.

width = (width * scale_factor) / target_squeeze; height = height * scale_factor.

Parameters
dimsNormalized dimensions to scale.
scale_factorScale multiplier.
target_squeezeTarget anamorphic squeeze to apply.
Returns
Scaled dimensions in target coordinate space.

◆ fdl_dimensions_normalize_and_scale()

fdl_dimensions_f64_t fdl_dimensions_normalize_and_scale ( fdl_dimensions_f64_t  dims,
double  input_squeeze,
double  scale_factor,
double  target_squeeze 
)

Normalize and scale in one step.

Equivalent to fdl_dimensions_scale(fdl_dimensions_normalize(dims, input_squeeze), ...).

Parameters
dimsDimensions to transform.
input_squeezeSource anamorphic squeeze factor.
scale_factorScale multiplier.
target_squeezeTarget anamorphic squeeze factor.
Returns
Transformed dimensions.

◆ fdl_dimensions_sub()

Subtract two dimensions: result = a - b.

Parameters
aMinuend dimensions.
bSubtrahend dimensions.
Returns
Component-wise difference (a.width - b.width, a.height - b.height).

◆ fdl_dimensions_equal()

int fdl_dimensions_equal ( fdl_dimensions_f64_t  a,
fdl_dimensions_f64_t  b 
)

Check if dimensions are approximately equal within FDL tolerance.

Uses relative tolerance of 1e-9 and absolute tolerance of 1e-6.

Parameters
aFirst dimensions.
bSecond dimensions.
Returns
FDL_TRUE if approximately equal, FDL_FALSE otherwise.

◆ fdl_dimensions_f64_gt()

int fdl_dimensions_f64_gt ( fdl_dimensions_f64_t  a,
fdl_dimensions_f64_t  b 
)

Check if a > b using OR logic (either width or height is greater).

Parameters
aFirst dimensions.
bSecond dimensions.
Returns
FDL_TRUE if a.width > b.width OR a.height > b.height, FDL_FALSE otherwise.

◆ fdl_dimensions_f64_lt()

int fdl_dimensions_f64_lt ( fdl_dimensions_f64_t  a,
fdl_dimensions_f64_t  b 
)

Check if a < b using OR logic (either width or height is less).

Parameters
aFirst dimensions.
bSecond dimensions.
Returns
FDL_TRUE if a.width < b.width OR a.height < b.height, FDL_FALSE otherwise.

◆ fdl_dimensions_is_zero()

int fdl_dimensions_is_zero ( fdl_dimensions_f64_t  dims)

Check if both width and height are zero.

Parameters
dimsDimensions to test.
Returns
FDL_TRUE if both components are zero, FDL_FALSE otherwise.

◆ fdl_dimensions_i64_is_zero()

int fdl_dimensions_i64_is_zero ( fdl_dimensions_i64_t  dims)

Check if both width and height are zero (int64 variant).

Parameters
dimsInteger dimensions to test.
Returns
FDL_TRUE if both components are zero, FDL_FALSE otherwise.

◆ fdl_dimensions_i64_normalize()

fdl_dimensions_f64_t fdl_dimensions_i64_normalize ( fdl_dimensions_i64_t  dims,
double  squeeze 
)

Normalize int64 dimensions by applying anamorphic squeeze to width.

Parameters
dimsInteger dimensions to normalize.
squeezeAnamorphic squeeze factor.
Returns
Float dimensions: width = width * squeeze, height unchanged.

◆ fdl_dimensions_f64_to_i64()

fdl_dimensions_i64_t fdl_dimensions_f64_to_i64 ( fdl_dimensions_f64_t  dims)

Convert float dimensions to int64 by truncation.

Parameters
dimsFloat dimensions to convert.
Returns
Integer dimensions (truncated toward zero).

◆ fdl_dimensions_i64_gt()

int fdl_dimensions_i64_gt ( fdl_dimensions_i64_t  a,
fdl_dimensions_i64_t  b 
)

Check if a > b using OR logic (either width or height is greater).

Parameters
aFirst dimensions.
bSecond dimensions.
Returns
FDL_TRUE if a.width > b.width OR a.height > b.height, FDL_FALSE otherwise.

◆ fdl_dimensions_i64_lt()

int fdl_dimensions_i64_lt ( fdl_dimensions_i64_t  a,
fdl_dimensions_i64_t  b 
)

Check if a < b using OR logic (either width or height is less).

Parameters
aFirst dimensions.
bSecond dimensions.
Returns
FDL_TRUE if a.width < b.width OR a.height < b.height, FDL_FALSE otherwise.

◆ fdl_point_normalize()

fdl_point_f64_t fdl_point_normalize ( fdl_point_f64_t  point,
double  squeeze 
)

Normalize a point by applying anamorphic squeeze to x.

Parameters
pointPoint to normalize.
squeezeAnamorphic squeeze factor.
Returns
Normalized point: x *= squeeze, y unchanged.

◆ fdl_point_scale()

fdl_point_f64_t fdl_point_scale ( fdl_point_f64_t  point,
double  scale_factor,
double  target_squeeze 
)

Scale a normalized point and apply target squeeze.

x = (x * scale_factor) / target_squeeze; y = y * scale_factor.

Parameters
pointNormalized point to scale.
scale_factorScale multiplier.
target_squeezeTarget anamorphic squeeze.
Returns
Scaled point in target coordinate space.

◆ fdl_point_add()

fdl_point_f64_t fdl_point_add ( fdl_point_f64_t  a,
fdl_point_f64_t  b 
)

Add two points: result = a + b.

Parameters
aFirst point.
bSecond point.
Returns
Component-wise sum.

◆ fdl_point_sub()

fdl_point_f64_t fdl_point_sub ( fdl_point_f64_t  a,
fdl_point_f64_t  b 
)

Subtract two points: result = a - b.

Parameters
aMinuend point.
bSubtrahend point.
Returns
Component-wise difference.

◆ fdl_point_mul_scalar()

fdl_point_f64_t fdl_point_mul_scalar ( fdl_point_f64_t  a,
double  scalar 
)

Multiply point by scalar.

Parameters
aPoint to scale.
scalarScalar multiplier applied to both x and y.
Returns
Scaled point.

◆ fdl_point_clamp()

fdl_point_f64_t fdl_point_clamp ( fdl_point_f64_t  point,
double  min_val,
double  max_val,
int  has_min,
int  has_max 
)

Clamp point values to [min_val, max_val].

Each bound is optional — set the corresponding has_* flag to enable it.

Parameters
pointPoint to clamp.
min_valMinimum bound (applied to both x and y).
max_valMaximum bound (applied to both x and y).
has_minFDL_TRUE to apply min_val, FDL_FALSE to skip.
has_maxFDL_TRUE to apply max_val, FDL_FALSE to skip.
Returns
Clamped point.

◆ fdl_point_is_zero()

int fdl_point_is_zero ( fdl_point_f64_t  point)

Check if both x and y are zero.

Parameters
pointPoint to test.
Returns
FDL_TRUE if both components are zero, FDL_FALSE otherwise.

◆ fdl_point_normalize_and_scale()

fdl_point_f64_t fdl_point_normalize_and_scale ( fdl_point_f64_t  point,
double  input_squeeze,
double  scale_factor,
double  target_squeeze 
)

Normalize and scale a point in one step.

Parameters
pointPoint to transform.
input_squeezeSource anamorphic squeeze factor.
scale_factorScale multiplier.
target_squeezeTarget anamorphic squeeze factor.
Returns
Transformed point.

◆ fdl_point_equal()

int fdl_point_equal ( fdl_point_f64_t  a,
fdl_point_f64_t  b 
)

Check approximate equality within FDL tolerances.

Parameters
aFirst point.
bSecond point.
Returns
FDL_TRUE if approximately equal, FDL_FALSE otherwise.

◆ fdl_point_f64_lt()

int fdl_point_f64_lt ( fdl_point_f64_t  a,
fdl_point_f64_t  b 
)

Check if a < b using OR logic (either x or y is less).

Parameters
aFirst point.
bSecond point.
Returns
FDL_TRUE if a.x < b.x OR a.y < b.y, FDL_FALSE otherwise.

◆ fdl_point_f64_gt()

int fdl_point_f64_gt ( fdl_point_f64_t  a,
fdl_point_f64_t  b 
)

Check if a > b using OR logic (either x or y is greater).

Parameters
aFirst point.
bSecond point.
Returns
FDL_TRUE if a.x > b.x OR a.y > b.y, FDL_FALSE otherwise.

◆ fdl_fp_rel_tol()

double fdl_fp_rel_tol ( void  )

Relative tolerance for floating-point comparison.

Returns
1e-9.

◆ fdl_fp_abs_tol()

double fdl_fp_abs_tol ( void  )

Absolute tolerance for floating-point comparison.

Returns
1e-6.

◆ fdl_geometry_fill_hierarchy_gaps()

fdl_geometry_t fdl_geometry_fill_hierarchy_gaps ( fdl_geometry_t  geo,
fdl_point_f64_t  anchor_offset 
)

Fill gaps in the geometry hierarchy by propagating populated dimensions upward.

If a higher-level dimension is zero but a lower level is set, the gap is filled by copying from the populated layer. Protection is NEVER filled from framing. Anchor points are offset by anchor_offset and clamped to >= 0.

Parameters
geoGeometry with potentially sparse dimension layers.
anchor_offsetOffset applied to anchors during gap-filling.
Returns
Geometry with gaps filled.

◆ fdl_geometry_normalize_and_scale()

fdl_geometry_t fdl_geometry_normalize_and_scale ( fdl_geometry_t  geo,
double  source_squeeze,
double  scale_factor,
double  target_squeeze 
)

Normalize and scale all 7 fields of the geometry.

Applies anamorphic normalization and scaling to all dimension and anchor fields.

Parameters
geoGeometry to transform.
source_squeezeSource anamorphic squeeze factor.
scale_factorScale multiplier.
target_squeezeTarget anamorphic squeeze factor.
Returns
Transformed geometry.

◆ fdl_geometry_round()

fdl_geometry_t fdl_geometry_round ( fdl_geometry_t  geo,
fdl_round_strategy_t  strategy 
)

Round all 7 fields of the geometry.

Parameters
geoGeometry to round.
strategyRounding strategy (even + mode).
Returns
Rounded geometry.

◆ fdl_geometry_apply_offset()

fdl_geometry_t fdl_geometry_apply_offset ( fdl_geometry_t  geo,
fdl_point_f64_t  offset,
fdl_point_f64_t theo_eff,
fdl_point_f64_t theo_prot,
fdl_point_f64_t theo_fram 
)

Apply offset to all anchors, clamping to canvas bounds.

The theoretical (unclamped) anchor values are written to the output pointers for use in subsequent cropping.

Parameters
geoGeometry to offset.
offsetTranslation to apply to all anchor points.
theo_eff[out] Unclamped effective anchor (may be NULL).
theo_prot[out] Unclamped protection anchor (may be NULL).
theo_fram[out] Unclamped framing anchor (may be NULL).
Returns
Geometry with clamped anchors.

◆ fdl_geometry_crop()

fdl_geometry_t fdl_geometry_crop ( fdl_geometry_t  geo,
fdl_point_f64_t  theo_eff,
fdl_point_f64_t  theo_prot,
fdl_point_f64_t  theo_fram 
)

Crop all dimensions to visible portion within canvas.

Enforces the hierarchy invariant: canvas >= effective >= protection >= framing. Uses theoretical (unclamped) anchors to compute visible extents.

Parameters
geoGeometry to crop.
theo_effTheoretical effective anchor (from fdl_geometry_apply_offset).
theo_protTheoretical protection anchor.
theo_framTheoretical framing anchor.
Returns
Cropped geometry.

◆ fdl_geometry_get_dims_anchor_from_path()

int fdl_geometry_get_dims_anchor_from_path ( const fdl_geometry_t geo,
fdl_geometry_path_t  path,
fdl_dimensions_f64_t out_dims,
fdl_point_f64_t out_anchor 
)

Extract dimensions and anchor from geometry by path.

Parameters
geoGeometry to query.
pathWhich dimension layer to extract (canvas, effective, protection, or framing).
out_dims[out] Extracted dimensions.
out_anchor[out] Extracted anchor point ({0,0} for canvas path).
Returns
0 on success, -1 on invalid path.

◆ fdl_calculate_scale_factor()

double fdl_calculate_scale_factor ( fdl_dimensions_f64_t  fit_norm,
fdl_dimensions_f64_t  target_norm,
fdl_fit_method_t  fit_method 
)

Calculate scale factor based on fit method.

Computes the ratio needed to scale source (fit_norm) into target (target_norm) using the specified fit method.

Parameters
fit_normNormalized source dimensions.
target_normNormalized target dimensions.
fit_methodFit method (WIDTH, HEIGHT, FIT_ALL, or FILL).
Returns
Scale factor (always > 0).

◆ fdl_output_size_for_axis()

double fdl_output_size_for_axis ( double  canvas_size,
double  max_size,
int  has_max,
int  pad_to_max 
)

Determine output canvas size for a single axis.

Handles three regimes: PAD (pad_to_max -> max_size), CROP (canvas > max -> max_size), FIT (canvas_size unchanged).

Parameters
canvas_sizeComputed canvas size for this axis.
max_sizeMaximum allowed size for this axis.
has_maxFDL_TRUE if max_size constraint is active, FDL_FALSE if unconstrained.
pad_to_maxFDL_TRUE to pad output to max_size, FDL_FALSE otherwise.
Returns
Final output size for this axis.

◆ fdl_alignment_shift()

double fdl_alignment_shift ( double  fit_size,
double  fit_anchor,
double  output_size,
double  canvas_size,
double  target_size,
int  is_center,
double  align_factor,
int  pad_to_max 
)

Calculate content translation shift for a single axis.

Handles three regimes: FIT (no shift), PAD (center/align content in padded area), CROP (clip/align content that exceeds canvas).

Parameters
fit_sizeSize of the content in this axis.
fit_anchorAnchor position of the content.
output_sizeFinal output canvas size.
canvas_sizeComputed canvas size before clamping.
target_sizeTarget template size.
is_centerFDL_TRUE if alignment is center, FDL_FALSE for edge alignment.
align_factorAlignment factor (0.0 = left/top, 1.0 = right/bottom).
pad_to_maxFDL_TRUE if padding to maximum, FDL_FALSE otherwise.
Returns
Translation shift for this axis.

◆ fdl_dimensions_clamp_to_dims()

fdl_dimensions_f64_t fdl_dimensions_clamp_to_dims ( fdl_dimensions_f64_t  dims,
fdl_dimensions_f64_t  clamp_dims,
fdl_point_f64_t out_delta 
)

Clamp dimensions to maximum bounds.

Parameters
dimsDimensions to clamp.
clamp_dimsMaximum allowed dimensions.
out_delta[out] Amount clamped per axis (dims - result), as a point.
Returns
Clamped dimensions (each axis independently capped at clamp_dims).

◆ fdl_compute_framing_from_intent()

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.

Parameters
canvas_dimsFull canvas dimensions (used for anchor centering).
working_dimsEffective dimensions if available, else canvas dims (used for aspect ratio fitting).
squeezeAnamorphic squeeze factor of the canvas.
aspect_ratioTarget aspect ratio as integer width:height (e.g. {16, 9}).
protectionProtection factor (0.0 for no protection, > 0.0 to enable).
roundingRounding strategy for the computed dimensions.
Returns
Result containing computed dimensions, anchors, and optional protection.

◆ fdl_doc_create()

fdl_doc_t * fdl_doc_create ( void  )

Create an empty FDL document.

Returns
New document handle, or NULL on allocation failure. Caller owns — free with fdl_doc_free().

◆ fdl_doc_free()

void fdl_doc_free ( fdl_doc_t doc)

Free an FDL document and all associated handles.

After this call, all handles (contexts, canvases, framing decisions, etc.) obtained from this document are invalid. Safe to call with NULL.

Parameters
docDocument to free, or NULL (no-op).

◆ fdl_doc_parse_json()

fdl_parse_result_t fdl_doc_parse_json ( const char *  json_str,
size_t  json_len 
)

Parse a JSON string into an FDL document.

Parameters
json_strJSON string to parse (need not be null-terminated).
json_lenLength of json_str in bytes.
Returns
Parse result. On success, result.doc is non-NULL (caller owns, free with fdl_doc_free). On failure, result.error is non-NULL (caller owns, free with fdl_free).

< POSIX strdup.

< POSIX strdup.

< POSIX strdup.

◆ fdl_doc_get_uuid()

const char * fdl_doc_get_uuid ( const fdl_doc_t doc)

Get the UUID from a parsed FDL document.

Parameters
docDocument to query.
Returns
UUID string, or NULL if not present. Pointer valid until doc is freed.

◆ fdl_doc_get_fdl_creator()

const char * fdl_doc_get_fdl_creator ( const fdl_doc_t doc)

Get the fdl_creator from a parsed FDL document.

Parameters
docDocument to query.
Returns
Creator string, or NULL if not present. Pointer valid until doc is freed.

◆ fdl_doc_get_default_framing_intent()

const char * fdl_doc_get_default_framing_intent ( const fdl_doc_t doc)

Get the default_framing_intent from a parsed FDL document.

Parameters
docDocument to query.
Returns
Default framing intent ID, or NULL if not present. Pointer valid until doc is freed.

◆ fdl_doc_get_version_major()

int fdl_doc_get_version_major ( const fdl_doc_t doc)

Get the FDL version major number.

Parameters
docDocument to query.
Returns
Major version number, or 0 if not present.

◆ fdl_doc_get_version_minor()

int fdl_doc_get_version_minor ( const fdl_doc_t doc)

Get the FDL version minor number.

Parameters
docDocument to query.
Returns
Minor version number, or 0 if not present.

◆ fdl_doc_to_json()

char * fdl_doc_to_json ( const fdl_doc_t doc,
int  indent 
)

Serialize document to canonical JSON string.

Keys are ordered per the FDL specification; null values are excluded.

Parameters
docDocument to serialize.
indentNumber of spaces per indent level (0 for compact JSON).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free(). Returns NULL if doc is NULL.

< POSIX strdup.

◆ fdl_context_to_json()

char * fdl_context_to_json ( const fdl_context_t ctx,
int  indent 
)

Serialize a context sub-object to canonical JSON.

Parameters
ctxContext handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free(). Returns NULL if ctx is NULL.

◆ fdl_canvas_to_json()

char * fdl_canvas_to_json ( const fdl_canvas_t canvas,
int  indent 
)

Serialize a canvas sub-object to canonical JSON.

Parameters
canvasCanvas handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free().

◆ fdl_framing_decision_to_json()

char * fdl_framing_decision_to_json ( const fdl_framing_decision_t fd,
int  indent 
)

Serialize a framing decision to canonical JSON.

Parameters
fdFraming decision handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free().

◆ fdl_framing_intent_to_json()

char * fdl_framing_intent_to_json ( const fdl_framing_intent_t fi,
int  indent 
)

Serialize a framing intent to canonical JSON.

Parameters
fiFraming intent handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free().

◆ fdl_canvas_template_to_json()

char * fdl_canvas_template_to_json ( const fdl_canvas_template_t ct,
int  indent 
)

Serialize a canvas template to canonical JSON.

Parameters
ctCanvas template handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free().

◆ fdl_doc_framing_intents_count()

uint32_t fdl_doc_framing_intents_count ( fdl_doc_t doc)

Get the number of framing intents in the document.

Parameters
docDocument handle.
Returns
Number of framing intents.

◆ fdl_doc_framing_intent_at()

fdl_framing_intent_t * fdl_doc_framing_intent_at ( fdl_doc_t doc,
uint32_t  index 
)

Get a framing intent by index.

Parameters
docDocument handle.
indexZero-based index.
Returns
Framing intent handle (owned by doc), or NULL if index out of range.

◆ fdl_doc_framing_intent_find_by_id()

fdl_framing_intent_t * fdl_doc_framing_intent_find_by_id ( fdl_doc_t doc,
const char *  id 
)

Find a framing intent by its ID string.

Parameters
docDocument handle.
idFraming intent ID to search for.
Returns
Framing intent handle (owned by doc), or NULL if not found.

◆ fdl_doc_contexts_count()

uint32_t fdl_doc_contexts_count ( fdl_doc_t doc)

Get the number of contexts in the document.

Parameters
docDocument handle.
Returns
Number of contexts.

◆ fdl_doc_context_at()

fdl_context_t * fdl_doc_context_at ( fdl_doc_t doc,
uint32_t  index 
)

Get a context by index.

Parameters
docDocument handle.
indexZero-based index.
Returns
Context handle (owned by doc), or NULL if index out of range.

◆ fdl_doc_context_find_by_label()

fdl_context_t * fdl_doc_context_find_by_label ( fdl_doc_t doc,
const char *  label 
)

Find a context by its label string.

Parameters
docDocument handle.
labelContext label to search for.
Returns
Context handle (owned by doc), or NULL if not found.

◆ fdl_doc_canvas_templates_count()

uint32_t fdl_doc_canvas_templates_count ( fdl_doc_t doc)

Get the number of canvas templates in the document.

Parameters
docDocument handle.
Returns
Number of canvas templates.

◆ fdl_doc_canvas_template_at()

fdl_canvas_template_t * fdl_doc_canvas_template_at ( fdl_doc_t doc,
uint32_t  index 
)

Get a canvas template by index.

Parameters
docDocument handle.
indexZero-based index.
Returns
Canvas template handle (owned by doc), or NULL if index out of range.

◆ fdl_doc_canvas_template_find_by_id()

fdl_canvas_template_t * fdl_doc_canvas_template_find_by_id ( fdl_doc_t doc,
const char *  id 
)

Find a canvas template by its ID string.

Parameters
docDocument handle.
idCanvas template ID to search for.
Returns
Canvas template handle (owned by doc), or NULL if not found.

◆ fdl_context_canvases_count()

uint32_t fdl_context_canvases_count ( const fdl_context_t ctx)

Get the number of canvases in a context.

Parameters
ctxContext handle.
Returns
Number of canvases.

◆ fdl_context_canvas_at()

fdl_canvas_t * fdl_context_canvas_at ( fdl_context_t ctx,
uint32_t  index 
)

Get a canvas by index within a context.

Parameters
ctxContext handle.
indexZero-based index.
Returns
Canvas handle (owned by doc), or NULL if index out of range.

◆ fdl_context_find_canvas_by_id()

fdl_canvas_t * fdl_context_find_canvas_by_id ( fdl_context_t ctx,
const char *  id 
)

Find a canvas by its ID within a context.

Parameters
ctxContext handle.
idCanvas ID to search for.
Returns
Canvas handle (owned by doc), or NULL if not found.

◆ fdl_canvas_framing_decisions_count()

uint32_t fdl_canvas_framing_decisions_count ( const fdl_canvas_t canvas)

Get the number of framing decisions in a canvas.

Parameters
canvasCanvas handle.
Returns
Number of framing decisions.

◆ fdl_canvas_framing_decision_at()

fdl_framing_decision_t * fdl_canvas_framing_decision_at ( fdl_canvas_t canvas,
uint32_t  index 
)

Get a framing decision by index within a canvas.

Parameters
canvasCanvas handle.
indexZero-based index.
Returns
Framing decision handle (owned by doc), or NULL if index out of range.

◆ fdl_canvas_find_framing_decision_by_id()

fdl_framing_decision_t * fdl_canvas_find_framing_decision_by_id ( fdl_canvas_t canvas,
const char *  id 
)

Find a framing decision by its ID within a canvas.

Parameters
canvasCanvas handle.
idFraming decision ID to search for.
Returns
Framing decision handle (owned by doc), or NULL if not found.

◆ fdl_context_get_label()

const char * fdl_context_get_label ( const fdl_context_t ctx)

Get the label of a context.

Parameters
ctxContext handle.
Returns
Label string. Thread-local pointer, valid until next call for same field on same thread.

◆ fdl_context_get_context_creator()

const char * fdl_context_get_context_creator ( const fdl_context_t ctx)

Get the context_creator of a context.

Parameters
ctxContext handle.
Returns
Creator string. Thread-local pointer, valid until next call for same field on same thread.

◆ fdl_context_has_clip_id()

int fdl_context_has_clip_id ( const fdl_context_t ctx)

Check if a context has a clip_id.

Parameters
ctxContext handle.
Returns
FDL_TRUE if clip_id is present, FDL_FALSE otherwise.

◆ fdl_context_get_clip_id()

const char * fdl_context_get_clip_id ( const fdl_context_t ctx)

Get clip_id as a JSON string.

Parameters
ctxContext handle.
Returns
Heap-allocated JSON string, or NULL if not present. Caller owns — free with fdl_free().

< POSIX strdup.

◆ fdl_context_clip_id()

fdl_clip_id_t * fdl_context_clip_id ( fdl_context_t ctx)

Get the clip_id handle from a context.

Parameters
ctxContext handle.
Returns
Clip ID handle (owned by doc), or NULL if clip_id is not present.

◆ fdl_clip_id_get_clip_name()

const char * fdl_clip_id_get_clip_name ( const fdl_clip_id_t cid)

Get the clip_name from a clip_id.

Parameters
cidClip ID handle.
Returns
Clip name string. Thread-local pointer, valid until next call for same field on same thread.

◆ fdl_clip_id_has_file()

int fdl_clip_id_has_file ( const fdl_clip_id_t cid)

Check if a clip_id has a file path.

Parameters
cidClip ID handle.
Returns
FDL_TRUE if file is present, FDL_FALSE otherwise.

◆ fdl_clip_id_get_file()

const char * fdl_clip_id_get_file ( const fdl_clip_id_t cid)

Get the file path from a clip_id.

Parameters
cidClip ID handle.
Returns
File path string, or NULL if not present. Thread-local pointer.

◆ fdl_clip_id_has_sequence()

int fdl_clip_id_has_sequence ( const fdl_clip_id_t cid)

Check if a clip_id has a file sequence.

Parameters
cidClip ID handle.
Returns
FDL_TRUE if sequence is present, FDL_FALSE otherwise.

◆ fdl_clip_id_sequence()

fdl_file_sequence_t * fdl_clip_id_sequence ( fdl_clip_id_t cid)

Get the file sequence handle from a clip_id.

Parameters
cidClip ID handle.
Returns
File sequence handle (owned by doc), or NULL if sequence is not present.

◆ fdl_clip_id_to_json()

char * fdl_clip_id_to_json ( const fdl_clip_id_t cid,
int  indent 
)

Serialize a clip_id to canonical JSON.

Parameters
cidClip ID handle.
indentNumber of spaces per indent level (0 for compact).
Returns
Heap-allocated JSON string. Caller owns — free with fdl_free().

◆ fdl_file_sequence_get_value()

const char * fdl_file_sequence_get_value ( const fdl_file_sequence_t seq)

Get the sequence pattern value string.

Parameters
seqFile sequence handle.
Returns
Sequence pattern string. Thread-local pointer.

◆ fdl_file_sequence_get_idx()

const char * fdl_file_sequence_get_idx ( const fdl_file_sequence_t seq)

Get the index variable name.

Parameters
seqFile sequence handle.
Returns
Index variable string. Thread-local pointer.

◆ fdl_file_sequence_get_min()

int64_t fdl_file_sequence_get_min ( const fdl_file_sequence_t seq)

Get the minimum (first) frame number.

Parameters
seqFile sequence handle.
Returns
First frame number.

◆ fdl_file_sequence_get_max()

int64_t fdl_file_sequence_get_max ( const fdl_file_sequence_t seq)

Get the maximum (last) frame number.

Parameters
seqFile sequence handle.
Returns
Last frame number.

◆ fdl_canvas_get_label()

const char * fdl_canvas_get_label ( const fdl_canvas_t canvas)

Get the label of a canvas.

Parameters
canvasCanvas handle.
Returns
Label string. Thread-local pointer.

◆ fdl_canvas_get_id()

const char * fdl_canvas_get_id ( const fdl_canvas_t canvas)

Get the ID of a canvas.

Parameters
canvasCanvas handle.
Returns
ID string. Thread-local pointer.

◆ fdl_canvas_get_source_canvas_id()

const char * fdl_canvas_get_source_canvas_id ( const fdl_canvas_t canvas)

Get the source_canvas_id of a canvas (the canvas this was derived from).

Parameters
canvasCanvas handle.
Returns
Source canvas ID string. Thread-local pointer.

◆ fdl_canvas_get_dimensions()

fdl_dimensions_i64_t fdl_canvas_get_dimensions ( const fdl_canvas_t canvas)

Get the canvas dimensions in pixels.

Parameters
canvasCanvas handle.
Returns
Canvas dimensions.

◆ fdl_canvas_has_effective_dimensions()

int fdl_canvas_has_effective_dimensions ( const fdl_canvas_t canvas)

Check if the canvas has effective dimensions set.

Parameters
canvasCanvas handle.
Returns
FDL_TRUE if effective dimensions are present, FDL_FALSE otherwise.

◆ fdl_canvas_get_effective_dimensions()

fdl_dimensions_i64_t fdl_canvas_get_effective_dimensions ( const fdl_canvas_t canvas)

Get effective (active image area) dimensions.

Parameters
canvasCanvas handle.
Returns
Effective dimensions. Only valid if fdl_canvas_has_effective_dimensions() returns FDL_TRUE.

◆ fdl_canvas_get_effective_anchor_point()

fdl_point_f64_t fdl_canvas_get_effective_anchor_point ( const fdl_canvas_t canvas)

Get the effective anchor point (offset from canvas origin).

Parameters
canvasCanvas handle.
Returns
Effective anchor point. Returns {0,0} if no effective dimensions.

◆ fdl_canvas_get_anamorphic_squeeze()

double fdl_canvas_get_anamorphic_squeeze ( const fdl_canvas_t canvas)

Get the anamorphic squeeze factor.

Parameters
canvasCanvas handle.
Returns
Squeeze factor (1.0 for non-anamorphic).

◆ fdl_canvas_has_photosite_dimensions()

int fdl_canvas_has_photosite_dimensions ( const fdl_canvas_t canvas)

Check if the canvas has photosite dimensions set.

Parameters
canvasCanvas handle.
Returns
FDL_TRUE if photosite dimensions are present, FDL_FALSE otherwise.

◆ fdl_canvas_get_photosite_dimensions()

fdl_dimensions_i64_t fdl_canvas_get_photosite_dimensions ( const fdl_canvas_t canvas)

Get photosite (sensor) dimensions.

Parameters
canvasCanvas handle.
Returns
Photosite dimensions. Only valid if fdl_canvas_has_photosite_dimensions() returns FDL_TRUE.

◆ fdl_canvas_has_physical_dimensions()

int fdl_canvas_has_physical_dimensions ( const fdl_canvas_t canvas)

Check if the canvas has physical dimensions set.

Parameters
canvasCanvas handle.
Returns
FDL_TRUE if physical dimensions are present, FDL_FALSE otherwise.

◆ fdl_canvas_get_physical_dimensions()

fdl_dimensions_f64_t fdl_canvas_get_physical_dimensions ( const fdl_canvas_t canvas)

Get physical dimensions (e.g.

millimeters on sensor).

Parameters
canvasCanvas handle.
Returns
Physical dimensions. Only valid if fdl_canvas_has_physical_dimensions() returns FDL_TRUE.

◆ fdl_framing_decision_get_label()

const char * fdl_framing_decision_get_label ( const fdl_framing_decision_t fd)

Get the label of a framing decision.

Parameters
fdFraming decision handle.
Returns
Label string. Thread-local pointer.

◆ fdl_framing_decision_get_id()

const char * fdl_framing_decision_get_id ( const fdl_framing_decision_t fd)

Get the ID of a framing decision.

Parameters
fdFraming decision handle.
Returns
ID string. Thread-local pointer.

◆ fdl_framing_decision_get_framing_intent_id()

const char * fdl_framing_decision_get_framing_intent_id ( const fdl_framing_decision_t fd)

Get the framing_intent_id that this framing decision references.

Parameters
fdFraming decision handle.
Returns
Framing intent ID string. Thread-local pointer.

◆ fdl_framing_decision_get_dimensions()

fdl_dimensions_f64_t fdl_framing_decision_get_dimensions ( const fdl_framing_decision_t fd)

Get the framing decision dimensions (floating-point sub-pixel).

Parameters
fdFraming decision handle.
Returns
Framing dimensions.

◆ fdl_framing_decision_get_anchor_point()

fdl_point_f64_t fdl_framing_decision_get_anchor_point ( const fdl_framing_decision_t fd)

Get the anchor point of a framing decision.

Parameters
fdFraming decision handle.
Returns
Anchor point (offset from canvas origin).

◆ fdl_framing_decision_has_protection()

int fdl_framing_decision_has_protection ( const fdl_framing_decision_t fd)

Check if a framing decision has protection area set.

Parameters
fdFraming decision handle.
Returns
FDL_TRUE if protection is present, FDL_FALSE otherwise.

◆ fdl_framing_decision_get_protection_dimensions()

fdl_dimensions_f64_t fdl_framing_decision_get_protection_dimensions ( const fdl_framing_decision_t fd)

Get the protection area dimensions.

Parameters
fdFraming decision handle.
Returns
Protection dimensions. Only valid if fdl_framing_decision_has_protection() returns FDL_TRUE.

◆ fdl_framing_decision_get_protection_anchor_point()

fdl_point_f64_t fdl_framing_decision_get_protection_anchor_point ( const fdl_framing_decision_t fd)

Get the protection anchor point.

Parameters
fdFraming decision handle.
Returns
Protection anchor point. Only valid if fdl_framing_decision_has_protection() returns FDL_TRUE.

◆ fdl_framing_intent_get_label()

const char * fdl_framing_intent_get_label ( const fdl_framing_intent_t fi)

Get the label of a framing intent.

Parameters
fiFraming intent handle.
Returns
Label string. Thread-local pointer.

◆ fdl_framing_intent_get_id()

const char * fdl_framing_intent_get_id ( const fdl_framing_intent_t fi)

Get the ID of a framing intent.

Parameters
fiFraming intent handle.
Returns
ID string. Thread-local pointer.

◆ fdl_framing_intent_get_aspect_ratio()

fdl_dimensions_i64_t fdl_framing_intent_get_aspect_ratio ( const fdl_framing_intent_t fi)

Get the target aspect ratio of a framing intent.

Parameters
fiFraming intent handle.
Returns
Aspect ratio as integer width:height (e.g. {16, 9}).

◆ fdl_framing_intent_get_protection()

double fdl_framing_intent_get_protection ( const fdl_framing_intent_t fi)

Get the protection factor of a framing intent.

Parameters
fiFraming intent handle.
Returns
Protection factor (0.0 = no protection).

◆ fdl_canvas_template_get_label()

const char * fdl_canvas_template_get_label ( const fdl_canvas_template_t ct)

Get the label of a canvas template.

Parameters
ctCanvas template handle.
Returns
Label string. Thread-local pointer.

◆ fdl_canvas_template_get_id()

const char * fdl_canvas_template_get_id ( const fdl_canvas_template_t ct)

Get the ID of a canvas template.

Parameters
ctCanvas template handle.
Returns
ID string. Thread-local pointer.

◆ fdl_canvas_template_get_target_dimensions()

fdl_dimensions_i64_t fdl_canvas_template_get_target_dimensions ( const fdl_canvas_template_t ct)

Get the target dimensions of a canvas template.

Parameters
ctCanvas template handle.
Returns
Target output dimensions in pixels.

◆ fdl_canvas_template_get_target_anamorphic_squeeze()

double fdl_canvas_template_get_target_anamorphic_squeeze ( const fdl_canvas_template_t ct)

Get the target anamorphic squeeze factor.

Parameters
ctCanvas template handle.
Returns
Target squeeze factor (1.0 for non-anamorphic).

◆ fdl_canvas_template_get_fit_source()

fdl_geometry_path_t fdl_canvas_template_get_fit_source ( const fdl_canvas_template_t ct)

Get the fit source — which dimension layer to scale from.

Parameters
ctCanvas template handle.
Returns
Geometry path (canvas, effective, protection, or framing).

◆ fdl_canvas_template_get_fit_method()

fdl_fit_method_t fdl_canvas_template_get_fit_method ( const fdl_canvas_template_t ct)

Get the fit method — how source is scaled into target.

Parameters
ctCanvas template handle.
Returns
Fit method (WIDTH, HEIGHT, FIT_ALL, or FILL).

◆ fdl_canvas_template_get_alignment_method_horizontal()

fdl_halign_t fdl_canvas_template_get_alignment_method_horizontal ( const fdl_canvas_template_t ct)

Get the horizontal alignment method.

Parameters
ctCanvas template handle.
Returns
Horizontal alignment (LEFT, CENTER, or RIGHT).

◆ fdl_canvas_template_get_alignment_method_vertical()

fdl_valign_t fdl_canvas_template_get_alignment_method_vertical ( const fdl_canvas_template_t ct)

Get the vertical alignment method.

Parameters
ctCanvas template handle.
Returns
Vertical alignment (TOP, CENTER, or BOTTOM).

◆ fdl_canvas_template_has_preserve_from_source_canvas()

int fdl_canvas_template_has_preserve_from_source_canvas ( const fdl_canvas_template_t ct)

Check if preserve_from_source_canvas is set.

Parameters
ctCanvas template handle.
Returns
FDL_TRUE if present, FDL_FALSE otherwise.

◆ fdl_canvas_template_get_preserve_from_source_canvas()

fdl_geometry_path_t fdl_canvas_template_get_preserve_from_source_canvas ( const fdl_canvas_template_t ct)

Get the preserve_from_source_canvas geometry path.

Parameters
ctCanvas template handle.
Returns
Geometry path to preserve. Only valid if has_preserve returns FDL_TRUE.

◆ fdl_canvas_template_has_maximum_dimensions()

int fdl_canvas_template_has_maximum_dimensions ( const fdl_canvas_template_t ct)

Check if maximum_dimensions constraint is set.

Parameters
ctCanvas template handle.
Returns
FDL_TRUE if maximum dimensions are set, FDL_FALSE otherwise.

◆ fdl_canvas_template_get_maximum_dimensions()

fdl_dimensions_i64_t fdl_canvas_template_get_maximum_dimensions ( const fdl_canvas_template_t ct)

Get the maximum_dimensions constraint.

Parameters
ctCanvas template handle.
Returns
Maximum dimensions. Only valid if has_maximum_dimensions returns FDL_TRUE.

◆ fdl_canvas_template_get_pad_to_maximum()

int fdl_canvas_template_get_pad_to_maximum ( const fdl_canvas_template_t ct)

Get the pad_to_maximum flag.

Parameters
ctCanvas template handle.
Returns
FDL_TRUE if output should be padded to maximum dimensions, FDL_FALSE otherwise.

◆ fdl_canvas_template_get_round()

fdl_round_strategy_t fdl_canvas_template_get_round ( const fdl_canvas_template_t ct)

Get the rounding strategy.

Parameters
ctCanvas template handle.
Returns
Rounding strategy (even + mode).

◆ fdl_resolve_geometry_layer()

int fdl_resolve_geometry_layer ( const fdl_canvas_t canvas,
const fdl_framing_decision_t framing,
fdl_geometry_path_t  path,
fdl_dimensions_f64_t out_dims,
fdl_point_f64_t out_anchor 
)

Resolve dimensions and anchor directly from canvas/framing handles for a path.

Parameters
canvasCanvas handle.
framingFraming decision handle.
pathGeometry path to resolve.
out_dims[out] Resolved dimensions.
out_anchor[out] Resolved anchor point.
Returns
0 on success, 1 if path is valid but data absent (optional field not set, out_dims/out_anchor zero-initialized), -1 on invalid path.

◆ fdl_make_rect()

fdl_rect_t fdl_make_rect ( double  x,
double  y,
double  width,
double  height 
)

Construct a rect from raw coordinates.

Parameters
xLeft edge x-coordinate.
yTop edge y-coordinate.
widthRectangle width.
heightRectangle height.
Returns
Constructed rect.

◆ fdl_canvas_get_rect()

fdl_rect_t fdl_canvas_get_rect ( const fdl_canvas_t canvas)

Get the full canvas rect: (0, 0, dims.width, dims.height).

Parameters
canvasCanvas handle.
Returns
Canvas rect with origin at (0, 0).

◆ fdl_canvas_get_effective_rect()

int fdl_canvas_get_effective_rect ( const fdl_canvas_t canvas,
fdl_rect_t out_rect 
)

Get the effective (active image) rect of a canvas.

Parameters
canvasCanvas handle.
out_rect[out] Effective rect if present.
Returns
FDL_TRUE if effective dimensions exist and out_rect was written, FDL_FALSE if absent.

◆ fdl_framing_decision_get_rect()

fdl_rect_t fdl_framing_decision_get_rect ( const fdl_framing_decision_t fd)

Get the framing decision rect: (anchor.x, anchor.y, dims.width, dims.height).

Parameters
fdFraming decision handle.
Returns
Framing rect.

◆ fdl_framing_decision_get_protection_rect()

int fdl_framing_decision_get_protection_rect ( const fdl_framing_decision_t fd,
fdl_rect_t out_rect 
)

Get the framing decision protection rect.

Parameters
fdFraming decision handle.
out_rect[out] Protection rect if present.
Returns
FDL_TRUE if protection exists and out_rect was written, FDL_FALSE if absent.

◆ fdl_apply_canvas_template()

fdl_template_result_t fdl_apply_canvas_template ( const fdl_canvas_template_t tmpl,
const fdl_canvas_t source_canvas,
const fdl_framing_decision_t source_framing,
const char *  new_canvas_id,
const char *  new_fd_name,
const char *  source_context_label,
const char *  context_creator 
)

Apply a canvas template to a source canvas/framing.

Runs the full template pipeline: normalize, scale, round, offset, crop. Produces a new FDL document with the transformed canvas and framing decision.

Parameters
tmplCanvas template to apply.
source_canvasSource canvas to transform.
source_framingSource framing decision to transform.
new_canvas_idID for the output canvas (caller provides).
new_fd_nameName/label for the output framing decision.
source_context_labelLabel from source context (for label generation, may be NULL).
context_creatorCreator string for the output context.
Returns
Result with output_fdl on success, error on failure. Caller must free with fdl_template_result_free().

◆ fdl_template_result_free()

void fdl_template_result_free ( fdl_template_result_t result)

Free a template result (doc + all allocated strings).

Safe to call with NULL.

Parameters
resultTemplate result to free.

◆ fdl_context_resolve_canvas_for_dimensions()

fdl_resolve_canvas_result_t fdl_context_resolve_canvas_for_dimensions ( fdl_context_t ctx,
fdl_dimensions_f64_t  input_dims,
fdl_canvas_t canvas,
fdl_framing_decision_t framing 
)

Resolve canvas for given input dimensions.

If input_dims match the canvas dimensions, returns the original canvas/framing with was_resolved=0. If they don't match and the canvas is derived (id != source_canvas_id), searches sibling canvases for one with matching dimensions and a framing decision with the same label.

Parameters
ctxContext containing the canvases to search.
input_dimsInput dimensions to match against.
canvasStarting canvas (may be returned if dimensions match).
framingStarting framing decision (label used for matching).
Returns
Result with resolved canvas/framing on success, error if no match found. Handles in result are non-owning (owned by doc). Error string, if set, must be freed with fdl_free().

< POSIX strdup.

< POSIX strdup.

< POSIX strdup.

◆ fdl_doc_create_with_header()

fdl_doc_t * fdl_doc_create_with_header ( const char *  uuid,
int  version_major,
int  version_minor,
const char *  fdl_creator,
const char *  default_framing_intent 
)

Create a new FDL document with header fields and empty collections.

Parameters
uuidDocument UUID.
version_majorFDL version major number.
version_minorFDL version minor number.
fdl_creatorCreator identifier string.
default_framing_intentDefault framing intent ID, or NULL.
Returns
New document handle. Caller owns — free with fdl_doc_free().

◆ fdl_doc_set_uuid()

void fdl_doc_set_uuid ( fdl_doc_t doc,
const char *  uuid 
)

Set the UUID on a document.

Parameters
docDocument handle.
uuidNew UUID string.

◆ fdl_doc_set_fdl_creator()

void fdl_doc_set_fdl_creator ( fdl_doc_t doc,
const char *  creator 
)

Set the fdl_creator on a document.

Parameters
docDocument handle.
creatorNew creator string.

◆ fdl_doc_set_default_framing_intent()

void fdl_doc_set_default_framing_intent ( fdl_doc_t doc,
const char *  fi_id 
)

Set the default_framing_intent on a document.

Parameters
docDocument handle.
fi_idFraming intent ID, or NULL to clear.

◆ fdl_doc_set_version()

void fdl_doc_set_version ( fdl_doc_t doc,
int  major,
int  minor 
)

Set the FDL version on a document.

Parameters
docDocument handle.
majorVersion major number.
minorVersion minor number.

◆ fdl_doc_add_framing_intent()

fdl_framing_intent_t * fdl_doc_add_framing_intent ( fdl_doc_t doc,
const char *  id,
const char *  label,
int64_t  aspect_w,
int64_t  aspect_h,
double  protection 
)

Add a framing intent to the document.

Parameters
docDocument handle.
idFraming intent ID.
labelDisplay label.
aspect_wAspect ratio width component.
aspect_hAspect ratio height component.
protectionProtection factor (0.0 for no protection).
Returns
Handle to the new framing intent (owned by doc).

◆ fdl_doc_add_context()

fdl_context_t * fdl_doc_add_context ( fdl_doc_t doc,
const char *  label,
const char *  context_creator 
)

Add a context to the document.

Parameters
docDocument handle.
labelContext label.
context_creatorCreator identifier string.
Returns
Handle to the new context (owned by doc).

◆ fdl_context_add_canvas()

fdl_canvas_t * fdl_context_add_canvas ( fdl_context_t ctx,
const char *  id,
const char *  label,
const char *  source_canvas_id,
int64_t  dim_w,
int64_t  dim_h,
double  squeeze 
)

Add a canvas to a context.

Parameters
ctxContext handle.
idCanvas ID.
labelDisplay label.
source_canvas_idSource canvas ID (for derived canvases; equals id for originals).
dim_wCanvas width in pixels.
dim_hCanvas height in pixels.
squeezeAnamorphic squeeze factor (1.0 for non-anamorphic).
Returns
Handle to the new canvas (owned by doc).

◆ fdl_canvas_set_effective_dimensions()

void fdl_canvas_set_effective_dimensions ( fdl_canvas_t canvas,
fdl_dimensions_i64_t  dims,
fdl_point_f64_t  anchor 
)

Set effective dimensions and anchor on a canvas.

Parameters
canvasCanvas handle.
dimsEffective dimensions.
anchorEffective anchor point.

◆ fdl_canvas_set_photosite_dimensions()

void fdl_canvas_set_photosite_dimensions ( fdl_canvas_t canvas,
fdl_dimensions_i64_t  dims 
)

Set photosite dimensions on a canvas.

Parameters
canvasCanvas handle.
dimsPhotosite (sensor) dimensions.

◆ fdl_canvas_set_physical_dimensions()

void fdl_canvas_set_physical_dimensions ( fdl_canvas_t canvas,
fdl_dimensions_f64_t  dims 
)

Set physical dimensions on a canvas.

Parameters
canvasCanvas handle.
dimsPhysical dimensions (e.g. millimeters on sensor).

◆ fdl_canvas_add_framing_decision()

fdl_framing_decision_t * fdl_canvas_add_framing_decision ( fdl_canvas_t canvas,
const char *  id,
const char *  label,
const char *  framing_intent_id,
double  dim_w,
double  dim_h,
double  anchor_x,
double  anchor_y 
)

Add a framing decision to a canvas.

Parameters
canvasCanvas handle.
idFraming decision ID.
labelDisplay label.
framing_intent_idID of the framing intent this decision implements.
dim_wFraming width.
dim_hFraming height.
anchor_xAnchor x-coordinate.
anchor_yAnchor y-coordinate.
Returns
Handle to the new framing decision (owned by doc).

◆ fdl_doc_add_canvas_template()

fdl_canvas_template_t * fdl_doc_add_canvas_template ( fdl_doc_t doc,
const char *  id,
const char *  label,
int64_t  target_w,
int64_t  target_h,
double  target_squeeze,
fdl_geometry_path_t  fit_source,
fdl_fit_method_t  fit_method,
fdl_halign_t  halign,
fdl_valign_t  valign,
fdl_round_strategy_t  rounding 
)

Add a canvas template to the document.

Parameters
docDocument handle.
idCanvas template ID.
labelDisplay label.
target_wTarget width in pixels.
target_hTarget height in pixels.
target_squeezeTarget anamorphic squeeze factor.
fit_sourceGeometry path to scale from.
fit_methodHow source is scaled into target.
halignHorizontal alignment.
valignVertical alignment.
roundingRounding strategy.
Returns
Handle to the new canvas template (owned by doc).

◆ fdl_canvas_template_set_preserve_from_source_canvas()

void fdl_canvas_template_set_preserve_from_source_canvas ( fdl_canvas_template_t ct,
fdl_geometry_path_t  path 
)

Set preserve_from_source_canvas on a canvas template.

Parameters
ctCanvas template handle.
pathGeometry path to preserve from the source canvas.

◆ fdl_canvas_template_set_maximum_dimensions()

void fdl_canvas_template_set_maximum_dimensions ( fdl_canvas_template_t ct,
fdl_dimensions_i64_t  dims 
)

Set maximum_dimensions on a canvas template.

Parameters
ctCanvas template handle.
dimsMaximum allowed output dimensions.

◆ fdl_canvas_template_set_pad_to_maximum()

void fdl_canvas_template_set_pad_to_maximum ( fdl_canvas_template_t ct,
int  pad 
)

Set pad_to_maximum flag on a canvas template.

Parameters
ctCanvas template handle.
padFDL_TRUE to pad output to maximum dimensions, FDL_FALSE otherwise.

◆ fdl_framing_decision_set_protection()

void fdl_framing_decision_set_protection ( fdl_framing_decision_t fd,
fdl_dimensions_f64_t  dims,
fdl_point_f64_t  anchor 
)

Set protection dimensions and anchor on a framing decision.

Parameters
fdFraming decision handle.
dimsProtection dimensions.
anchorProtection anchor point.

◆ fdl_framing_intent_set_aspect_ratio()

void fdl_framing_intent_set_aspect_ratio ( fdl_framing_intent_t fi,
fdl_dimensions_i64_t  dims 
)

Set aspect ratio on a framing intent.

Parameters
fiFraming intent handle.
dimsAspect ratio as integer width:height (e.g. {16, 9}).

◆ fdl_framing_intent_set_protection()

void fdl_framing_intent_set_protection ( fdl_framing_intent_t fi,
double  protection 
)

Set protection factor on a framing intent.

Parameters
fiFraming intent handle.
protectionProtection factor (0.0 for no protection).

◆ fdl_canvas_set_dimensions()

void fdl_canvas_set_dimensions ( fdl_canvas_t canvas,
fdl_dimensions_i64_t  dims 
)

Set dimensions on a canvas.

Parameters
canvasCanvas handle.
dimsNew canvas dimensions.

◆ fdl_canvas_set_anamorphic_squeeze()

void fdl_canvas_set_anamorphic_squeeze ( fdl_canvas_t canvas,
double  squeeze 
)

Set anamorphic squeeze on a canvas.

Parameters
canvasCanvas handle.
squeezeNew anamorphic squeeze factor.

◆ fdl_canvas_set_effective_dims_only()

void fdl_canvas_set_effective_dims_only ( fdl_canvas_t canvas,
fdl_dimensions_i64_t  dims 
)

Set effective dimensions on a canvas.

Creates anchor at {0, 0} if effective anchor is not already set.

Parameters
canvasCanvas handle.
dimsEffective dimensions.

◆ fdl_canvas_remove_effective()

void fdl_canvas_remove_effective ( fdl_canvas_t canvas)

Remove effective dimensions and anchor from a canvas.

Parameters
canvasCanvas handle.

◆ fdl_framing_decision_set_dimensions()

void fdl_framing_decision_set_dimensions ( fdl_framing_decision_t fd,
fdl_dimensions_f64_t  dims 
)

Set dimensions on a framing decision.

Parameters
fdFraming decision handle.
dimsNew framing dimensions.

◆ fdl_framing_decision_set_anchor_point()

void fdl_framing_decision_set_anchor_point ( fdl_framing_decision_t fd,
fdl_point_f64_t  point 
)

Set anchor point on a framing decision.

Parameters
fdFraming decision handle.
pointNew anchor point.

◆ fdl_framing_decision_set_protection_dimensions()

void fdl_framing_decision_set_protection_dimensions ( fdl_framing_decision_t fd,
fdl_dimensions_f64_t  dims 
)

Set protection dimensions on a framing decision (without changing anchor).

Parameters
fdFraming decision handle.
dimsNew protection dimensions.

◆ fdl_framing_decision_set_protection_anchor_point()

void fdl_framing_decision_set_protection_anchor_point ( fdl_framing_decision_t fd,
fdl_point_f64_t  point 
)

Set protection anchor point on a framing decision (without changing dimensions).

Parameters
fdFraming decision handle.
pointNew protection anchor point.

◆ fdl_framing_decision_remove_protection()

void fdl_framing_decision_remove_protection ( fdl_framing_decision_t fd)

Remove protection dimensions and anchor from a framing decision.

Parameters
fdFraming decision handle.

◆ fdl_framing_decision_adjust_anchor()

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.

Parameters
fdFraming decision to modify.
canvasCanvas providing the bounding dimensions.
h_alignHorizontal alignment (LEFT, CENTER, or RIGHT).
v_alignVertical alignment (TOP, CENTER, or BOTTOM).

◆ fdl_framing_decision_adjust_protection_anchor()

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.

Parameters
fdFraming decision to modify.
canvasCanvas providing the bounding dimensions.
h_alignHorizontal alignment.
v_alignVertical alignment.

◆ fdl_framing_decision_populate_from_intent()

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.

Parameters
fdFraming decision to populate.
canvasSource canvas (provides dimensions and squeeze).
intentFraming intent (provides aspect ratio and protection).
roundingRounding strategy for the computed values.

◆ fdl_context_set_clip_id_json()

const char * fdl_context_set_clip_id_json ( fdl_context_t ctx,
const char *  json_str,
size_t  json_len 
)

Set clip_id on a context from a JSON string.

Validates mutual exclusion (file vs sequence) before setting.

Parameters
ctxContext handle.
json_strJSON string representing the clip_id object.
json_lenLength of json_str in bytes.
Returns
NULL on success, or heap-allocated error string on failure. Caller frees error with fdl_free().

< POSIX strdup.

< POSIX strdup.

< POSIX strdup.

◆ fdl_context_remove_clip_id()

void fdl_context_remove_clip_id ( fdl_context_t ctx)

Remove clip_id from a context.

Safe to call if not present.

Parameters
ctxContext handle.

◆ fdl_clip_id_validate_json()

const char * fdl_clip_id_validate_json ( const char *  json_str,
size_t  json_len 
)

Validate clip_id JSON for mutual exclusion (file vs sequence).

Parameters
json_strJSON string to validate.
json_lenLength of json_str in bytes.
Returns
NULL if valid, or heap-allocated error string on failure. Caller frees error with fdl_free().

< POSIX strdup.

< POSIX strdup.

< POSIX strdup.

< POSIX strdup.

◆ fdl_doc_validate()

fdl_validation_result_t * fdl_doc_validate ( const fdl_doc_t doc)

Run schema and semantic validators on the document.

Schema validation (JSON Schema Draft 2020-12) runs first; semantic validators (referential integrity, value range checks) run only if the document is structurally valid.

Parameters
docDocument to validate.
Returns
Validation result handle. Caller owns — free with fdl_validation_result_free().

◆ fdl_validation_result_error_count()

uint32_t fdl_validation_result_error_count ( const fdl_validation_result_t result)

Get the number of validation errors.

Parameters
resultValidation result handle.
Returns
Number of errors (0 means the document is valid).

◆ fdl_validation_result_error_at()

const char * fdl_validation_result_error_at ( const fdl_validation_result_t result,
uint32_t  index 
)

Get a specific error message by index.

Parameters
resultValidation result handle.
indexZero-based error index.
Returns
Error message string, or NULL if index is out of range. Pointer valid until result is freed.

◆ fdl_validation_result_free()

void fdl_validation_result_free ( fdl_validation_result_t result)

Free a validation result.

Safe to call with NULL.

Parameters
resultValidation result to free, or NULL (no-op).

◆ fdl_free()

void fdl_free ( void *  ptr)

Free memory allocated by fdl_core functions.

Use this for strings returned by serialization, error messages, and other heap-allocated values. Safe to call with NULL.

Parameters
ptrPointer to free, or NULL (no-op).

◆ fdl_doc_set_custom_attr_string()

int fdl_doc_set_custom_attr_string ( fdl_doc_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_set_custom_attr_int()

int fdl_doc_set_custom_attr_int ( fdl_doc_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_set_custom_attr_float()

int fdl_doc_set_custom_attr_float ( fdl_doc_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_set_custom_attr_bool()

int fdl_doc_set_custom_attr_bool ( fdl_doc_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_get_custom_attr_string()

const char * fdl_doc_get_custom_attr_string ( const fdl_doc_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_doc_get_custom_attr_int()

int fdl_doc_get_custom_attr_int ( const fdl_doc_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_doc_get_custom_attr_float()

int fdl_doc_get_custom_attr_float ( const fdl_doc_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_doc_get_custom_attr_bool()

int fdl_doc_get_custom_attr_bool ( const fdl_doc_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_doc_has_custom_attr()

int fdl_doc_has_custom_attr ( const fdl_doc_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_doc_get_custom_attr_type()

fdl_custom_attr_type_t fdl_doc_get_custom_attr_type ( const fdl_doc_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_doc_remove_custom_attr()

int fdl_doc_remove_custom_attr ( fdl_doc_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_doc_custom_attr_name_at()

const char * fdl_doc_custom_attr_name_at ( const fdl_doc_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_doc_set_custom_attr_point_f64()

int fdl_doc_set_custom_attr_point_f64 ( fdl_doc_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_get_custom_attr_point_f64()

int fdl_doc_get_custom_attr_point_f64 ( const fdl_doc_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_doc_set_custom_attr_dims_f64()

int fdl_doc_set_custom_attr_dims_f64 ( fdl_doc_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_get_custom_attr_dims_f64()

int fdl_doc_get_custom_attr_dims_f64 ( const fdl_doc_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_doc_set_custom_attr_dims_i64()

int fdl_doc_set_custom_attr_dims_i64 ( fdl_doc_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_doc_get_custom_attr_dims_i64()

int fdl_doc_get_custom_attr_dims_i64 ( const fdl_doc_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_set_custom_attr_string()

int fdl_context_set_custom_attr_string ( fdl_context_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_set_custom_attr_int()

int fdl_context_set_custom_attr_int ( fdl_context_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_set_custom_attr_float()

int fdl_context_set_custom_attr_float ( fdl_context_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_set_custom_attr_bool()

int fdl_context_set_custom_attr_bool ( fdl_context_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_get_custom_attr_string()

const char * fdl_context_get_custom_attr_string ( const fdl_context_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_context_get_custom_attr_int()

int fdl_context_get_custom_attr_int ( const fdl_context_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_get_custom_attr_float()

int fdl_context_get_custom_attr_float ( const fdl_context_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_get_custom_attr_bool()

int fdl_context_get_custom_attr_bool ( const fdl_context_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_has_custom_attr()

int fdl_context_has_custom_attr ( const fdl_context_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_context_get_custom_attr_type()

fdl_custom_attr_type_t fdl_context_get_custom_attr_type ( const fdl_context_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_context_remove_custom_attr()

int fdl_context_remove_custom_attr ( fdl_context_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_context_custom_attr_name_at()

const char * fdl_context_custom_attr_name_at ( const fdl_context_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_context_set_custom_attr_point_f64()

int fdl_context_set_custom_attr_point_f64 ( fdl_context_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_get_custom_attr_point_f64()

int fdl_context_get_custom_attr_point_f64 ( const fdl_context_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_set_custom_attr_dims_f64()

int fdl_context_set_custom_attr_dims_f64 ( fdl_context_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_get_custom_attr_dims_f64()

int fdl_context_get_custom_attr_dims_f64 ( const fdl_context_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_context_set_custom_attr_dims_i64()

int fdl_context_set_custom_attr_dims_i64 ( fdl_context_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_context_get_custom_attr_dims_i64()

int fdl_context_get_custom_attr_dims_i64 ( const fdl_context_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_set_custom_attr_string()

int fdl_canvas_set_custom_attr_string ( fdl_canvas_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_set_custom_attr_int()

int fdl_canvas_set_custom_attr_int ( fdl_canvas_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_set_custom_attr_float()

int fdl_canvas_set_custom_attr_float ( fdl_canvas_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_set_custom_attr_bool()

int fdl_canvas_set_custom_attr_bool ( fdl_canvas_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_get_custom_attr_string()

const char * fdl_canvas_get_custom_attr_string ( const fdl_canvas_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_canvas_get_custom_attr_int()

int fdl_canvas_get_custom_attr_int ( const fdl_canvas_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_get_custom_attr_float()

int fdl_canvas_get_custom_attr_float ( const fdl_canvas_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_get_custom_attr_bool()

int fdl_canvas_get_custom_attr_bool ( const fdl_canvas_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_has_custom_attr()

int fdl_canvas_has_custom_attr ( const fdl_canvas_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_canvas_get_custom_attr_type()

fdl_custom_attr_type_t fdl_canvas_get_custom_attr_type ( const fdl_canvas_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_canvas_remove_custom_attr()

int fdl_canvas_remove_custom_attr ( fdl_canvas_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_canvas_custom_attr_name_at()

const char * fdl_canvas_custom_attr_name_at ( const fdl_canvas_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_canvas_set_custom_attr_point_f64()

int fdl_canvas_set_custom_attr_point_f64 ( fdl_canvas_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_get_custom_attr_point_f64()

int fdl_canvas_get_custom_attr_point_f64 ( const fdl_canvas_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_set_custom_attr_dims_f64()

int fdl_canvas_set_custom_attr_dims_f64 ( fdl_canvas_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_get_custom_attr_dims_f64()

int fdl_canvas_get_custom_attr_dims_f64 ( const fdl_canvas_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_set_custom_attr_dims_i64()

int fdl_canvas_set_custom_attr_dims_i64 ( fdl_canvas_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_get_custom_attr_dims_i64()

int fdl_canvas_get_custom_attr_dims_i64 ( const fdl_canvas_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_set_custom_attr_string()

int fdl_framing_decision_set_custom_attr_string ( fdl_framing_decision_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_set_custom_attr_int()

int fdl_framing_decision_set_custom_attr_int ( fdl_framing_decision_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_set_custom_attr_float()

int fdl_framing_decision_set_custom_attr_float ( fdl_framing_decision_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_set_custom_attr_bool()

int fdl_framing_decision_set_custom_attr_bool ( fdl_framing_decision_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_get_custom_attr_string()

const char * fdl_framing_decision_get_custom_attr_string ( const fdl_framing_decision_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_framing_decision_get_custom_attr_int()

int fdl_framing_decision_get_custom_attr_int ( const fdl_framing_decision_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_get_custom_attr_float()

int fdl_framing_decision_get_custom_attr_float ( const fdl_framing_decision_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_get_custom_attr_bool()

int fdl_framing_decision_get_custom_attr_bool ( const fdl_framing_decision_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_has_custom_attr()

int fdl_framing_decision_has_custom_attr ( const fdl_framing_decision_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_framing_decision_get_custom_attr_type()

fdl_custom_attr_type_t fdl_framing_decision_get_custom_attr_type ( const fdl_framing_decision_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_framing_decision_remove_custom_attr()

int fdl_framing_decision_remove_custom_attr ( fdl_framing_decision_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_framing_decision_custom_attr_name_at()

const char * fdl_framing_decision_custom_attr_name_at ( const fdl_framing_decision_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_framing_decision_set_custom_attr_point_f64()

int fdl_framing_decision_set_custom_attr_point_f64 ( fdl_framing_decision_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_get_custom_attr_point_f64()

int fdl_framing_decision_get_custom_attr_point_f64 ( const fdl_framing_decision_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_set_custom_attr_dims_f64()

int fdl_framing_decision_set_custom_attr_dims_f64 ( fdl_framing_decision_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_get_custom_attr_dims_f64()

int fdl_framing_decision_get_custom_attr_dims_f64 ( const fdl_framing_decision_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_decision_set_custom_attr_dims_i64()

int fdl_framing_decision_set_custom_attr_dims_i64 ( fdl_framing_decision_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_decision_get_custom_attr_dims_i64()

int fdl_framing_decision_get_custom_attr_dims_i64 ( const fdl_framing_decision_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_set_custom_attr_string()

int fdl_framing_intent_set_custom_attr_string ( fdl_framing_intent_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_set_custom_attr_int()

int fdl_framing_intent_set_custom_attr_int ( fdl_framing_intent_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_set_custom_attr_float()

int fdl_framing_intent_set_custom_attr_float ( fdl_framing_intent_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_set_custom_attr_bool()

int fdl_framing_intent_set_custom_attr_bool ( fdl_framing_intent_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_get_custom_attr_string()

const char * fdl_framing_intent_get_custom_attr_string ( const fdl_framing_intent_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_framing_intent_get_custom_attr_int()

int fdl_framing_intent_get_custom_attr_int ( const fdl_framing_intent_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_get_custom_attr_float()

int fdl_framing_intent_get_custom_attr_float ( const fdl_framing_intent_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_get_custom_attr_bool()

int fdl_framing_intent_get_custom_attr_bool ( const fdl_framing_intent_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_has_custom_attr()

int fdl_framing_intent_has_custom_attr ( const fdl_framing_intent_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_framing_intent_get_custom_attr_type()

fdl_custom_attr_type_t fdl_framing_intent_get_custom_attr_type ( const fdl_framing_intent_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_framing_intent_remove_custom_attr()

int fdl_framing_intent_remove_custom_attr ( fdl_framing_intent_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_framing_intent_custom_attr_name_at()

const char * fdl_framing_intent_custom_attr_name_at ( const fdl_framing_intent_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_framing_intent_set_custom_attr_point_f64()

int fdl_framing_intent_set_custom_attr_point_f64 ( fdl_framing_intent_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_get_custom_attr_point_f64()

int fdl_framing_intent_get_custom_attr_point_f64 ( const fdl_framing_intent_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_set_custom_attr_dims_f64()

int fdl_framing_intent_set_custom_attr_dims_f64 ( fdl_framing_intent_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_get_custom_attr_dims_f64()

int fdl_framing_intent_get_custom_attr_dims_f64 ( const fdl_framing_intent_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_framing_intent_set_custom_attr_dims_i64()

int fdl_framing_intent_set_custom_attr_dims_i64 ( fdl_framing_intent_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_framing_intent_get_custom_attr_dims_i64()

int fdl_framing_intent_get_custom_attr_dims_i64 ( const fdl_framing_intent_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_set_custom_attr_string()

int fdl_canvas_template_set_custom_attr_string ( fdl_canvas_template_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_set_custom_attr_int()

int fdl_canvas_template_set_custom_attr_int ( fdl_canvas_template_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_set_custom_attr_float()

int fdl_canvas_template_set_custom_attr_float ( fdl_canvas_template_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_set_custom_attr_bool()

int fdl_canvas_template_set_custom_attr_bool ( fdl_canvas_template_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_get_custom_attr_string()

const char * fdl_canvas_template_get_custom_attr_string ( const fdl_canvas_template_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_canvas_template_get_custom_attr_int()

int fdl_canvas_template_get_custom_attr_int ( const fdl_canvas_template_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_get_custom_attr_float()

int fdl_canvas_template_get_custom_attr_float ( const fdl_canvas_template_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_get_custom_attr_bool()

int fdl_canvas_template_get_custom_attr_bool ( const fdl_canvas_template_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_has_custom_attr()

int fdl_canvas_template_has_custom_attr ( const fdl_canvas_template_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_canvas_template_get_custom_attr_type()

fdl_custom_attr_type_t fdl_canvas_template_get_custom_attr_type ( const fdl_canvas_template_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_canvas_template_remove_custom_attr()

int fdl_canvas_template_remove_custom_attr ( fdl_canvas_template_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_canvas_template_custom_attr_name_at()

const char * fdl_canvas_template_custom_attr_name_at ( const fdl_canvas_template_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_canvas_template_set_custom_attr_point_f64()

int fdl_canvas_template_set_custom_attr_point_f64 ( fdl_canvas_template_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_get_custom_attr_point_f64()

int fdl_canvas_template_get_custom_attr_point_f64 ( const fdl_canvas_template_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_set_custom_attr_dims_f64()

int fdl_canvas_template_set_custom_attr_dims_f64 ( fdl_canvas_template_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_get_custom_attr_dims_f64()

int fdl_canvas_template_get_custom_attr_dims_f64 ( const fdl_canvas_template_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_canvas_template_set_custom_attr_dims_i64()

int fdl_canvas_template_set_custom_attr_dims_i64 ( fdl_canvas_template_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_canvas_template_get_custom_attr_dims_i64()

int fdl_canvas_template_get_custom_attr_dims_i64 ( const fdl_canvas_template_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_set_custom_attr_string()

int fdl_clip_id_set_custom_attr_string ( fdl_clip_id_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_set_custom_attr_int()

int fdl_clip_id_set_custom_attr_int ( fdl_clip_id_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_set_custom_attr_float()

int fdl_clip_id_set_custom_attr_float ( fdl_clip_id_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_set_custom_attr_bool()

int fdl_clip_id_set_custom_attr_bool ( fdl_clip_id_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_get_custom_attr_string()

const char * fdl_clip_id_get_custom_attr_string ( const fdl_clip_id_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_clip_id_get_custom_attr_int()

int fdl_clip_id_get_custom_attr_int ( const fdl_clip_id_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_get_custom_attr_float()

int fdl_clip_id_get_custom_attr_float ( const fdl_clip_id_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_get_custom_attr_bool()

int fdl_clip_id_get_custom_attr_bool ( const fdl_clip_id_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_has_custom_attr()

int fdl_clip_id_has_custom_attr ( const fdl_clip_id_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_clip_id_get_custom_attr_type()

fdl_custom_attr_type_t fdl_clip_id_get_custom_attr_type ( const fdl_clip_id_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_clip_id_remove_custom_attr()

int fdl_clip_id_remove_custom_attr ( fdl_clip_id_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_clip_id_custom_attr_name_at()

const char * fdl_clip_id_custom_attr_name_at ( const fdl_clip_id_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_clip_id_set_custom_attr_point_f64()

int fdl_clip_id_set_custom_attr_point_f64 ( fdl_clip_id_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_get_custom_attr_point_f64()

int fdl_clip_id_get_custom_attr_point_f64 ( const fdl_clip_id_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_set_custom_attr_dims_f64()

int fdl_clip_id_set_custom_attr_dims_f64 ( fdl_clip_id_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_get_custom_attr_dims_f64()

int fdl_clip_id_get_custom_attr_dims_f64 ( const fdl_clip_id_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_clip_id_set_custom_attr_dims_i64()

int fdl_clip_id_set_custom_attr_dims_i64 ( fdl_clip_id_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_clip_id_get_custom_attr_dims_i64()

int fdl_clip_id_get_custom_attr_dims_i64 ( const fdl_clip_id_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_set_custom_attr_string()

int fdl_file_sequence_set_custom_attr_string ( fdl_file_sequence_t h,
const char *  name,
const char *  value 
)

Set a string custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_set_custom_attr_int()

int fdl_file_sequence_set_custom_attr_int ( fdl_file_sequence_t h,
const char *  name,
int64_t  value 
)

Set an integer custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_set_custom_attr_float()

int fdl_file_sequence_set_custom_attr_float ( fdl_file_sequence_t h,
const char *  name,
double  value 
)

Set a float custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_set_custom_attr_bool()

int fdl_file_sequence_set_custom_attr_bool ( fdl_file_sequence_t h,
const char *  name,
int  value 
)

Set a boolean custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_get_custom_attr_string()

const char * fdl_file_sequence_get_custom_attr_string ( const fdl_file_sequence_t h,
const char *  name 
)

Get a string custom attribute.

Returns
Thread-local pointer, or NULL.

◆ fdl_file_sequence_get_custom_attr_int()

int fdl_file_sequence_get_custom_attr_int ( const fdl_file_sequence_t h,
const char *  name,
int64_t *  out 
)

Get an integer custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_get_custom_attr_float()

int fdl_file_sequence_get_custom_attr_float ( const fdl_file_sequence_t h,
const char *  name,
double *  out 
)

Get a float custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_get_custom_attr_bool()

int fdl_file_sequence_get_custom_attr_bool ( const fdl_file_sequence_t h,
const char *  name,
int *  out 
)

Get a boolean custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_has_custom_attr()

int fdl_file_sequence_has_custom_attr ( const fdl_file_sequence_t h,
const char *  name 
)

Check if a custom attribute exists.

Returns
FDL_TRUE or FDL_FALSE.

◆ fdl_file_sequence_get_custom_attr_type()

fdl_custom_attr_type_t fdl_file_sequence_get_custom_attr_type ( const fdl_file_sequence_t h,
const char *  name 
)

Get the type of a custom attribute.

Returns
FDL_CUSTOM_ATTR_TYPE_* constant.

◆ fdl_file_sequence_remove_custom_attr()

int fdl_file_sequence_remove_custom_attr ( fdl_file_sequence_t h,
const char *  name 
)

Remove a custom attribute.

Returns
0 if removed, -1 if not found.

◆ fdl_file_sequence_custom_attr_name_at()

const char * fdl_file_sequence_custom_attr_name_at ( const fdl_file_sequence_t h,
uint32_t  index 
)

Get name of custom attribute at index (without '_' prefix).

Returns
Thread-local pointer, or NULL.

◆ fdl_file_sequence_set_custom_attr_point_f64()

int fdl_file_sequence_set_custom_attr_point_f64 ( fdl_file_sequence_t h,
const char *  name,
fdl_point_f64_t  value 
)

Set a point_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_get_custom_attr_point_f64()

int fdl_file_sequence_get_custom_attr_point_f64 ( const fdl_file_sequence_t h,
const char *  name,
fdl_point_f64_t out 
)

Get a point_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_set_custom_attr_dims_f64()

int fdl_file_sequence_set_custom_attr_dims_f64 ( fdl_file_sequence_t h,
const char *  name,
fdl_dimensions_f64_t  value 
)

Set a dims_f64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_get_custom_attr_dims_f64()

int fdl_file_sequence_get_custom_attr_dims_f64 ( const fdl_file_sequence_t h,
const char *  name,
fdl_dimensions_f64_t out 
)

Get a dims_f64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.

◆ fdl_file_sequence_set_custom_attr_dims_i64()

int fdl_file_sequence_set_custom_attr_dims_i64 ( fdl_file_sequence_t h,
const char *  name,
fdl_dimensions_i64_t  value 
)

Set a dims_i64 custom attribute.

Returns
0 on success, -1 on type mismatch.

◆ fdl_file_sequence_get_custom_attr_dims_i64()

int fdl_file_sequence_get_custom_attr_dims_i64 ( const fdl_file_sequence_t h,
const char *  name,
fdl_dimensions_i64_t out 
)

Get a dims_i64 custom attribute.

Returns
0 on success, -1 if absent/wrong type.