Commit graph

2239 commits

Author SHA1 Message Date
Christian Biesinger
0b63baba6e Make BeOS compile again
..by passing the cairo_content_t to _cairo_surface_init
2006-05-25 17:29:01 +02:00
Carl Worth
22232be759 Note the changed semantics of cairo_surface_set_device_offset
Specifically, device offsets now affect using the offset surface in
a source pattern as well as drawing to the surface. This behavior
os also verified with a new test case: test/device-offset.c
2006-05-24 17:24:52 -07:00
Carl Worth
d0dd3b822e New API: Add new function cairo_surface_get_content
This assumes that the directfb, glitz, and quartz backends
always create surfaces with content of COLOR_ALPHA which might
be totally wrong.
2006-05-24 17:19:00 -07:00
Carl Worth
0796845ae6 Add new fallback-resolution test for bug in cairo_pdf_surface_set_dpi 2006-05-24 14:03:49 -07:00
Carl Worth
11b2481862 PDF: Add new, private test function: cairo_pdf_test_force_fallbacks 2006-05-24 14:02:30 -07:00
Carl Worth
65b9217cad cairo-xlib-test: Rename cairo_test_xlib function prefix to cairo_xlib_test 2006-05-24 11:37:05 -07:00
Carl Worth
5acce60291 Typo fixes 2006-05-24 10:35:24 -07:00
Carl Worth
a5a72676bd ROADMAP: Note that the cairo_set_line_width issue is resolved 2006-05-23 13:41:44 -07:00
Carl Worth
e4476dda49 PDF: Move dash operator before path construction operators.
I don't recall anything about this in the PDF reference, (though I
also didn't look specifically for it), but without this acroread
is quite unhappy with cairo's PDF output when it includes dashing.
2006-05-23 13:41:00 -07:00
Carl Worth
59885c6a12 Clarify the documentation for cairo_set_dash
Note that dash length units are evaluated in the user space
at the time of the stroke operation, (not the user space at
the time of cairo_set_dash).
2006-05-23 12:13:20 -07:00
Carl Worth
68b41cfd06 PDF: Share path callbacks for fill and stroke. 2006-05-23 12:13:20 -07:00
Carl Worth
7e5bef2439 PDF: Rename pdf_stroke_t to pdf_path_into_t for future sharing with fill 2006-05-23 12:13:20 -07:00
Carl Worth
1b1b59a4a9 New test: dash-scale
Tests interactions of cairo_set_dash and cairo_scale, (in particular with a
non-uniformly scaled pen).
2006-05-23 12:13:20 -07:00
Carl Worth
0755a619a1 SVG: Fix for line-width-scale
Use the same approach as the PDF backend: emit the pen matrix as the
SVG transform for the stroke, and compensate by first transforming all path
coordinates by the ctm_inverse.
2006-05-23 12:13:19 -07:00
Carl Worth
b1231e2ef3 Codify 1.0 behavior of cairo_set_line_width as a feature, not a bug.
Clarify the documentation of cairo_set_line_width to indicate that the
value will be interpreted within the user space at the time of the
stroke.

Also adjust the comments in test/line-width-scale as well as the
reference images for that test to match.
2006-05-23 12:13:19 -07:00
Carl Worth
0a1ec91977 Move prototype of cairo_debug_reset_static_data from uninstalled cairo-debug.h to cairo.h 2006-05-22 09:31:31 -07:00
Kristian Høgsberg
27e9e3cecd Handle seac charstring commands correctly.
- Include PS standard encoding table so we can map from standard
   encoding indices to glyph names and then make sure to include the
   glyph of that name.
 - Cut out verbose debugging code.
 - Fix a couple of bugs in glyph name to index lookup code.
