The expected behaviour for masking in Cairo is to set the mask according
to the current active matrix and apply unchanged to the masked surface.
In SVG, the mask element is bound to the masked object and thus the local
matrix from that image object applies to the nested mask as well.
Attached is a small patch for substracting the matrix of a image
surface from the matrix of the mask to comply to Cairo's behaviour.
I did not test for other stuff like vectors or text and would expect this
part is incomplete.
We now compile cairo-system.c twice when building static library, but
that's fine because cairo-systemc. includes no other code. Indeed
that's why cairo-system.c was born in the first place.
This is where DLL initialization/finalization should be done for example.
Moved the one for win32. For OS/2 just left a comment as the code needs
more work.
This change simplifies building shared and static libraries in the win32
makefiles.
Previously cairo-mutex-list-private.h assumed that every use of the file
will produce a statement for each mutex by including a semicolon after
each. But some uses (like enumerating all static mutexes in an array
for example, can't be implemented with the semicolon in place. So, move
the semicolon out to the users of the header file.
The macros CAIRO_BEGIN_DECLS and CAIRO_END_DECLS are declared in two
places: config.h and cairo.h. On Win32 build there is no config.h. So,
we can't rely on pulling CAIRO_BEGIN_DECLS from there. Hence, we now:
* Not add those declarations to config.h anymore,
* Test that every cairo private header includes some other cairo
header before any other includes.
These two are fairly enough to ensure that cairo.h is seen from all
private headers. There's still the case of headers not including
any header file at all. I'll fix that later.
Previously I made the mutex implementation code to use Windows mutexes
conditional on HAVE_WINDOWS_H. This was suppposed to be a more wine-friendly
version of checking for a Windows platform. However, it also meant that
when compiling without config.h, one had to stuff a #define for HAVE_WINDOWS_H
somewhere. Traditionally it was put in cairo-features-win32.h, and that
practice was carried over even after my build system rewrite.
Somewhere along the road I also decided that the mutex implementation header
does not need to include anything other than config.h. So the hacked up
HAVE_WINDOWS_H in cairo-features-win32.h was not being seen by its lone
user.
We now condition on any of HAVE_WINDOWS_H and _MSC_VER. So the hack can be
removed altogether.
The tessellator is well-proven now. However, the sweep-line validator
consumes around 50% of the total time required to draw the fractal
Pythagoras tree (the leaves are sub-pixel rectangles, so lots of edges
to sweep through). So disable the validator, but keep it available for
debugging.
Avoid the overhead in sorting the edges within
_cairo_traps_tessellate_convex_quad() by using our prior knowledge that we
have a simple rectangle and construct the trap from the extreme points.
Avoid the overhead of sorting the rectangle in
_cairo_traps_tessellate_convex_quad() by constructing the trap directly
from the line segment. This also has secondary effects in only passing
the non-degenerate trap to _cairo_traps_add_trap().
For rectilinear Hilbert curves this makes the rectilinear stoker over 4x
faster.
The rectilinear stroke finalized the cairo_traps_t passed to it - which
was then subsequently used without re-initialized. So instead of
finalizing the structure, just remove any traps that we may have added
(leaving the limits and memory intact).
The cairo_headers variable in Makefile.win32 was unused and
from before the new build system was put in place. One can
use enabled_cairo_headers if need be.
By introducing $(top_srcdir)/cairo-version.h I tried to make it
unnecessary to rebuild the entire library when the version changes.
That comes handy around releases and when bisecting.
However this was not working as the version info was also ending
up in config.h and hence forcing a full rebuild upon change.
I now undefine the PACKAGE_VERSION* macros that autoconf defines,
so config.h does not change when cairo-version.h changes.
Now that our build system can compute a list of all cairo files,
we prefer to use that in the tests instead of running "find".
However, we were not switching to $(srcdir) so the test was not
finding source files in out-of-tree builds. Noticed that from
the grep error in distcheck.
During the cairo summit it was decided that this API is to freetype-
specific to be in the general cairo interface for now. This will
likely come back again soon as a cairo_ft-specific interface.
Chris rightfully complained that having a boolean function argument is
new in cairo_show_text_glyphs, and indeed avoiding them has been one
of the API design criteria for cairo. Trying to come up with alternatives,
Owen suggested using a flag type which nicely solves the problem AND
future-proofs such a complex API.
Please welcome _flags_t APIs to cairo.h
The adjustments done to the pixman matrix also need to be done for
XTransform. Since an XTransform is just a pixman_transform_t with
another name, we can reuse the conversion function.
where either pushes 'dict true' or 'false' so the true procedure needs to
consume the dictionary as well - for our purposes we just pop it off the
operand stack.
This reverts commit a341cb5a98.
The change introduced in that commit should not be needed and libtool
should just do the right thing. I cannot reproduce the problem
Chris was having no matter how hard I tried.
With --enable-gcov, make check aborts with gcov errors on check-link - it
appears that -lgcov is magic and requires explicit invovation on the
command-line.
Older versions of gcc complain about the use of a guard variable, and warn
that solid_color may be used uninitialized. As it happens the guard
variable is redundant and we can just use solid_color directly.
Avoid tessellating the path if we know that the target extents is zero.
Besides the rare occurrence when everything is clipped out, a zero-sized
surface is often intended as a no-op surface for benchmarking.