summaryrefslogtreecommitdiffstats
path: root/libass/ass_drawing.h
Commit message (Collapse)AuthorAgeFilesLines
* drawing: extract transformation from parsingDr.Smile2019-05-191-19/+2
|
* drawing: separate drawing text reading from outline constructionDr.Smile2019-05-191-4/+1
| | | | Purpose of this commit is to simplify logic behind drawing handling.
* Eliminate advance.y from drawings and glyphsDr.Smile2019-05-191-1/+1
| | | | | Drawings always have advance.y = 0 and FreeType guarantees that for horizontal writing.
* drawing: remove unnecessary fields from ASS_Drawing structDr.Smile2019-05-191-3/+0
|
* Replace FreeType types with libass native typesDr.Smile2017-09-171-16/+13
| | | | | | FT_Vector and FT_BBox types are based on FT_Pos, which is alias of long. FreeType treats it as 32-bit integer, but on some platforms long can be 64-bit. That leads to wasted memory and suboptimal performance.
* cosmetic: extract most of the outline-related functions into separate fileDr.Smile2017-07-311-0/+1
|
* drawing: remove unused fieldwm42015-10-141-1/+0
|
* Replace FT_Outline with ASS_OutlineDr.Smile2014-11-231-4/+3
|
* Simplify drawing text assignmentOleg Oshmyan2014-06-061-6/+1
|
* Introduce ass_drawing_add_chars for adding a whole string at onceOleg Oshmyan2014-06-061-0/+1
|
* Use bare outlines for drawingsGrigori Goronzy2011-06-201-7/+5
| | | | | | | This finally gets rid of the nasty hack that manipulated a glyph we somehow got from FreeType. Simplifies drawing handling a bit and decouples drawing code from all font handling and related (fontconfig, etc.) code.
* Fix drawing leakage: delay glyph allocationGrigori Goronzy2010-08-091-2/+4
| | | | | | Delay allocation of the "faux" glyph until a drawing is parsed. This helps with fixing a (pretty bad) memory leak and also reduces frame overhead a little.
* Fix drawing cbox calculationGrigori Goronzy2010-07-291-0/+1
| | | | | | Use extremes of all points fed to the parser, instead of only points that are added to the outline. Fixes a rendering problem reported on IRC and should fix Issue #7.
* Rename typedefs (breaks API)Grigori Goronzy2009-08-061-12/+12
| | | | | | Rename all typedefs from the convention foo_bar_t, which can possibly conflict with POSIX types, to FooBar (and ASS_FooBar for public API typedefs). Fix formatting and stray comments while at it.
* Clean up typedefs/structsGrigori Goronzy2009-07-281-7/+7
| | | | | Remove useless _s suffix from struct names and remove struct name where not needed (only the typedef'd struct is used). Clean up API headers.
* Implement vector clipsGrigori Goronzy2009-07-161-1/+1
| | | | | | | | | Make it possible to use drawings for clipping with \clip and \iclip. parse_tag was extended to parse drawings in \clip or \iclip tags in case parsing them as rectangular clips fails. These clip drawings are later rasterized and used for blending bitmaps, just after bitmaps are assembled into a list in render_text. Currently, the cache is not utilized for storing the parsed drawings or blended bitmaps.
* Message callback funtionalityGrigori Goronzy2009-07-111-0/+1
| | | | | | | | | | | Introduce functionality for providing a message callback that is used for passing messages to the controlling application instead of simply printing them to standard output. The function pointer to the callback is stored in the ass_library_t instance. ass_msg needs access to it, so in many places the library instance needs to be passed around now. The default behavior is the old one: messages of MSGL_INFO or lower are printed to the standard output, prefixed with "[ass]".
* Implement drawing mode (\p)Grigori Goronzy2009-07-061-0/+76
Finally implement the drawing mode, which allows drawing of custom vector graphics. Drawings are intercepted in ass_render_event; a hash of the drawing string is generated which is then used for looking up drawings and bitmaps of drawings in the cache. The drawings itself are "fake" glyphs. They are created by parsing the simple drawing description language, evaluating the curves described (lines, cubic beziers and/or a special kind of b-splines) and creating vector outlines. Afterwards, these drawings are (with a few exceptions, e.g. ascender/descender) exactly handled like regular glyphs. Support for vector clippings is still missing, but otherwise the implementation should be complete and compatible with VSFilter. The libass integration of the drawing parsing/processing code is still a bit sketchy and should be refactored. History: WIP: Drawing mode infrastructure WIP: Drawing tokenizer WIP: Parse drawing tokens, call evaluators WIP: Bezier/b-spline evaluator WIP: Final pieces for the drawing mode WIP: Heavy modifications to the drawing parser/tokenizer WIP: Dynamic outline memory allocation WIP: Drawing position fixes WIP: more drawing position fixup (similar to VSFilter now) WIP: Lots of cleanup and fixes for drawings. WIP: Drawing mode integration into ass_render_event