src/sdf


Log

Author Commit Date CI Message
Anuj Verma c918b54f 2020-08-18T10:28:16 [sdf] Add function to resolve corner distances. * src/sdf/ftsdf.c (resolve_corner): New function.
Anuj Verma a255125f 2020-08-18T10:17:46 [sdf] Add essential math functions. * src/sdf/ftsdf.c (cube_root, arc_cos) [!USE_NEWTON_FOR_CONIC]: New auxiliary functions. * src/sdf/ftsdf.c (solve_quadratic_equation, solve_cubic_equation) [!USE_NEWTON_FOR_CONIC]: New functions.
Anuj Verma 2de1b563 2020-08-17T16:36:30 [sdf] Add functions to decompose `FT_Outline`. * src/sdf/ftsdf.c (sdf_move_to, sdf_line_to, sdf_conic_to, sdf_cubic_to): New auxiliary decomposition functions. (sdf_compose_funcs): New structure. (sdf_outline_decompose): New function.
Anuj Verma 21627032 2020-08-17T11:40:57 [sdf] Add common elements for 'sdf' and 'bsdf' renderers. * src/sdf/ftsdfrend.h (SDF_Rendere_Module, ft_sdf_renderer_class, ft_bitmap_sdf_renderer_class): New structures. * src/sdf/ftsdfcommon.h (DEFAULT_SPREAD, MIN_SPREAD_MAX_SPREAD, USE_SQUARED_DISTANCES): New macros. (FT_INT_26D6, FT_INT_16D16, FT_26D6_16D16): New macros. (FT_CALL, VECTOR_LENGTH_16D16): New macros. (FT_26D6_Vec, FT_16D16_Vec, FT_16D16, FT_26D6, FT_6D10, FT_CBox): New typedefs. (square_root): New macro. * src/sdf/ftsdferrs.h: Add module error setup.
Anuj Verma cd6ff28a 2020-08-16T17:09:22 [sdf] Add files for new 'sdf' module. Here is a breakdown of what the files will contain. * src/sdf/ftsdfrend.c, src/sdf/ftsdfrend.h: The 'sdf' and 'bsdf' renderers. * src/sdf/ftsdf.c, src/sdf/ftsdf.h: The rasterizer for the 'sdf' renderer. * src/sdf/ftbsdf.c, src/sdf/ftbsdf.h: The rasterizer for the 'bsdf' renderer. * src/sdf/ftsdfcommon.h: Commmon properties and functions for both rasterizers. * src/sdf/ftsdferrs.h: Common error defines. * src/sdf/sdf.c: For building a single object of the entire module.
Anuj Verma cf0464d8 2020-08-17T16:24:39 [sdf] Structs, enums, macros, and functions for 'sdf' rasterizer. * src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New macros. (SDF_MemoryUser) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New struct for memory usage tracing. (sdf_alloc, sdf_free) [FT_DEBUG_LEVEL_TRACE && FT_DEBUG_MEMORY]: New functions for memory usage tracing. (SDF_ALLOC, SDF_FREE): New macros for memory management. (SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP, SDF_MEMORY_TRACKER_DONE): New macros to set up memory usage tracing. (USE_NEWTON_FOR_CONIC, MAX_NEWTON_DIVISIONS, MAX_NEWTON_STEPS, CORNER_CHECK_EPSILON, CG_DIMEN): New configuration macros for controlling the process of finding the shortest distance. (MUL_26D6, VEC_26D6_DOT): New auxiliary macros. (SDF_TRaster, SDF_Edge, SDF_Contour, SDF_Shape, SDF_Signed_Distance, SDF_Params): New structs for setting up SDF data. (SDF_Edge_Type, SDF_Contour_Orientation): New enums for SDF data. (zero_vector, null_edge, null_contour, null_shape, max_sdf): Useful constants. (sdf_edge_new, sdf_edge_done, sdf_contour_new, sdf_contour_done, sdf_shape_new, sdf_shape_done): New constructors and destructors.
Anuj Verma cd413845 2020-08-18T10:14:20 [sdf] Add utility functions for contours. * src/sdf/ftsdf.c (get_control_box, get_contour_orientation): New functions. (split_conic, split_cubic, split_sdf_conic, split_sdf_cubic, split_sdf_shape): New functions.
Anuj Verma c6ec87ec 2020-08-17T16:11:56 [sdf] Add raster parameters structure. * src/sdf/ftsdf.h (SDF_Raster_Params): New structure. * src/sdf/sdf.c: Include source files in order to make a single object of the module.
Anuj Verma 56d27d32 2020-08-17T11:47:26 [sdf] Add 'sdf' renderer. * src/sdf/ftsdf.c: Add 'sdf' renderer along with its interface functions. Also add functions to set and get properties.