Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
src/cairo-font-subset.c
|
|
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.
|
|
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
|
|
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.
|
|
|
|
The CAIRO_REF_COUNT_INVALID macro simply hides the ((unsigned int)-1) cast
to avoid warnings about comparison between signed and unsigned values.
|
|
|
|
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.
|
|
_cairo_xlib_surface_show_glyphs
|
|
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).
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
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!
|
|
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.
|
|
consitency/grepability
|
|
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).
|
|
Instead, use the standard INT16_{MIN,MAX} and UINT16_{MIN,MAX} as
appropriate.
|
|
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).
|
|
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.
|
|
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.
|
|
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).
|
|
This patch was produced with the following (GNU) sed script:
sed -i -r -e 's/^[ \t]+$//'
run on all *.[ch] files within cairo.
|
|
This assumes that the directfb, glitz, and quartz backends
always create surfaces with content of COLOR_ALPHA which might
be totally wrong.
|
|
cairo-debug.h to cairo.h
|
|
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).
|
|
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.
|
|
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.
|
|
If any backend-specific, surface-modifying function is called with
the wrong surface type we set an error on that surface.
|
|
Conflicts:
src/cairo-path-stroke.c
src/cairo-pdf-surface.c
src/cairo-ps-surface.c
|
|
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.
|
|
|
|
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).
|
|
|
|
|
|
With the string-array-stream stuff that this merge picks up, the
analysis-surface branch is now passing all of the test suite again.
|
|
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).
|
|
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.
|
|
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).
|
|
list.
|
|
* 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.
|
|
|
|
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.
|
|
|
|
|
|
|
|
(cherry picked from d0cc56b9a24fa59febc15ac5de073da0e785e1cc commit)
(cherry picked from a6a054abe45287eb950c294e20366594313138f5 commit)
|