summaryrefslogtreecommitdiff
path: root/src/cairoint.h
AgeCommit message (Collapse)AuthorFilesLines
2006-08-07Merge branch 'warnings-cleanup' into cairoCarl Worth1-11/+13
Conflicts: src/cairo-font-subset.c
2006-08-07Fix bug 7294 by adding pixman BGR formats and internal cairo BGR formats.Carl Worth1-0/+59
This approach to fixing the bug is valid since there is code in pixman for rendering to BGR images, (which is why cairo 1.0 worked with BGR X servers for example). But, since we don't want to advertise additional image formats we implement this through a new cairo_internal_format_t. This is rather fragile since we don't want to leak any internal formats nor do we ever want an internal format to be used somewhere a real format is expected, (and trigger a CAIRO_FORMAT_VALID assertion failure). More comments than code are added here to help compensate for the fragility and to give some guidance in fixing this mess in a better way in the future.
2006-08-07Add definition of cairo_private for some Sun compilers.Alfred Peng1-1/+3
In addition to helping us preserve a sharp line between which symbols are part of the public API and which are private parts of the implementation, this can also help mozilla avoid clashes between its modified, internal copy of cairo and the system version of cairo. See the mozilla bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=341874
2006-08-02Remove freetype dependency for truetype subsetting code.Adrian Johnson1-0/+6
Add a load_truetype_table function to cairo_scaled_font_backend_t and use it to load the truetype sfnt tables. Implement this with freetype for the freetype font backend and use GetFontData for win32. Atsui remains unimplemented, and still falls back to type3 fonts.
2006-07-28Add -Wsign-compare compiler flag and fix all warningsCarl Worth1-8/+8
2006-07-28Standardize on unsigned for ref_count type and add CAIRO_REF_COUNT_INVALIDBehdad Esfahbod1-3/+5
The CAIRO_REF_COUNT_INVALID macro simply hides the ((unsigned int)-1) cast to avoid warnings about comparison between signed and unsigned values.
2006-07-27Make "double *dash" argument const in cairo_set_dashBehdad Esfahbod1-1/+1
2006-06-29Move device_transform of path to before floating->fixed conversion.Carl Worth1-0/+1
This is an attempt to fix the following bug: http://bugzilla.gnome.org/show_bug.cgi?id=332266 With the recent rewrite of the device-offset code, which pushed things from the gstate to the surface layer, the 16-bit limitations on coordinates which previously applied to device space only, have lately been applying to user space. This commit moves the device_transform back up above the conversion from floating-point to fixed-point values so that once again the limitation only applies to device space.
2006-06-22Bug 6955: Fix by adding freeze/thaw around scaled_font glyph cache in ↵Carl Worth1-0/+6
_cairo_xlib_surface_show_glyphs
2006-06-20Add new CAIRO_BITSWAP8 macro for swapping the bits within a byte.Carl Worth1-0/+12
This uses a technique devised by Sean Anderson, July 13, 2001 as found at http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits This technique uses 3 multiplies rather than just shifts and masks, but performance seems comparable to the old approach, (but more significantly, the new approach is easier to implement as a macro, and I plan to start using this bit-swapping elsewhere very soon).
2006-06-17Add missing prototype for _cairo_lzw_compress.Jinghua Luo1-0/+4
2006-06-15Drop _cairo_surface_is_opaque now that we have cairo_surface_get_contentCarl Worth1-0/+1
2006-06-14Merge branch 'svg-rewrite'Kristian Høgsberg1-84/+0
2006-06-14Rename cairo-wideint.h to cairo-wideint-private.h.Behdad Esfahbod1-1/+1
2006-06-13Change return type of _cairo_scaled_glyph_lookup to allow UNSUPPORTED.Carl Worth1-2/+2
This allows graceful recovery when first requesting a path from a font that only supports bitmapped glyph. The changed return type is also pushed down into the scaled_glyph_init function of the cairo_scaled_font backend.
2006-06-12Make cairo_output_stream_t an embeddable type.Kristian Høgsberg1-84/+0
Most internal cairo types are transparent within cairo and have init and fini functions to intialize and finialize them in place. This way they can be easily be embedded in other structs or derived from. Initially, the cairo_output_stream_t type was proposed as a publically visible type and thus kept opaque. However, now it's only used internally and derived from in a number of places so let's make it an embeddable type for consistency and ease of use. The patch keeps _cairo_output_stream_create() and _cairo_output_stream_close() around for (internal) backwards compatibility by deriving a cairo_output_stream_with_closure_t stream type. The patch also moves all cairo_output_stream_t functions out of cairoint.h and into new file cairo-output-stream-private.h, thus chipping away at the monolithic cairoint.h.
2006-06-10Hook up device scaling so fallback_resolution starts working.Carl Worth1-0/+5
Add new, private _cairo_surface_set_device_scale for getting at the scaling components of device_transform. Use this in paginated surface when replaying to an image surface. The fallback-resolution test now clearly shows that image fallback resolution can be controlled by the user. Hurrah!
2006-06-10Change {x,y}_device_offset values to a device_transform matrix.Carl Worth1-6/+7
This is a step toward allowing device scaling in addition to device offsets. So far, the scale values are still always 1.0 so only the translation is actually being used. But most of the code is in place for doing scaling as well and it just needs to be hooked up. There are some fragile parts in this code, all of which involve using the translation without the scale, (so grep for device_transform.x0 or device_transform->x0). Some of these are likely bugs that will hopefully be obvious once we start using the scale. Others are OK if only because we 'know' that we aren't ever setting device scaling on a surface that has a device offset (we only set device scaling on surfaces we create internally and we don't export device scaling to the user). All of these fragile parts in the code have been marked with comments of the form: XXX: FRAGILE.
2006-06-09Rename device_{x,y}_offset to {x,y}_device_offset for better ↵Carl Worth1-2/+2
consitency/grepability
2006-06-09New API: Replace cairo_{ps,pdf,svg}_set_dpi with new ↵Carl Worth1-0/+5
cairo_surface_set_fallback_resolution. This just provides the mechanics for storing the value and removing the old function calls. The new value is still not used anywhere (though nor where the old values), so there should be no functional change (other than forcing any programs calling the old API to be updated).
2006-06-06Remove CAIRO_{MIN,MAX}SHORT which did not distinguish signed vs. unsigned.Carl Worth1-3/+0
Instead, use the standard INT16_{MIN,MAX} and UINT16_{MIN,MAX} as appropriate.
2006-06-06Fix bogus cairo_rectangle_fixed_t to be cairo_rectangle_int16_t.Carl Worth1-22/+22
This rectangle has regular integer values, not fixed-point values. So the old name was horribly wrong and misleading, (and yes I think it was even I that had suggested it).
2006-06-06Remove initial, final, and duplicate blank lines.Carl Worth1-4/+0
This patch was produced by running git-stripspace on all *.[ch] files within cairo. Note that this script would have also created all the changes from the previous commits to remove trailing whitespace.
2006-06-06Remove all remaining trailing whitespace.Carl Worth1-28/+28
This patch was produced with the following (GNU) sed script: sed -i -r -e 's/[ \t]+$//' run on all *.[ch] files within cairo. Note that the above script would have also created all the changes from the previous commits to remove trailing whitespace.
2006-06-06Remove trailing whitespace from lines that look like comments.Carl Worth1-4/+4
This patch was produced with the following (GNU) sed script: sed -i -r -e '/^[ \t]*\/?\*/ s/[ \t]+$//' run on all *.[ch] files within cairo, (though I manually excluded src/cairo-atsui-font.c which has a code line that appears as a comment to this script).
2006-06-06Remove extraneous whitespace from "blank" lines.Carl Worth1-17/+17
This patch was produced with the following (GNU) sed script: sed -i -r -e 's/^[ \t]+$//' run on all *.[ch] files within cairo.
2006-05-24New API: Add new function cairo_surface_get_contentCarl Worth1-1/+4
This assumes that the directfb, glitz, and quartz backends always create surfaces with content of COLOR_ALPHA which might be totally wrong.
2006-05-22Move prototype of cairo_debug_reset_static_data from uninstalled ↵Carl Worth1-1/+0
cairo-debug.h to cairo.h
2006-05-04Rename cairo_rectangle_t to cairo_rectangle_fixed_t.Robert O'Callahan1-36/+36
This is in preparation for a later function addition for extracting clip rectangles from a cairo_t, (which will add a public cairo_rectangle_t).
2006-05-04Implement push_group/pop_groupVladimir Vukicevic1-0/+19
This patch adds the following API calls: cairo_push_group cairo_push_group_with_content cairo_pop_group cairo_pop_group_to_source cairo_get_group_target These methods support implementing layers on top of a cairo context, allowing for drawing with transparency and temporary buffering. cairo_get_group_target allows an app to get access to the actual surface created by the last push_group call, in case itneeds to perform native drawing to it.
2006-05-04Implement the device_offset functionality at surface, not gstate layerCarl Worth1-2/+17
This is a mega-patch that has the advantage that the entire test suite passes both immediately before and immediately after this commit. The disadvantage of the mega-patch is that it does not reflect the development history of the device-offset branch, (with its various fumblings and flailings). To capture that history, we will next merge in that branch.
2006-05-02Make backend-specific function set a surface error on type mismatch.Carl Worth1-0/+4
If any backend-specific, surface-modifying function is called with the wrong surface type we set an error on that surface.
2006-04-18Merge branch 'cairo' into new-sub-pathCarl Worth1-14/+105
Conflicts: src/cairo-path-stroke.c src/cairo-pdf-surface.c src/cairo-ps-surface.c
2006-04-14Farm out the surface and pattern analysis functions away from ↵Carl Worth1-1/+7
cairo-ps-surface.c. We're setting things up here for better sharing as PDF surface (and others) now want to do some of the same analysis.
2006-04-14Move analysis of operators from cairo-ps-surface.c to cairo-operator.cCarl Worth1-0/+7
2006-04-14Flesh test-paginated-surface out into a complete surface.Carl Worth1-0/+13
This adds an aactual test_paginated_surface_backend rather than just having this test surface create a paginated surface around an image surface. This is a more realistic test of what a paginated surface is and should be more useful as an example of how to use the paginated surface, (and in particular the analysis portions).
2006-04-12Add documentation for _cairo_output_stream_create_for_file.Carl Worth1-0/+7
2006-04-08Save PS output in temp file so we can prepend global data (like fonts)Keith Packard1-1/+4
2006-04-04Merge branch 'cairo-origin' into analysis-surfaceCarl Worth1-4/+63
With the string-array-stream stuff that this merge picks up, the analysis-surface branch is now passing all of the test suite again.
2006-04-04Implement proper cairo-style error-handling for cairo_output_stream_t.Carl Worth1-8/+27
The cairo_output_stream_t object already had an internal status value, but it was annoyingly returning status values from various functions. It also was missing proper shutdown-on-error as well as nil-create semantics. This fixes those shortcomings and adjusts all callers for the new semantics, (leading to simpler and more correct calling code---particularly in the case of cairo-base85-stream.c).
2006-04-03Implement cairo-base85-stream as a filtering output stream not just a write ↵Carl Worth1-6/+17
function. Now _cairo_output_stream_create accepts a new close callback, (which the base85 stream uses to write its trailer). This eliminates the former kludge used to fclose the stdio output streams, and required a bit of touchup to the pdf, ps, and svg-surface usage of streams.
2006-03-23cairo-lzw: Replace LZW code from libtiff with an original implementation.Carl Worth1-2/+2
This new implementation is an entirely original work directly from the description of the LZWDecode filter in the PostScript Language Reference, (and in spite of the bugs in the examples provided in that reference). This implementation uses the existing cairo-hash.c for the symbol table. This implementation is somewhat easier to read than the libtiff code, and avoids any code that may have an advertising clause attached. This new implementation is the simplest thing I could implement. It is not as efficient as the libtiff code, (though I did expect better things from cairo-hash.c).
2006-03-23Rename _cairo_compress_lzw to _cairo_lzw_compress and tighten the parameter ↵Carl Worth1-3/+1
list.
2006-03-15Add LZW image compression and ASCII85 encoding for PostScript image output.Alexander Larsson1-0/+10
* src/Makefile.am: Add cairo-lzw.c to sources Remove erronous space at start of line * src/cairo-lzw.c: New file implementing _cairo_compress_lzw which does Lempel-Ziv & Welch compression as used by postscript. Based on code from libtiff. * src/cairo-output-stream.c: Add _cairo_output_stream_write_base85_string which implements an encoder for the ASCII85Decode postscript filter. * src/cairoint.h: Add _cairo_compress_lzw and _cairo_output_stream_write_base85_string. * src/cairo-ps-surface.c: Write Images LZW + Base85 encoded. Change ps level to 2 (we only needed level 3 for FlateDecode). Change DocumentData to Clean7Bit as we don't include binary data anymore.
2006-02-28Merge branch 'get-type' into cairoCarl Worth1-8/+20
2006-02-28Add testing for cairo_surface_get_type.Carl Worth1-2/+4
All test targets now list an expected cairo_surface_type_t. Add notes on current limitations of PDF/PS/meta-surface support that causes CAIRO_CONTENT_COLOR similar surfaces of PDF and PS surfaces to be returned as image surfaces. Add cairo_internal_surface_type_t for the meta, paginated, and various test surfaces.
2006-02-27Implement cairo_surface_get_typeCarl Worth1-0/+12
2006-02-27Primitive ps glyph support. Fix ps strokes to not leave path definedKeith Packard1-1/+1
2006-02-27Implement cairo_scaled_font_get_typeCarl Worth1-0/+2
2006-02-27Misc compilation fixes (C++-style comments, M_PI decls, etc.)Vladimir Vukicevic1-0/+4
(cherry picked from d0cc56b9a24fa59febc15ac5de073da0e785e1cc commit) (cherry picked from a6a054abe45287eb950c294e20366594313138f5 commit)