diff options
author | Carl Worth <cworth@cworth.org> | 2004-02-12 19:02:33 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2004-02-12 19:02:33 +0000 |
commit | b55f1076793229d182463100ed9de2a68dd3c77b (patch) | |
tree | ba55f8191450559c189b0f31e482144cd0a5d55c /src/cairo-fixed.c | |
parent | 810037bc7c7707337fb1e7682b36651f6a7c4e04 (diff) | |
download | cairo-b55f1076793229d182463100ed9de2a68dd3c77b.tar.gz |
Add typedefs for new callbacks to be used by cairo_current_path: cairo_move_to_func, cairo_line_to_func, cairo_curve_to_func, and cairo_close_path_func.
cairo_path.last_move_point and cairo_path.current_point are now fixed-point not doubles for consistency.
Now accept 4 explicit function pointers rather than a structure. Eliminate unnecessary done_path callback.
Track change in _cairo_path_interpret. Code previously in done_path callback is now here immediately after call to _cairo_path_interpret.
Internal _cairo_path API modified to accept fixed-point data everywhere. Much cleaner this way.
Have to convert doubles to fixed-point to track changes in _cairo_path API.
Keep data in fixed-point rather than going through intermediate doubles. Track changes in _cairo_path API.
New function to help when working with freetype.
Diffstat (limited to 'src/cairo-fixed.c')
-rw-r--r-- | src/cairo-fixed.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-fixed.c b/src/cairo-fixed.c index 330885467..9a7e7bc47 100644 --- a/src/cairo-fixed.c +++ b/src/cairo-fixed.c @@ -39,8 +39,15 @@ _cairo_fixed_from_double (double d) return (cairo_fixed_t) (d * 65536); } +cairo_fixed_t +_cairo_fixed_from_26_6 (uint32_t i) +{ + return i << 10; +} + double _cairo_fixed_to_double (cairo_fixed_t f) { return ((double) f) / 65536.0; } + |