mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 15:48:00 +02:00
Add -lz to CAIRO_LIBS when compiling the PDF backend.
Don't use compressBound, since it's only available in zlib 1.2 and newer.
This commit is contained in:
parent
f4a51d9154
commit
a850136805
4 changed files with 26 additions and 2 deletions
|
|
@ -1,3 +1,11 @@
|
|||
2005-01-07 Kristian Høgsberg <krh@redhat.com>
|
||||
|
||||
* configure.in: Add -lz to CAIRO_LIBS when compiling the PDF
|
||||
backend.
|
||||
|
||||
* src/cairo_pdf_surface.c (emit_image_data): Don't use
|
||||
compressBound, since it's only available in zlib 1.2 and newer.
|
||||
|
||||
2005-01-07 Carl Worth <cworth@cworth.org>
|
||||
|
||||
* TODO: Add Owen's new equation to fix clipping:
|
||||
|
|
|
|||
|
|
@ -121,10 +121,14 @@ if test "x$use_pdf" != "xyes"; then
|
|||
AM_CONDITIONAL(CAIRO_HAS_PDF_SURFACE, false)
|
||||
else
|
||||
PDF_SURFACE_FEATURE=CAIRO_HAS_PDF_SURFACE
|
||||
PDF_LIBS=-lz
|
||||
AM_CONDITIONAL(CAIRO_HAS_PDF_SURFACE, true)
|
||||
fi
|
||||
|
||||
CAIRO_LIBS="$CAIRO_LIBS $PDF_LIBS"
|
||||
|
||||
AC_SUBST(PDF_SURFACE_FEATURE)
|
||||
AC_SUBST(PDF_LIBS)
|
||||
|
||||
dnl ===========================================================================
|
||||
|
||||
|
|
|
|||
|
|
@ -475,6 +475,12 @@ _cairo_pdf_surface_set_repeat (void *abstract_surface,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
compress_bound (unsigned long source_size)
|
||||
{
|
||||
return source_size + (source_size >> 12) + (source_size >> 14) + 11;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
emit_image_data (cairo_pdf_document_t *document,
|
||||
cairo_image_surface_t *image)
|
||||
|
|
@ -492,7 +498,7 @@ emit_image_data (cairo_pdf_document_t *document,
|
|||
if (rgb == NULL)
|
||||
return 0;
|
||||
|
||||
compressed_size = compressBound (rgb_size);
|
||||
compressed_size = compress_bound (rgb_size);
|
||||
compressed = malloc (compressed_size);
|
||||
if (rgb == NULL) {
|
||||
free (rgb);
|
||||
|
|
|
|||
|
|
@ -475,6 +475,12 @@ _cairo_pdf_surface_set_repeat (void *abstract_surface,
|
|||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static unsigned long
|
||||
compress_bound (unsigned long source_size)
|
||||
{
|
||||
return source_size + (source_size >> 12) + (source_size >> 14) + 11;
|
||||
}
|
||||
|
||||
static unsigned int
|
||||
emit_image_data (cairo_pdf_document_t *document,
|
||||
cairo_image_surface_t *image)
|
||||
|
|
@ -492,7 +498,7 @@ emit_image_data (cairo_pdf_document_t *document,
|
|||
if (rgb == NULL)
|
||||
return 0;
|
||||
|
||||
compressed_size = compressBound (rgb_size);
|
||||
compressed_size = compress_bound (rgb_size);
|
||||
compressed = malloc (compressed_size);
|
||||
if (rgb == NULL) {
|
||||
free (rgb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue