2020-06-30 15:06:17 +02:00
|
|
|
2020-06-30 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added functions to solve polynomial equations.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (solve_quadratic_equation,
|
|
|
|
solve_cubic_equation): Added functions to solve
|
|
|
|
quadratic and cubic equations. These will be used for
|
|
|
|
conic bezier curves only.
|
|
|
|
|
2020-06-30 13:55:51 +02:00
|
|
|
2020-06-30 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (square_root, cube_root, arc_cos):
|
|
|
|
Use FT_16D16 instead of FT_Fixed to avoid confusion.
|
|
|
|
|
2020-06-30 13:50:38 +02:00
|
|
|
2020-06-30 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (cube_root, arc_cos): Added a few
|
|
|
|
essential math functions.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-30 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Fixed compilation under gnumake.
|
|
|
|
|
|
|
|
* src/sdf/rules.mk (DRV_OBJ_ => DRV_OBJS_): Fixed varialbe
|
|
|
|
name so that the sdf can compile.
|
|
|
|
|
|
|
|
* src/sdf/module.mk: Fixed spacing.
|
|
|
|
|
|
|
|
* src/sdf/*.c: Fixed all compiler warnings.
|
|
|
|
|
|
|
|
* [GSoC]ChangLog: Fixed dates.
|
|
|
|
|
|
|
|
2020-06-29 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-29 13:24:32 +02:00
|
|
|
|
|
|
|
[sdf] Added function to resolve corners in case of
|
|
|
|
ambiguity.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (resolve_corner): Added function
|
|
|
|
to determine the correct sign in case there are
|
|
|
|
two sign for the same shortest distance (happens
|
|
|
|
around corners).
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c: Typo neartest_point -> nearest_point.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-29 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-29 08:19:47 +02:00
|
|
|
|
|
|
|
[sdf] The module can now generate signed distance
|
|
|
|
fields for outline with only lines.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (get_min_distance_line): Calculation
|
|
|
|
mistake.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (square_root): Added function to calculate
|
|
|
|
square root of a 16.16 fixed point integer.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_generate): Assign values to the output
|
|
|
|
bitmap, currently the output is 6.10 fixed point which can
|
|
|
|
contain values from [-32, 32]. Also fixed a bug which was
|
|
|
|
causing upside down images.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Fixed alignment issues.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-28 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-28 15:35:09 +02:00
|
|
|
|
|
|
|
[sdf] Added function to find shortest distance from
|
|
|
|
a point to a line.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (get_min_distance_line): The function
|
|
|
|
calculate the shortest signed distance from a point
|
|
|
|
to a line segment.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_contour_get_min_distance): Typo.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Signed_Distance): Use squared
|
|
|
|
distance instead of actual distance for performance.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-28 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-28 13:32:28 +02:00
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Iterator_IO): Removed.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_edge_iterator_func => sdf_edge_get_min_distance
|
|
|
|
sdf_contour_iterator_func => sdf_contour_get_min_distance): Renamed.
|
|
|
|
Manually iterate through the lists instead of `FT_List_Iterate' to
|
|
|
|
avoid io structs and looks a bit cleaner.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-28 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-28 06:40:15 +02:00
|
|
|
|
|
|
|
[sdf] Added basic outline of the functions required to
|
|
|
|
generate sdf.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Signed_Distance): Added struct which
|
|
|
|
represent a complete signed distance and can be used to
|
|
|
|
get cross, dot, sign etc.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Iterator_IO): This struct will be used
|
|
|
|
while `FT_List_Iterate'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_generate): Added function which genearte
|
|
|
|
SDF from `SDF_Shape'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_edge_iterator_func,
|
|
|
|
sdf_contour_iterator_func): Added funcions
|
|
|
|
which iterate through contours and edges and return the shortest
|
|
|
|
distance.
|
|
|
|
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-27 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-27 10:43:05 +02:00
|
|
|
|
|
|
|
[sdf] Added `SDF_Raster_Params' struct which extends
|
|
|
|
`FT_Raster_Params' and has a few extra fields. This is done
|
|
|
|
to pass extra data to the sdf rasterzier which is required
|
|
|
|
while rastersizing.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.h (SDF_Raster_Params): Added a struct which
|
|
|
|
extends `FT_Raster_Params' and has the `spread' parameter.
|
|
|
|
Also moved the max, min and default spread values to this
|
|
|
|
header file.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_raster_render): Added parameter and
|
|
|
|
attribute checking in order to pick errors and return
|
|
|
|
early.
|
|
|
|
|
|
|
|
* src//sdf/ftsdfrend.c (ft_sdf_render): Setup the `SDF_Raster_Params'
|
|
|
|
and pass it to the rasterizer instead of `FT_Raster_Params'.
|
|
|
|
|
2020-06-30 13:37:41 +02:00
|
|
|
2020-06-27 Anuj Verma <anujv@iitbhilai.ac.in>
|
2020-06-27 05:20:39 +02:00
|
|
|
|
|
|
|
* include/freetype/ftimage.h (FT_RASTER_FLAG_): Added
|
|
|
|
a new raster flag `FT_RASTER_FLAG_SDF'. The `ftsdf'
|
|
|
|
rasterizer will only render if this flag is set.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Set the `flags' field
|
|
|
|
of `FT_Raster_Params' to `FT_RASTER_FLAG_SDF'.
|
|
|
|
|
2020-06-26 08:04:41 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_shape_dump): Use `FT_TRACEX'
|
|
|
|
instead of `printf'.
|
|
|
|
|
2020-06-26 06:37:16 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_shape_dump): Added function to
|
|
|
|
dump the `SDF_Shape' on the console for debugging.
|
|
|
|
|
2020-06-26 05:53:49 +02:00
|
|
|
2020-06-26 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added functions to de-allocate `SDF_' structs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Contour, SDF_Shape): Use `FT_ListRec'
|
|
|
|
instead of `FT_List' to avoid a few extra allocations.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Edge, SDF_Contour, SDF_Shape): Added
|
2020-06-26 06:37:16 +02:00
|
|
|
functions to de-allocate these structs and their members.
|
2020-06-26 05:53:49 +02:00
|
|
|
|
|
|
|
* src/sdf/ftsdfrenc.c: Typo.
|
|
|
|
|
2020-06-25 13:31:21 +02:00
|
|
|
2020-06-25 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Decompose outline and store it in a temporary
|
|
|
|
`SDF_Shape' object for easy iteration and pre-computing
|
|
|
|
some variables.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_outline_decompose): Added function
|
|
|
|
to decompost outline and store it in a `SDF_Shape' object.
|
|
|
|
This allows us to pre-compute some variable.
|
|
|
|
|
2020-06-25 06:51:59 +02:00
|
|
|
2020-06-25 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added essential enums and structs required.
|
|
|
|
|
|
|
|
* src/freetype/internal/fttrace.h: Remove tabs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Calculate padding
|
|
|
|
using the `spread'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (SDF_Edge_Type, SDF_Edge, SDF_Contour,
|
|
|
|
SDF_Shape): Added structures and their initializer
|
|
|
|
functions.
|
|
|
|
|
2020-06-23 07:52:10 +02:00
|
|
|
2020-06-23 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added functionality to set and get module properties.
|
|
|
|
Also added a `spread' property.
|
|
|
|
|
|
|
|
* src/freetype/internal/fttrace.h: Added sdf module trace
|
|
|
|
define.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_TRaster => SDF_TRaster): Use capital
|
|
|
|
character for structs.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.h (SDF_Renderer_Module): Added a struct
|
|
|
|
which extends the `FT_RendererRec' and added the `spread'
|
|
|
|
property.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c: Synchronized the code to use the new
|
|
|
|
`SDF_Renderer_Module' and added functions to get/set the
|
|
|
|
properties.
|
|
|
|
|
|
|
|
|
2020-06-20 07:00:39 +02:00
|
|
|
2020-06-20 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Implemented a few functions required by a renderer
|
|
|
|
module.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (sdf_TRaster_): Added new structure to hold
|
|
|
|
the memory allocator `FT_Memory'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdf.c (ft_sdf_raster): Implemented a few essential
|
|
|
|
functions required by `FT_Raster'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_renderer_class): Implemented a few
|
|
|
|
essential functions required by `FT_Renderer'.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.c (ft_sdf_render): Added functionality to
|
|
|
|
compute shift and padding before rendering the outline.
|
|
|
|
|
2020-06-19 13:20:24 +02:00
|
|
|
2020-06-19 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* include/freetype/ftimage.h (FT_Render_Mode_): Added new
|
|
|
|
pixel mode `FT_PIXEL_MODE_GRAY16' which will be used
|
|
|
|
to represent signed values while rendering to SDF bitmap.
|
|
|
|
|
2020-06-19 05:56:41 +02:00
|
|
|
2020-06-19 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
* include/freetype/freetype.h (FT_Render_Mode_): Added new
|
|
|
|
rendermode `FT_RENDER_MODE_SDF' which will be used by the
|
|
|
|
`sdf' module to generate signed distance fields from glyph's
|
|
|
|
outline.
|
|
|
|
|
|
|
|
* src/sdf/ftsdfrend.h, src/sdf/module.mk, src/sdf/rules.mk:
|
|
|
|
Add a new line at the end of files.
|
|
|
|
|
2020-06-18 06:46:40 +02:00
|
|
|
2020-06-18 Anuj Verma <anujv@iitbhilai.ac.in>
|
|
|
|
|
|
|
|
[sdf] Added the structure of a new module to render
|
2020-06-18 06:54:13 +02:00
|
|
|
signed distance fields.
|
2020-06-18 06:46:40 +02:00
|
|
|
|
|
|
|
* src/sdf/sdf.c, src/sdf/ftsdfrend.c, src/sdf/ftsdf.c,
|
|
|
|
src/sdf/ftsdfrend.h, src/sdf/ftsdf.h, src/sdf/ftsdferrs.h:
|
|
|
|
Added files required by the `sdf' renderer module and added
|
|
|
|
the basic structure and functions required.
|
|
|
|
|
|
|
|
* src/sdf/rules.mk, src/sdf/module.mk: Added files required to
|
|
|
|
build the `sdf' module using the default build system.
|
|
|
|
|
2020-06-20 07:00:39 +02:00
|
|
|
* CMakeLists.txt (BASE_SRCS): Add `src/sdf/sdf.c' to the variable.
|
2020-06-18 06:46:40 +02:00
|
|
|
|
|
|
|
* include/freetype/config/ftmodule.h: Added `sdf' module
|
2020-06-18 06:54:13 +02:00
|
|
|
declaration so that the module can be compiled when not compiling
|
2020-06-18 06:46:40 +02:00
|
|
|
with GNU make.
|
|
|
|
|
|
|
|
* modules.cfg (RASTER_MODULES): Include `sdf' module to the default
|
|
|
|
rasterizer module list.
|
|
|
|
|
2020-06-18 06:54:13 +02:00
|
|
|
* include/freetype/ftmoderr.h: sdf module error define
|