2006-05-19 02:17:35 -04:00
Carl Worth
89384ae124 PDF: Squelch a couple of bogus "may be used uninitialized" warnings. 2006-05-18 21:48:38 -07:00
Vladimir Vukicevic
e2713057f8 Define kCGBitmapByteOrder32Host for when the SDK doesn't define it
(cherry picked from bd9b5d29e39f424e912184dcd0dc2610637d5fdf commit)
2006-05-18 21:44:23 -07:00
Vladimir Vukicevic
5bdcfd1413 Whitespace fix
(cherry picked from 0bb567a2f1807d83508e2d7598a8bd8f4d94208d commit)
2006-05-18 21:37:39 -07:00
Vladimir Vukicevic
e8069da97b CAIRO_SCALED_FONT_TYPE_* -> CAIRO_FONT_TYPE_*
Some of these were missed when CAIRO_SCALED_FONT_TYPE_* was renamed.
(cherry picked from 33dba4a690a5e4ec13ed294307b89cceac1ca696 commit)
2006-05-18 21:37:08 -07:00
Kristian Høgsberg
fb7ae2a28e Remember to call cairo_type1_font_subset_destroy(). 2006-05-18 21:01:20 -04:00
Kristian Høgsberg
1d2b60454f Consolidate a few arrays into a array of structs. 2006-05-18 20:50:36 -04:00
Vladimir Vukicevic
9b84b3da58 [win32] GDI is nearly always faster than pixman; use it whenever possible
Remove local image check from fill_rectangles and fix check for whether
we can AlphaBlend or not (ARGB->ARGB AlphaBlend works fine)
(cherry picked from f099783b3e7f895a59d4d4a67a8534f1d21d44e1 commit)
2006-05-18 17:31:44 -07:00
Vladimir Vukicevic
2a89526edf [win32] Add GdiFlush() calls after DIB creation, as per MSDN docs
Also fixes some spacing/tab issues
(cherry picked from 123ca7c9f9d8984be5ed4fb42a2897508e8ff44a commit)
2006-05-18 17:31:21 -07:00
Stuart Parmenter
a9c42e8fc2 [win32] fix win32_show_glyphs glyph offsets
(cherry picked from 947a4a1bc6a0a0ee78c44b71fef32c924ebc9397 commit)
2006-05-18 17:31:05 -07:00
Stuart Parmenter
59a45f1c4a [win32] implement win32 show_glyphs
(cherry picked from 9c7d0cbde415d02b6e8298a02b3b62cf4513a59e commit)
2006-05-18 17:30:42 -07:00
Stuart Parmenter
a10bbecaf8 [win32] Allow for creating a font from a HFONT
(cherry picked from 677f6c84f9beae3afd375663fed0a440007ebca2 commit)
2006-05-18 17:29:18 -07:00
Vladimir Vukicevic
244c111fca [win32] Add SHADEBLENDCAPS and SB_NONE definitions for older SDKs
(cherry picked from 7a68b7d035b1c63076d6fa6c54d40944459d206d commit)
2006-05-18 17:27:30 -07:00
Vladimir Vukicevic
92a015ff8e [xlib] only do glyph extents computation if non-solid source.
xlib_show_glyphs was always calculating the glyph extents, even when it
didn't need to; this only does it when necessary.

Also adds an implementation of surface_flush() for xlib that just calls
XSync.
(cherry picked from 8770ac5b5cdba8007c4c6a6a980e6e06acf6aeb6 commit)
2006-05-18 17:14:01 -07:00
Vladimir Vukicevic
108431414f [xlib] implement _cairo_xlib_surface_show_glyphs
Avoid using the fallback paths as much as possible; implement real
show_glyphs, falling back for OPERATOR_SOURCE (due to Render bug), and all
unbounded operators (let the fallback code deal with fixup).  Also fall
back if we have a fallback mask clip set.

(cherry picked from 3225a4ec820fd4051dd893ffc4258b182bd62dca commit)
2006-05-18 17:12:32 -07:00
Kristian Høgsberg
6d53687058 Look for /-| or /RD tokens to determine the charstring delimiter tokens. 2006-05-18 20:03:53 -04:00
Carl Worth
3487191b22 xlib: Style cleanups for _cairo_xlib_surface_create_similar
Including style cleanups for _xrender_format_matches_content.

There's even a bug fix here as well. Previously, we would miss compatibility
if the existing xlib surface had a NULL visual, (even if it had a compatible
xrender_format). We now catch this case, and don't bother even trying to
store a visual into the resulting surface.
2006-05-18 15:36:43 -07:00
Carl Worth
a96bd2b4f9 xlib: Rename surface->format to surface->xrender_format to avoid confusion
With both XRenderPictFormat* and cairo_format_t values being manipulated in the same
functions, this really needed to be done.
2006-05-18 15:20:25 -07:00
Robert O'Callahan
ea05e02711 [xlib] Have create_similar try harder to create the right surface
I recently discovered that cairo_create_similar on a 16-bit xlib surface
creates a surface backed by a 24-bit pixmap. This results in absymal
performance --- I can actually watch a copy from the similar to the
original move down the screen, on my dual Xeon, NVidia vendor driver
machine. It also means xlib-based code like GTK themes can't render to
the surface because it doesn't match the screen depth.

