* src/sdf/ftsdfrend.h (SDF_Renderer_Module): Removed the
expermental `optimization' property.
Added another property `overlaps', which can be used to
turn on the overlap support.
* src/sdf/ftsdf.h (SDF_Raster_Params): Ditto as above.
* src/sdf/ftsdfrend.c (*): Added functionality to set
and get the new `overlaps' property.
* src/sdf/ftsdf.c (sdf_raster_render):
Removed support for all the optimization modes and
only keep the subdivision optimization and the new
overlap support function.
* src/sdf/ftsdf.c (sdf_generate_coarse_grid): Turned
off until we can find a way to make it faster.
* src/sdf/ftsdf.c (sdf_generate_with_overlaps): Added
a function to generate SDF for shapes with overlapping
contours. It basically generate SDF for separate contours
in seperate bitmaps and then combine them to remove
overlaps.
* src/sdf/ftsdfcommon.h: Added new file which contains
common function, macros, properties for both `sdf' and
`bsdf' renderer.
* src/sdf/ftsdf.c, src/sdf/ftsdf.h, src/sdf/ftbsdf.c:
Remove common properties and include `ftsdfcommon.h'.
* src/sdf/rules.mk (SDF_DRV_H): Add the new `ftsdfcommon.h'
file to include list.
* src/base/ftobjs.c (FT_Render_Glyph_Internal): Remove
the bitmap check which prevent calling renderers
if the glyph is already a bitmap. The `bsdf' renderer
requires a bitmap for conversion.
* src/base/ftobjs.c (ft_add_renderer): Remove the glyph
format check which ensures that the glyph format for
a renderer is `FT_GLYPH_FORMAT_OUTLINE', again the `bsdf'
renderer has `FT_GLYPH_FORMAT_BITMAP' as a glyph format,
so we need to remove the condition to initialize the
renderer properly.
* src/sdf/ftbsdf.c (*): Added a rasterizer for the
`bsdf' renderer and created necessary functions.
* src/sdf/ftbsdf.h: Add forward declaration of the
rasterizer.
* src/sdf/ftsdfrend.c (ft_bitmap_sdf_renderer_class):
Define the new `bsdf' rendere and add the
`FT_Renderer_RenderFunc' function, the rest is
same as the `sdf' renderer.
* src/sdf/ftsdfrend.h: Add forward declaration of the
renderer.
* src/sdf/rules.mk (SDF_DRV_SRC): Add the new `ftbsdf.c'
file to the compile list.
* src/sdf/sdf.c: Inclue the `ftbsdf.c' file if making
single object.
* src/sdfb/rules.mk (SDFB_DRV_H): Fix name of
the module specific error file `ftsdfberrs.h'.
* src/sdf/ftsdf.h (Optimizations): Fix warning.
`warning: comma at end of enumerator list [-Wpedantic]'
* src/sdf/ftsdf.c (sdf_generate_coarse_grid): Remove
unused variable `cindex', causes warning.
`warning: unused variable 'cindex' [-Wunused-variable]'
Added new property to dynamically change the
optimization to be used to generate the SDF.
This can be used to compare the performance of
different optimization techniques without going
and recompiling the program.
And will also be used in the demo to check the
performance.
Added two properties:
- `flip_y': To flip the generated SDF along the y axis.
- `flip_sign': By default outside is treated to have
negative sign, setting `flip_sign' to 1 the outside
pixels will have positive sign.
* src/sdf/ftsdf.* (*): Use the newly added properties.
* src/sdf/ftsdfrend.* (*): Add the newly added properties,
and add functionality to set them using `FT_Property_Set'.