|
FDL Core Library
ASC Framing Decision List — C/C++ Reference Implementation
|
Internal pipeline helper functions for template application. More...
#include "fdl/fdl_core.h"Go to the source code of this file.
Functions | |
| double | fdl::detail::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::detail::output_size_for_axis (double canvas_size, double max_size, bool has_max, bool pad_to_max) |
| Determine output canvas size for a single axis. | |
| double | fdl::detail::alignment_shift (double fit_size, double fit_anchor, double output_size, double canvas_size, double target_size, bool is_center, double align_factor, bool pad_to_max) |
| Calculate content translation shift for a single axis. | |
| fdl_dimensions_f64_t | fdl::detail::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. | |
Internal pipeline helper functions for template application.
Scale factor calculation, output sizing, alignment shift, and dimension clamping — the building blocks of the canvas template application pipeline.
| double fdl::detail::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.
| fit_norm | Normalized fit-source dimensions. |
| target_norm | Normalized target dimensions. |
| fit_method | Fit method (width, height, fill, fit_all). |
| double fdl::detail::output_size_for_axis | ( | double | canvas_size, |
| double | max_size, | ||
| bool | has_max, | ||
| bool | pad_to_max | ||
| ) |
Determine output canvas size for a single axis.
| canvas_size | Scaled canvas size along this axis. |
| max_size | Maximum allowed size (from target dimensions). |
| has_max | Whether a maximum constraint exists. |
| pad_to_max | Whether to pad to maximum size. |
| double fdl::detail::alignment_shift | ( | double | fit_size, |
| double | fit_anchor, | ||
| double | output_size, | ||
| double | canvas_size, | ||
| double | target_size, | ||
| bool | is_center, | ||
| double | align_factor, | ||
| bool | pad_to_max | ||
| ) |
Calculate content translation shift for a single axis.
| fit_size | Fit-source size along this axis. |
| fit_anchor | Fit-source anchor along this axis. |
| output_size | Output canvas size along this axis. |
| canvas_size | Scaled canvas size along this axis. |
| target_size | Target size along this axis. |
| is_center | Whether alignment is centered. |
| align_factor | Alignment factor (0.0 = start, 0.5 = center, 1.0 = end). |
| pad_to_max | Whether padding is applied. |
| fdl_dimensions_f64_t fdl::detail::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.
| dims | Input dimensions. |
| clamp_dims | Maximum allowed dimensions. |
| out_delta | [out] Reduction applied to each axis (dims - result). |