The attached patch makes _cairo_xlib_surface_create_similar match the
characteristics of the input surface as closely as I know how, and fixes
my issues.
2006-05-18 14:25:23 -07:00
Kristian Høgsberg
d09d95a323 Track glyph subset indices and use them in the output. 2006-05-18 15:10:05 -04:00
Kristian Høgsberg
5f55ae7d91 Make ps surface use type1 subset code.
- Add _cairo_ps_surface_emit_type1_font_subset() which just dumps the
  type1 subset into the ps document.
- Add a 'name' parameter to _cairo_type1_subset_init() so it will be
  defined under the right name in the ps document.
- Quiet down debug output from type1 subset code.
- Reenable code to output custom /Encoding table.
2006-05-18 13:57:03 -04:00
Kristian Høgsberg
fe58e7a81f Only use the word wrap stream when emitting paths.
This patch also factors the word wrap stream setup and teardown
and the call to _cairo_path_fixed_interpret() out into a new function,
_cairo_ps_surface_emit_path().
2006-05-18 13:35:57 -04:00
Kristian Høgsberg
2fafbac390 Use RD and ND for delimiting glyph data instead of -| and |-.
We probably should figure out from the private dictionary which of the two
pairs the font defines and uses, but I don't actually have fonts that
use -| and |-, so for now for flip the default.
2006-05-18 02:24:02 -04:00
Kristian Høgsberg
466d3da4ef Add code to emit type1 dicts to the pdf backend. 2006-05-18 02:16:45 -04:00
Kristian Høgsberg
c36de5b7c5 Pull in type1 subset code from the cvs repo it was sitting in. 2006-05-18 02:16:45 -04:00
Kristian Høgsberg
127fab4695 Remember to call _cairo_truetype_subset_fini() after outputting subset. 2006-05-18 02:12:06 -04:00
Kristian Høgsberg
b16c29ff0c Set libcairo_font_subset_sources for ps, pdf, and svg backends.
Backends that use the font subsetting code should add the font subsetting
sources to the build.  This is dont by setting libcairo_font_subset_sources,
in the conditional section for each backend.  If any one is enabled, the
sources will be added to the build.
2006-05-17 01:30:43 -04:00
Kristian Høgsberg
d42b2c7a89 Remember to destroy cairo_pdf_ft_font_t once we've generated the subset.
Also, remove cairo_private from function definitions.
2006-05-16 23:56:38 -04:00
Kristian Høgsberg
f3209660c3 Print out ps comment in the truetype emit code and update type3 ps comment. 2006-05-16 23:24:09 -04:00
Kristian Høgsberg
3975d7f8a2 Add support for truetype subset to ps backend.
Same story as for the pdf backend: try to output a truetype subset if
possible, otherwise fall back to a type3 font.  Ajdust text output code
to scale font accordingly and scale type3 fonts to unity.
2006-05-16 23:20:08 -04:00
Kristian Høgsberg
2c6e799ee6 Switch to using Tm for text positioning and scale type3 fonts to unit size.
This change changes the text output code to use the Tm operator for
positioning the glyphs.  This allows us to set the scale matrix from
the cairo_scaled_font_t so truetype glyphs get transformed correctly.
However, we now need to scale type3 glyph to unity to compensate.
Longer term we should just only output one unit sized type3 subset for
a cairo_font_face_t and use that for all cairo_scaled_font_t's coming from
that font face.

Also, this fixes a num_glyphs initialization bug.
2006-05-16 22:53:05 -04:00
Kristian Høgsberg
e846dca44e Hook _cairo_truetype_subset_init() up to existing truetype subset code.
This is a minimal first change to get things working.  The truetype
subset code still needs to be renamed and moved around a bit.
2006-05-16 21:41:07 -04:00
Kristian Høgsberg
f4f11eba5b Output pdf dicts for truetype subset fonts. 2006-05-16 19:01:15 -04:00
Kristian Høgsberg
13a05830f5 Update pdf font emit code to try to emit a truetype subset before type3. 2006-05-16 16:42:44 -04:00