|
b6e8a712
|
2021-01-17T07:18:48
|
|
Update all copyright notices.
|
|
c6ff2556
|
2020-12-26T10:50:21
|
|
[sdf] Use 'counter-clockwise', not 'anti-clockwise'.
We prefer US nomenclature.
* src/sdf/ftsdf.c (SDF_Contour_Orientation):
s/SDF_ORIENTATION-ACW/SDF_ORIENTATION_CCW/.
Update all users.
|
|
10a5dfec
|
2020-12-26T08:34:38
|
|
[sdf] Remove custom memory tracker.
The internal FreeType memory tracker is sufficient.
* src/sdf/ftsdf.c (FT_DEBUG_INNER, FT_ASSIGNP_INNER, SDF_MemoryUser,
sdf_alloc, sdf_free, SDF_ALLOC, SDF_FREE,
SDF_MEMORY_TRACKER_DECLARE, SDF_MEMORY_TRACKER_SETUP,
SDF_MEMORY_TRACKER_DONE): Removed.
s/SDF_ALLOC/FT_ALLOC/.
s/SDF_FREE/FT_FREE/.
Other updates.
|
|
3c983eb8
|
2020-12-24T08:36:09
|
|
[sdf] Fix `make multi`.
* src/sdf/ftsdf.c: Include `ftoutln.h`.
|
|
aa1b5362
|
2020-12-24T08:32:04
|
|
[sdf] Fix tracing.
* include/freetype/internal.fttrace.h: Add 'bsdf' component.
* src/sdf/ftbsdf.c, src/sdf/ftsdf.c (FT_COMPONENT): Define.
|
|
04a64432
|
2020-12-24T08:29:05
|
|
[sdf] Add copyright notices.
|
|
b298a644
|
2020-08-21T04:59:08
|
|
[sdf] Add debugging function.
* src/sdf/ftsdf.c (sdf_shape_dump): New function.
|
|
6444875f
|
2020-08-21T03:59:23
|
|
[sdf] Add brief technical overview of both rasterizers.
|
|
05f6088d
|
2020-08-20T07:54:13
|
|
[sdf] Added basic overlapping contour support.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps): New function.
(sdf_raster_render): Enable it.
|
|
665ac967
|
2020-08-19T16:29:51
|
|
[sdf] Add interface functions for the 'sdf' rasterizer.
* src/sdf/ftsdf.c (sdf_raster_new, sdf_raster_reset,
sdf_raster_set_mode, sdf_raster_render, sdf_raster_done): New
functions.
(ft_sdf_raster): New structure.
|
|
1010f2c3
|
2020-08-19T16:25:08
|
|
[sdf] Add subdivision and bounding box optimization.
* src/sdf/ftsdf.c (sdf_generate_bounding_box): New function, which
is an optimized version of `sdf_generate`.
(sdf_generate_subdivision): New function.
|
|
986d3108
|
2020-08-19T12:56:58
|
|
[sdf] Add function to generate SDF.
* src/sdf/ftsdf.c (sdf_generate): New function, currently disabled.
This is a proof-of-concept implementation: It doesn't use any
optimization, it simply checks all grid points against all contours.
|
|
0d52f4ae
|
2020-08-19T12:22:34
|
|
[sdf] Add functions to get shortest distance from any edge/contour.
* src/sdf/ftsdf.c (sdf_edge_get_min_distance): New function.
(sdf_contour_get_min_distance): New function, currently disabled.
|
|
81e32986
|
2020-08-18T17:49:56
|
|
[sdf] Add shortest distance finding functions.
* src/sdf/ftsdf.c (get_min_distance_line, get_min_distance_conic,
get_min_distance_cubic): New functions. Note that
`get_min_distance_conic` comes with two implementations (using an
analytical and an iterative method, to be controlled with the
`USE_NEWTON_FOR_CONIC` macro).
|
|
c918b54f
|
2020-08-18T10:28:16
|
|
[sdf] Add function to resolve corner distances.
* src/sdf/ftsdf.c (resolve_corner): New function.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|