Simon Sapin
3313c061ae
Fix #84 : Mak loading an author stylesheet not fatal.
2013-06-20 22:11:19 +01:00
Simon Sapin
d8014d28ad
Image loading: only swallow exception related to fetching or decoding.
2013-06-20 22:06:47 +01:00
Simon Sapin
05e1cb22b2
URL fetching: enforce closing sockets/files with a context manager.
2013-06-20 15:16:47 +01:00
Simon Sapin
9d5cebb5ce
URL fetching: use an intermediate function rather than a wrapper
2013-06-20 12:17:03 +01:00
Simon Sapin
e8fac4b840
Fix #99 : JPEG image not loading with cairo 1.8.x
2013-06-18 12:48:06 +01:00
Simon Sapin
77f8894ced
Add pixel tests for gradients.
2013-04-17 18:02:19 +02:00
Simon Sapin
bf86113961
Python 3.1 compat
...
3.1’s range() objects do not support slicing.
2013-04-17 13:10:36 +02:00
Simon Sapin
1681891f55
Add radial gradient layout tests.
2013-04-16 16:22:14 +02:00
Simon Sapin
b6f6d348bd
Add linear gradient layout tests.
2013-04-16 16:22:14 +02:00
Simon Sapin
50ddcf7015
Add parsing tests for gradients.
2013-04-11 16:06:28 +02:00
Simon Sapin
dd8952adc6
Add radial gradients.
2013-04-11 10:39:47 +02:00
Simon Sapin
3ca71a6bed
Gradients (still untested), handle pathological cases.
2013-04-11 10:39:47 +02:00
Simon Sapin
3f79655940
Add untest support for linear gradients.
2013-04-05 12:23:29 +02:00
Simon Sapin
8b78aa41c9
Use css-image-3 algoritms for background image sizing.
2013-04-03 18:15:32 +02:00
Simon Sapin
171438f48e
2013
2013-04-03 16:23:48 +02:00
Simon Sapin
0faaceb44f
Have Image objects "render themselves" on a cairo Context.
2013-04-03 16:00:31 +02:00
Simon Sapin
e36006ea21
Introduce Image objects, with intrinsic width/height/ratio as attributes.
2013-04-03 13:34:14 +02:00
Simon Sapin
c854feece9
Fix #21 : Check for 'data' URL scheme case-insensitively.
2013-03-28 13:33:28 +01:00
Simon Sapin
3a42860018
Move GDK-PixBuf code to cairocffi.pixbuf
2013-02-26 15:04:52 +01:00
Simon Sapin
06a9ad8c91
Unicode strings are fine with CFFI 0.5
2013-02-25 16:38:54 +01:00
Simon Sapin
4c4be709d5
Make GDK-PixBuf optional.
2013-02-25 16:34:42 +01:00
Simon Sapin
e2ef91dd99
Fix the GDK-PixBuf loader for images with an alpha channel.
2013-02-25 16:30:39 +01:00
Simon Sapin
9ccd37e088
Don’t bother making CairoSVG optional.
2013-02-25 16:26:39 +01:00
Simon Sapin
f33e9e8039
Have a better error message when CairoSVG uses pycairo instead of craicffi.
2013-02-25 14:48:56 +01:00
Simon Sapin
4f9f486ef1
cairocffi accepts byte strings for set_mime_data() now.
2013-01-01 16:55:48 +01:00
Simon Sapin
a1109346df
Update for cairocffi changes.
2012-12-30 11:08:55 +01:00
Simon Sapin
124a28cb15
Convert pixbuf images to cairo with Gdk if available.
2012-12-29 23:02:50 +01:00
Simon Sapin
4eb59f04ec
Update setup.py and tox.ini
2012-12-29 15:27:45 +01:00
Simon Sapin
294be548b0
All tests passsing with cffi!!
2012-12-29 14:55:59 +01:00
Simon Sapin
5baee96712
Use pixbuf through cffi.
2012-12-29 11:58:52 +01:00
Simon Sapin
c70b00b5b8
More WIP: cairocffi and pango cffi.
2012-12-29 01:36:06 +01:00
Simon Sapin
d2040ac77a
WIP: use Pango and cairo through cffi.
...
Use cairocffi
Ditch pycairo, PyGTK and PyGobject-introspection.
2012-12-28 23:17:04 +01:00
Simon Sapin
f243dbcca3
Embed JPEG-encoded images in PDF. Fix #6
...
If an image is in JPEG format, embed it as-is in the PDF output.
This often results in smaller PDF file size.
(The image is still decoded however,
so there is no rendering speed improvement.)
2012-12-20 20:12:52 +01:00
Simon Sapin
f12deb8fc6
Work around a segfault on Python 3.2.
...
Something bad happend when de-allocating a module-level BytesIO()
and dummy PDFSurface.
2012-12-12 16:02:41 +01:00
Simon Sapin
4f8deadc47
Work around a bug in old pycairo versions.
...
See
http://cgit.freedesktop.org/py2cairo/commit/?id=cab2c1295499f57247854e8635b77ca716fa9730
2012-12-12 09:25:28 +01:00
Simon Sapin
f5bd8cf8ff
Defer warnings when PixBuf is not available.
...
Previously, a missing PixBuf caused a warning at import-time.
Now the exception is saved and re-raised when an image needs
to be loaded: there is no warning if PixBuf is not used at all.
2012-10-07 10:07:21 +02:00
Simon Sapin
f8457ba3a5
Move save_pixels_to_png() to the test_draw module.
...
This function is only used for tests.
2012-10-07 09:49:07 +02:00
Simon Sapin
a564473882
Avoid re-using Pattern objects for images.
2012-09-26 16:59:40 +02:00
Simon Sapin
03d8817690
Cache failures to fetch/load images.
2012-09-26 14:44:43 +02:00
Simon Sapin
5f86288635
Make GDK-PixBuf truly optional.
2012-09-25 17:56:02 +02:00
Simon Sapin
f8f38f0d35
Compat with early pycairo versions.
2012-09-25 16:37:50 +02:00
Simon Sapin
c2a88cfafc
Fix saving of PNG images for failed tests.
2012-08-03 17:19:18 +02:00
Simon Sapin
ba8a55d5c0
Add support for outlines.
2012-08-03 16:22:32 +02:00
Simon Sapin
d1971b6e63
Remove unused imports.
2012-08-03 13:32:42 +02:00
Simon Sapin
feece3d3c7
Always close pixbufs.
2012-07-31 18:10:44 +02:00
Simon Sapin
cb659911d8
Add a specific error message for 0-byte images.
2012-07-31 15:08:01 +02:00
Simon Sapin
eca3e872a3
Fix the PyGTK version of gdkpixbuf_loader()
2012-07-29 18:23:53 +02:00
Simon Sapin
f522eac201
Use the same get_pixbuf() for both PyGTK and introspection.
2012-07-29 18:21:33 +02:00
Simon Sapin
1efd026ad0
Warn if gdk-pixbuf istoo old for introspection.
2012-07-29 18:13:33 +02:00
Simon Sapin
f46c334fa0
Remove the Pystacia dependency in tox.ini
2012-07-29 16:55:05 +02:00