Debian Codegraph @

NEWS

raw
1 Since version 1.11.0 Pycairo uses `Semantic Versioning <http://semver.org/>`__
2
3 .. _v1.27.0:
4
5 1.27.0 - 2024-09-06
6 -------------------
7
8 This release only contains build related changes/fixes and no API changes.
9
10 * Drop support for Python 3.8
11 * Add Windows wheels for Python 3.13
12 * Updated cairo in Windows wheels from 1.18.0 to 1.18.2
13 * Port PEP517/wheel build from setuptools to meson-python. This means setup.py
14 is gone. System packagers should not switch to wheel builds and continue using
15 meson directly.
16 * meson: install the package metadata to .dist-info/METADATA instead of .egg-info
17 * Drop arm64 Windows wheels again. pypa/cibuildwheel does not support cross
18 compiling with meson-python. They might be added back in the future if GitHub
19 Actions gains a native Windows runner with arm64 support.
20
21 .. _v1.26.1:
22
23 1.26.1 - 2024-06-21
24 -------------------
25
26 * Fix Surface.set_mime_data() with Python 3.13 :pr:`366`
27 This also fixes the test suite with Python 3.13b2.
28 * Update vendored Windows wheel dependencies :pr:`370`
29
30 .. _v1.26.0:
31
32 1.26.0 - 2024-02-11
33 -------------------
34
35 This release only contains build related changes/fixes and no API changes.
36
37 * Bump minimum required meson version from 0.56.0 to 0.64.0 :pr:`346`
38 * Various meson related cleanups :pr:`350`
39 * Fix header file being installed to the wrong location with meson on some systems :pr:`350`
40 * Adds a new ``wheel`` meson build option as preparation for meson-python support :pr:`350` :pr:`345`
41 * Update dependencies (libpng, pixman, zlib) of the Windows wheels :pr:`358`
42 * Various maintenance related updates :pr:`360` :pr:`359` :pr:`361` :pr:`362`
43
44 .. _v1.25.1:
45
46 1.25.1 - 2023-10-21
47 -------------------
48
49 * Fix a crash with pypy3.10 :pr:`344`
50 * Fix the build with CPython 3.13.0a1 :pr:`343`
51
52 .. _v1.25.0:
53
54 1.25.0 - 2023-09-26
55 -------------------
56
57 * Update to cairo 1.18.0 for the Windows wheel
58 * Provide a Windows arm64 wheel
59 * New APIs:
60
61 * :attr:`Status.SVG_FONT_ERROR` :pr:`334`
62 * :meth:`FontOptions.get_color_mode`, :meth:`FontOptions.set_color_mode`, :class:`ColorMode` :pr:`336`
63 * :meth:`FontOptions.set_color_palette`, :meth:`FontOptions.get_color_palette`, :attr:`COLOR_PALETTE_DEFAULT` :pr:`338`
64 * :meth:`FontOptions.set_custom_palette_color`, :meth:`FontOptions.get_custom_palette_color` :pr:`339`
65 * :attr:`TAG_CONTENT`, :attr:`TAG_CONTENT_REF` :pr:`340`
66 * :meth:`Pattern.get_dither`, :meth:`Pattern.set_dither`, :class:`Dither` :pr:`341`
67
68 .. _v1.24.0:
69
70 1.24.0 - 2023-06-19
71 -------------------
72
73 * Dropped Python 3.7 support
74 * Bumped meson version requirement from 0.53.0 to 0.56.0
75 * Various cairo dependency updates for the Windows wheel build
76 * examples: update to GTK4 :pr:`307`
77 * examples: add a clip_image example :pr:`316`
78 * docs: fix the build with Sphinx 6 :pr:`318`
79 * Various code cleanups :pr:`306`
80 * Added Python 3.12 Windows wheels
81
82 .. _v1.23.0:
83
84 1.23.0 - 2022-11-28
85 -------------------
86
87 Reminder to distro packagers: Building/installing pycairo using setup.py is
88 deprecated, please use meson instead.
89
90 * git: changed default branch from "master" to "main"
91 * Windows: Update the cairo version included in the wheels from 1.17.2 to 1.17.6 :pr:`243`
92 * docs: Document how to look up pycairo headers without loading the module :pr:`300`
93 * tests: don't error out if cairo wasn't built with all features :pr:`293`
94 * New APIs:
95
96 * :attr:`Status.DWRITE_ERROR` :pr:`294`
97 * :attr:`Format.RGB96F`, :attr:`Format.RGBA128F` :pr:`295`
98 * :attr:`PDFVersion.VERSION_1_6`, :attr:`PDFVersion.VERSION_1_7` :pr:`296`
99 * :attr:`HAS_DWRITE_FONT` :pr:`297`
100 * :meth:`Context.set_hairline`, :meth:`Context.get_hairline` :pr:`298`
101 * :meth:`PDFSurface.set_custom_metadata` :pr:`299`
102
103 .. _v1.22.0:
104
105 1.22.0 - 2022-11-19
106 -------------------
107
108 * Officially support Python 3.11 :pr:`285`
109 * PDFSurface.version_to_string(): Fix crash with negative versions :pr:`279`
110 * typing: ImageSurface.get_stride() returns an int :pr:`282`
111 * typing: Fix incorrect interface for Matrix constructor :pr:`271`
112 * typing: Use Generic for Context :pr:`274`
113 * docs: some cairo.Context fixes :pr:`276`
114 * docs: try to make create_from_png/write_to_png more clear :pr:`261`
115 * docs: add an example for how to convert a surface to pillow :pr:`281`
116 * docs: cairo.Format.RGB24: document that unused bytes may be overwritten :pr:`289`
117 * tests: don't depend on specific ref counts :pr:`291`
118 * tests: compatibility fixes for cairo 1.17.6 :pr:`264`
119
120 .. _v1.21.0:
121
122 1.21.0 - 2022-03-07
123 -------------------
124
125 * Require Python 3.7+ :pr:`250`
126 * Require meson 0.53+
127 * Using `setup.py` directly to build/install pycairo is deprecated.
128 Use meson instead.
129 * `setup.py` now requires setuptools. Previously it was optional.
130 * The complete API reference is now included in the typing stubs, so it can be consumed/shown by IDEs. :pr:`236` :pr:`252`
131
132 .. _v1.20.1:
133
134 1.20.1 - 2021-06-03
135 -------------------
136
137 * Use poetry for development :pr:`232`
138 * setup.py: Respect the PKG_CONFIG environment variable :pr:`235`
139 * Make import_cairo inline in addition to static :pr:`224`
140 * docs: Fix example in Pattern.set_filter() docs :pr:`221`
141 * docs: Fix build with newer sphinx :pr:`222`
142 * docs: Fix NumPy width, height-conventions in examples :pr:`231`
143 * docs: Last parameter of rel_curve_to should be dy3, not dy4 :pr:`230`
144 * mypy: Fixes for mypy 0.800+ :pr:`233`
145 * mypy: Don't run mypy via pytest :pr:`234`
146
147 .. _v1.20.0:
148
149 1.20.0 - 2020-10-05
150 -------------------
151
152 * Require Python 3.6+ :pr:`201`
153 * Require cairo 1.15.10+ :pr:`204`
154 * docs: support Sphinx 3.0 :pr:`207`
155 * meson: add 'tests' option to skip tests :pr:`188`
156 * Windows: build wheels :pr:`197`
157 * Add support for Python 3.9 and 3.10 :pr:`198` :pr:`202`
158 * examples: add a Jupyter Notebook example :pr:`181`
159 * Raise an error early when being passed a file object not opened in binary mode :pr:`205`
160 * Add a pyproject.toml file :pr:`206`
161
162
163 .. _v1.19.1:
164
165 1.19.1 - 2020-02-16
166 -------------------
167
168 * docs: Add moderngl in the integration section. :pr:`174` (:user:`Einar Forselv <einarf>`)
169 * Support os.PathLike with PyPy3 >= 7.3.0
170
171
172 .. _v1.19.0:
173
174 1.19.0 - 2020-01-23
175 -------------------
176
177 * Python 2 is no longer supported :pr:`172`
178 * Add machine-readable license statement :pr:`158` (:user:`Maxim Ivanov <ulidtko>`)
179 * travis-ci: Manually set sysroot so correct SDK is used (:user:`Stuart Axon <stuaxo>`)
180 * Support Python 3.8 on Windows (because of DLL lookup changes)
181 * Fix wrong type for set_dash() offset parameter in the docs/types.
182
183
184 .. _v1.18.2:
185
186 1.18.2 - 2019-10-24
187 -------------------
188
189 * Fix a minor compatibility issue with Python 3.8 (fixes the test suite)
190
191
192 .. _v1.18.1:
193
194 1.18.1 - 2019-04-19
195 -------------------
196
197 * meson: install .egg-info to platlib
198 * meson: fix configure error with meson 0.50 re absolute paths :pr:`145`
199 * PyPy: don't use PyOS_FSPath() with PyPy3.6, it's missing: https://foss.heptapod.net/pypy/pypy/-/issues/2961
200 * Docs fixes :pr:`134` (:user:`Matteo Italia <cvtsi2sd>`)
201
202
203 .. _v1.18.0:
204
205 1.18.0 - 2018-11-04
206 -------------------
207
208 Build:
209 * Dropped Python 3.3 support
210 * meson build requires meson >=0.47 (was >=0.46)
211 * Fix various build warnings with GCC8
212 * meson: Don't link against libpython on non-Windows systems :pr:`120`
213 * meson: Improve support for Visual Studio builds
214 :pr:`121` (:user:`Chun-wei Fan <fanc999>`)
215 * setup.py: Support specifying custom ``--pkgconfigdir``
216 :pr:`127` (:user:`Michał Górny <mgorny>`)
217
218 Fixes:
219 * docs: Remove a broken link :pr:`124` (:user:`Nik Nyby <[email protected]>`)
220 * typing: Add missing annotations for __enter__/__exit__ :pr:`126`
221
222 New API:
223 Some are only available when building with newer cairo versions, see the
224 linked API docs for details.
225
226 * :data:`CAIRO_VERSION`, :data:`CAIRO_VERSION_STRING`,
227 :data:`CAIRO_VERSION_MAJOR`, :data:`CAIRO_VERSION_MINOR`,
228 :data:`CAIRO_VERSION_MICRO`
229 * :attr:`Status.TAG_ERROR`, :attr:`Status.FREETYPE_ERROR`,
230 :attr:`Status.PNG_ERROR`, :attr:`Status.WIN32_GDI_ERROR`
231 * :class:`SVGUnit`, :class:`PDFMetadata`, :class:`PDFOutlineFlags`
232 * :meth:`FontOptions.set_variations`, :meth:`FontOptions.get_variations`
233 * :meth:`Context.tag_begin`, :meth:`Context.tag_end`,
234 :data:`TAG_DEST`, :data:`TAG_LINK`
235 * :meth:`PDFSurface.set_page_label`, :meth:`PDFSurface.set_metadata`,
236 :meth:`PDFSurface.set_thumbnail_size`, :meth:`PDFSurface.add_outline`,
237 :data:`PDF_OUTLINE_ROOT`
238 * :meth:`SVGSurface.set_document_unit`, :meth:`SVGSurface.get_document_unit`
239 * :data:`MIME_TYPE_CCITT_FAX`, :data:`MIME_TYPE_CCITT_FAX_PARAMS`,
240 :data:`MIME_TYPE_EPS`, :data:`MIME_TYPE_EPS_PARAMS`,
241 :data:`MIME_TYPE_JBIG2`, :data:`MIME_TYPE_JBIG2_GLOBAL`,
242 :data:`MIME_TYPE_JBIG2_GLOBAL_ID`
243
244
245 .. _v1.17.1:
246
247 1.17.1 - 2018-07-07
248 -------------------
249
250 * `Meson <https://mesonbuild.com/>`__ support (>=0.46). :bug:`114`
251
252
253 .. _v1.17.0:
254
255 1.17.0 - 2018-04-15
256 -------------------
257
258 * :class:`cairo.Surface` and :class:`cairo.Device` can now be used as context
259 managers. :bug:`103`
260 * Fix a leak when a cairo error was raised.
261 * Fix a leak when a mapped surface was GCed instead of unmapped.
262 * Make it possible to use the C API with Python 3 outside of the compilation
263 unit doing the import by defining ``PYCAIRO_NO_IMPORT``. :bug:`110`
264 * Implement PEP 561 (added a py.typed marker)
265
266
267 .. _v1.16.3:
268
269 1.16.3 - 2018-02-27
270 -------------------
271
272 * Ship Python type annotation stubs. They are currently supported by mypy and
273 PyCharm. :bug:`99` :pr:`101`
274
275
276 .. _v1.16.2:
277
278 1.16.2 - 2018-02-10
279 -------------------
280
281 * setup.py: Some fixes for Debian pybuild quirks. :bug:`98`
282
283
284 .. _v1.16.1:
285
286 1.16.1 - 2018-02-06
287 -------------------
288
289 * setup.py: correctly install pkgconfig into /usr/lib* again.
290 To make JHBuild on Fedora work the following patch is needed:
291 https://bugzilla.gnome.org/show_bug.cgi?id=793216
292
293
294 .. _v1.16.0:
295
296 1.16.0 - 2018-02-05
297 -------------------
298
299 * Add a :func:`get_include` function which returns the compiler include path
300 needed for interfacing with the Pycairo C API :bug:`92`
301 * Note for packagers: The default header installation path has changed, but a
302 compat header is installed to the old location to prevent breakage in case
303 anyone has hardcoded the old path instead of using pkg-config.
304 Just in case anyone is wondering why there are two header files now.
305
306
307 .. _v1.15.6:
308
309 1.15.6 - 2018-01-30
310 -------------------
311
312 * Experimental PyPy and PyPy3 support :bug:`90`
313
314
315 .. _v1.15.5:
316
317 1.15.5 - 2018-01-29
318 -------------------
319
320 * Support Unicode paths under Windows with cairo 1.15.10+ :pr:`87`
321 * Don't include the pkg-config file when building a wheel :bug:`83`
322
323
324 .. _v1.15.4:
325
326 1.15.4 - 2017-11-08
327 -------------------
328
329 Fixes:
330 * Fix some enum conversation errors with (unused) large and negative values.
331 :pr:`81`
332
333 Tests:
334 * Fix a rare test error :pr:`80` (:user:`Sergei Trofimovich <trofi>`)
335
336
337 .. _v1.15.3:
338
339 1.15.3 - 2017-09-17
340 -------------------
341
342 Fixes:
343 * setup.py: Install pkgconfig file into /usr/share/pkgconfig to work around
344 JHBuild on Fedora not picking it up.
345 * Fix tests on big endian machines. :bug:`75`
346 * Support building with MSVC :pr:`72` (:user:`Chun-wei Fan <fanc999>`)
347
348 Tests:
349 * Test MSVC builds on appveyor
350
351
352 .. _v1.15.2:
353
354 1.15.2 - 2017-09-03
355 -------------------
356
357 Fixes:
358 * setup.py: Install pkgconfig file to the same library prefix that Python
359 uses. (/usr/lib64 instead of /usr/lib under Fedora for example) :bug:`70`
360 :pr:`71` (:user:`Sander Sweers <infirit>`)
361
362
363 .. _v1.15.1:
364
365 1.15.1 - 2017-08-19
366 -------------------
367
368 Fixes:
369 * Improved support for Python filesystem paths including
370 :class:`os.PathLike`. See :class:`_PathLike` for details.
371 * Various minor fixes
372
373 Changes:
374 * Expose :class:`cairo.Path`
375
376 Tests:
377 * Improved test coverage from ~70% to ~90%
378
379
380 .. _v1.15.0:
381
382 1.15.0 - 2017-07-24
383 -------------------
384
385 New Features:
386 * Add :meth:`Surface.map_to_image` and :meth:`Surface.unmap_image` :bug:`51`
387 * Add :class:`RasterSourcePattern` :bug:`48`
388 * Add :class:`Glyph` :bug:`53`
389 * Add :class:`Rectangle` :bug:`54`
390 * Add :class:`TextCluster` :bug:`61`
391 * Add :meth:`ScaledFont.text_to_glyphs` and :meth:`ScaledFont.glyph_extents`
392 * Add :meth:`Context.show_text_glyphs`
393 * Add :class:`TextExtents` :bug:`62`
394
395 Changes:
396 * Pycairo instances wrapping the same underlying cairo object now hash and
397 compare equally e.g. ``context.get_target() == context.get_target()``
398 * Functions which returned a cairo error with :attr:`Status.NO_MEMORY` no
399 longer raise :exc:`python3:MemoryError`, but a subclass of :exc:`Error`
400 and :exc:`python3:MemoryError`. Similarly errors with
401 :attr:`Status.READ_ERROR` and :attr:`Status.WRITE_ERROR` no longer raise
402 :exc:`python3:IOError`, but a subclass of :exc:`Error` and
403 :exc:`python3:IOError`. :bug:`55`
404 * Some functions which previously returned a tuple now return a tuple
405 subclass like :class:`Rectangle`, :class:`Glyph`, :class:`TextCluster` and
406 :class:`TextExtents`
407
408
409 .. _v1.14.1:
410
411 1.14.1 - 2017-07-24
412 -------------------
413
414 Fixes:
415 * Fix a crash with :meth:`Surface.get_device` :bug:`57`
416
417
418 .. _v1.14.0:
419
420 1.14.0 - 2017-07-12
421 -------------------
422
423 General:
424 * Requires at least cairo 1.13.1 (The snapshop in Ubuntu 14.04)
425
426 Tests:
427 * Optional `Hypothesis <https://hypothesis.readthedocs.io>`__ tests.
428
429 New Features:
430 * Add :meth:`Surface.set_device_scale` and :meth:`Surface.get_device_scale`.
431 :pr:`44` (:user:`Sander Sweers <infirit>`)
432 * Add :class:`Device` :pr:`45`
433 * Add :meth:`Surface.get_device` :pr:`45`
434 * Add :class:`ScriptDevice` and :class:`ScriptMode` :pr:`46`
435 * Add :class:`ScriptSurface` :bug:`17`
436 * Add :attr:`Status.JBIG2_GLOBAL_MISSING`
437 * Add :meth:`Format.stride_for_width`
438 * Add :class:`TextClusterFlags` and :class:`SurfaceObserverMode`
439 * Add :meth:`Gradient.get_color_stops_rgba`
440 * Add :class:`TeeSurface`
441 * Add :class:`MeshPattern`
442
443
444 .. _v1.13.4:
445
446 1.13.4 - 2017-07-12
447 -------------------
448
449 Fixes:
450 * Fix a rare crash with :meth:`get_data() <ImageSurface.get_data>` under
451 Python 3 (1.13.3 regression).
452
453
454 .. _v1.13.3:
455
456 1.13.3 - 2017-06-01
457 -------------------
458
459 Fixes:
460 * Fix ImageSurface leaking in case :meth:`get_data() <ImageSurface.get_data>` is used under Python 3.
461 :bug:`41`
462
463 Documentation:
464 * Add Pillow to ImageSurface example. :pr:`40` (:user:`Stuart Axon <stuaxo>`)
465 * Describe Freetype-py intergration. :bug:`25` :pr:`43`
466 (:user:`Hin-Tak Leung <HinTak>`)
467
468
469 .. _v1.13.2:
470
471 1.13.2 - 2017-05-21
472 -------------------
473
474 Fixes:
475 * Fix pip failing to install pycairo in some cases. :bug:`39`
476
477 Testing:
478 * Added continuous testing for Windows using MSYS2 and appveyor. :bug:`19`
479
480
481 .. _v1.13.1:
482
483 1.13.1 - 2017-05-07
484 -------------------
485
486 Fixes:
487 * setup.py install: Fix generated pkg-config file if ``--home`` or
488 ``--user`` is specified. :bug:`34`
489 * Fix a build error on macOS Sierra. :pr:`36`
490 (:user:`Nicolas P. Rougier <rougier>`)
491 * examples: Fix snippet examples when .pyc files are present. :bug:`35`
492
493 Documentation:
494 * Add Pyglet integration example. :pr:`33` (:user:`Stuart Axon <stuaxo>`)
495
496
497 .. _v1.13.0:
498
499 1.13.0 - 2017-05-03
500 -------------------
501
502 New Features:
503 * The buffer returned by :meth:`ImageSurface.get_data` under Python 2 now
504 implements the character buffer interface to make it work with
505 pygame.image.frombuffer(). :pr:`29`
506 * All C enum types now have their own corresponding Python enum type:
507 :class:`Antialias`, :class:`Content`, :class:`Extend`, :class:`FillRule`,
508 :class:`Filter`, :class:`FontSlant`, :class:`FontWeight`, :class:`Format`,
509 :class:`HintMetrics`, :class:`HintStyle`, :class:`LineCap`,
510 :class:`LineJoin`, :class:`Operator`, :class:`PDFVersion`,
511 :class:`PSLevel`, :class:`PathDataType`, :class:`RegionOverlap`,
512 :class:`SVGVersion`, :class:`Status`, :class:`SubpixelOrder`. :bug:`26`
513
514 All relevant constants are now an alias to attributes of those types e.g.
515 :data:`ANTIALIAS_DEFAULT` is the same as :attr:`Antialias.DEFAULT`.
516
517 All functions returning enum values now return instances of the new types
518 e.g. :meth:`Context.get_antialias` returns a :class:`Antialias`.
519
520 :attr:`Error.status` is now a :class:`Status`.
521 * All included examples now work with Python 2 & 3
522 * All included examples using GTK+ have been ported to GTK+ 3/PyGObject 3
523
524 Fixes:
525 * Fix the signature of the :class:`ImageSurface` buffer interface for Python 2
526 (int -> Py_ssize_t)
527 * setup.py: Ensure "-fno-strict-aliasing" is used with Python 2.
528
529 Testing:
530 * Added travis-ci tests for flake8 and sphinx. :pr:`30`, :pr:`32`
531 * The test suite now has optional tests for numpy and pygame integration.
532
533
534 .. _v1.12.0:
535
536 1.12.0 - 2017-04-18
537 -------------------
538
539 General:
540 * Require cairo 1.12.0
541 * Use C90 and enforce it on travis-ci. :bug:`5`, :fdobug:`22940`
542
543 Constants:
544 * Add various new cairo.OPERATOR_*, cairo.ANTIALIAS_* and
545 cairo.FORMAT_* constants. :bug:`1`
546 * Add :data:`HAS_MIME_SURFACE` and cairo.MIME_TYPE_*. :bug:`7`,
547 :fdobug:`58771`
548 * Add cairo.PDF_VERSION_*. :pr:`16`
549 * Add cairo.SVG_VERSION_*
550
551 :exc:`Error`:
552 * Add a :data:`Error.status` attribute exposing cairo.STATUS_*
553 * Add :exc:`CairoError` alias for :exc:`Error` for cairocffi compatibility
554
555 :class:`Matrix`:
556 * Expose matrix components as read/write properties. e.g. :data:`Matrix.xx`
557 * Fix type checking of the multiplication operator under
558 Python 3. :bug:`8`, :fdobug:`89162` (Lawrence D'Oliveiro)
559
560 :class:`Surface`:
561 * Add :meth:`Surface.set_mime_data`. :bug:`7`, :fdobug:`58771`
562 * Add :meth:`Surface.get_mime_data`. :bug:`7`, :fdobug:`58771`
563 * Add :meth:`Surface.supports_mime_type`. :bug:`7`, :fdobug:`58771`
564 * Add :meth:`Surface.create_for_rectangle`. :pr:`13`
565 * Add :meth:`Surface.create_similar_image`. :pr:`15`
566 * Add :meth:`Surface.has_show_text_glyphs`
567 * Fix crash when the surface wrapper gets deallocated before the surface
568 object. :bug:`11`
569
570 :class:`Context`:
571 * Add :meth:`Context.in_clip`. :pr:`14`
572
573 :class:`PDFSurface`:
574 * Add :meth:`PDFSurface.restrict_to_version`. :pr:`16`
575 * Add :meth:`PDFSurface.get_versions`. :pr:`16`
576 * Add :meth:`PDFSurface.version_to_string`. :pr:`16`
577
578 :class:`SVGSurface`:
579 * Add :meth:`SVGSurface.restrict_to_version`
580 * Add :meth:`SVGSurface.get_versions`
581 * Add :meth:`SVGSurface.version_to_string`
582
583 :class:`XCBSurface`:
584 * Add :meth:`XCBSurface.set_size`
585
586 :class:`PSSurface`:
587 * Add :meth:`PSSurface.get_levels`
588 * Add :meth:`PSSurface.level_to_string`
589
590 :class:`Pattern`:
591 * Add :meth:`Pattern.set_filter`
592 * Add :meth:`Pattern.get_filter`
593
594 :class:`RecordingSurface`:
595 * Add :meth:`RecordingSurface.get_extents`
596
597 :class:`FontOptions`:
598 * Implement ``__eq__`` and ``__ne__``
599 * Add :meth:`FontOptions.copy`
600 * Add :meth:`FontOptions.hash`
601 * Add :meth:`FontOptions.equal`
602 * Add :meth:`FontOptions.merge`
603
604 :class:`ScaledFont`:
605 * Add :meth:`ScaledFont.get_ctm`
606 * Add :meth:`ScaledFont.get_font_matrix`
607 * Add :meth:`ScaledFont.get_font_options`
608
609
610 .. _v1.11.1:
611
612 1.11.1 - 2017-04-12
613 -------------------
614
615 This release fixes an ABI breakage. I missed that the original pycairo master
616 had already broken ABI compared to 1.10.0.
617
618
619 .. _v1.11.0:
620
621 1.11.0 - 2017-04-09
622 -------------------
623
624 This version is based on the Python 2 version of pycairo 1.10.0 and is API/ABI
625 compatible with both py2cairo 1.10.0 and py3cairo 1.10.0.
626
627 General Changes:
628 * Requires cairo 1.10.2+
629 * Switch to semantic versioning
630 * Switch build system to distutils/setup.py (xpyb integration can be
631 enabled with passing ``--enable-xpyb`` to setup.py build)
632 * Moved to GitHub: https://github.com/pygobject/pycairo
633
634 New Features:
635 * Python 3 support (API/ABI compatible with py3cairo 1.10.0) including
636 support for :exc:`cairo.Error`, :meth:`cairo.ImageSurface.get_data` and
637 :meth:`cairo.ImageSurface.create_for_data`, which were missing in
638 py3cairo.
639 * :class:`cairo.RecordingSurface` (:fdobug:`36854`,
640 `Torsten Landschoff <[email protected]>`__)
641 * :class:`cairo.Region`, :class:`cairo.RectangleInt` and
642 cairo.REGION_OVERLAP_*
643 (:fdobug:`44336`, `Bug Fly <[email protected]>`__)
644
645 Bug Fixes:
646 * Fix crash when read()/write() methods of file objects passed to pycairo
647 raise exceptions.
648 * Fix possible value truncation of handles passed to Win32Surface and
649 Win32PrintingSurface on 64bit Windows. :fdobug:`57493`
650
651
652 1.10.0 - 2011-05-01
653 -------------------
654
655 General Changes:
656 py2cairo 1.10.0 requires cairo 1.10.0 (or later).
657
658 New Constants:
659 cairo.FORMAT_RGB16_565
660
661 Bug Fixes:
662 * context.get_source().get_surface() fails :fdobug:`33013`
663 * Add support for './waf configure --libdir=XXX' :fdobug:`30230`
664
665 Documentation Changes:
666 * Upgrade to using Sphinx 1.0.7.
667 * Include html documentation in the pycairo archive file.
668
669 Build Changes:
670 * Update waf to 1.6.3
671 * Remove setup.py
672
673 Other Changes:
674 * Improve/simplify unicode filename support.
675 * Improve/simplify unicode text support.
676
677
678 1.8.10 - 2010-05-20
679 -------------------
680
681 General Changes:
682 Pycairo 1.8.10 requires cairo 1.8.10 (or later).
683
684 New Classes/Types:
685 * Win32PrintingSurface
686 * XCBSurface - add XCB support using xpyb
687
688 Bug Fixes:
689 * Fix for libtool 2.2 (:fdobug:`27974`).
690 * Mingw32 and pypy fixes (:fdobug:`25203`).
691
692 Other Changes:
693 Tests updated.
694
695 The Win32PrintingSurface and XCBSurface changes mean that pycairo 1.8.10 is
696 not binary compatible with pycairo 1.8.8. So modules that use the pycairo C
697 API (like pygtk) will need to be recompiled to use pycairo 1.8.10.
698
699
700 1.8.8 - 2009-08-26
701 ------------------
702
703 General Changes:
704 * Pycairo 1.8.8 requires cairo 1.8.8 (or later).
705 * Move from CVS to git.
706 * Add support for the waf build tool.
707
708 Updated Methods:
709 * The PDF/PS/SVGSurface constructors now accept None as a filename.
710
711
712 1.8.6 - 2009-06-25
713 ------------------
714
715 General Changes:
716 Pycairo 1.8.6 requires cairo 1.8.6 (or later)
717
718 Bug Fixes:
719 * ImageSurface.create_from_png _read_func fix
720 * ToyFontFace type fix
721 * :fdobug:`19221`: restore cairo.Matrix '*' operator to the way it
722 originally worked.
723
724 Other Changes:
725 Documentation completed.
726
727
728 1.8.4 - 2009-03-19
729 ------------------
730
731 General Changes:
732 Pycairo 1.8.4 requires cairo 1.8.4 (or later) and Python 2.6
733
734 Bug Fixes:
735 * 20674: Add get/set_extend for Gradient Patterns
736
737 New Classes:
738 cairo.ToyFontFace
739
740 New Methods:
741 | Pattern.get_extend
742 | Pattern.set_extend
743 | ToyFontFace.get_family
744 | ToyFontFace.get_slant
745 | ToyFontFace.get_weight
746
747 Deleted Methods:
748 | SurfacePattern.get_extend
749 | SurfacePattern.set_extend
750
751 Other Changes:
752 Threading for surfaces with stream functions has been reenabled.
753 Documentation updates.
754
755
756 1.8.2 - 2009-01-15
757 ------------------
758
759 Pycairo 1.8.0 resulted in crashes for some applications using threads. So
760 upgrading to 1.8.2 is recommended for threaded applications.
761
762 Bug Fixes:
763 * :fdobug:`19287`: Threading support results in crashes in
764 cairo.ImageSurface
765
766 New Methods:
767 Context.set_scaled_font
768
769 API Changes:
770 Matrix multiplication::
771
772 old code: matrix3 = matrix1 * matrix2
773 new equivalent code: matrix3 = matrix1.multiply(matrix2)
774 matrix3 = matrix1 * matrix2
775 is now equivalent to matrix3 = matrix2.multiply(matrix1)
776 which is consistent with standard matrix multiplication.
777
778
779 1.8.0 - 2008-12-15
780 ------------------
781
782 General Changes:
783 Pycairo 1.8.0 requires cairo 1.8.0 (or later).
784 Add documentation (available separately)
785
786 Bug Fixes:
787 * :fdobug:`18101`: Add support for threading
788 * :fdobug:`18947`: cairo.SurfacePattern should INCREF the used surface
789
790 New Methods:
791 | ScaledFont.get_scale_matrix
792 | Surface.mark_dirty_rectangle
793 | Surface.set_fallback_resolution
794
795 New Constants:
796 | cairo.EXTEND_PAD
797 | cairo.HAS_IMAGE_SURFACE
798 | cairo.HAS_USER_FONT
799
800 API Changes:
801 * Surface.mark_dirty: no longer accepts keyword arguments with default
802 values.
803 * PycairoPattern_FromPattern (C API): has a new 'base' argument - to fix
804 :fdobug:`18947`.
805
806 Other Changes:
807 Allow unknown cairo Pattern/Surface types to use the pycairo base
808 Pattern/Surface type.
809
810
811 1.6.4 - 2008-08-18
812 ------------------
813
814 General changes:
815 Pycairo 1.6.4 requires cairo 1.6.4 (or later).
816 requires Python 2.5 (or later).
817
818 Bug fixes:
819 :fdobug:`16112`: Fix win32 'python setup.py ...' build -- use double quotes
820
821 New Methods:
822 | Context.has_current_point
823 | Context.path_extents
824 | ImageSurface.format_stride_for_width
825 | PSSurface.get_eps
826 | PSSurface.set_eps
827 | PSSurface.ps_level_to_string
828 | PSSurface.restrict_to_level
829 | Surface.copy_page
830 | Surface.show_page
831
832 New Constants:
833 cairo.PS_LEVEL_2, cairo.PS_LEVEL_3
834
835 Other changes:
836 test/pygame-test1.py, test/pygame-test2.py : pygame tests
837
838 examples/cairo_snippets/snippets/ellipse.py : Update
839 so line-width is a constant width in device-space not user-space
840
841
842 1.4.12 - 2007-12-13
843 -------------------
844
845 General changes:
846 Pycairo 1.4.12 requires cairo 1.4.12 (or later).
847 requires Python 2.4 (or later).
848
849 Bug fixes:
850 * :fdobug:`10006`: update autogen.sh to support automake >= 1.10
851 * :fdobug:`13460`: use python-config to get python includes
852
853 Other changes:
854 * allow cairo.Context to be subclassed
855 * create a 'doc' subdirectory and start a FAQ file
856
857
858 1.4.0 - 2007-03-14
859 ------------------
860
861 General changes:
862 Pycairo 1.4.0 requires cairo 1.4.0 (or later).
863
864 New methods:
865 | Context.clip_extents
866 | Context.copy_clip_rectangles
867 | Context.get_dash
868 | Context.get_dash_count
869 | Context.get_scaled_font
870 | Context.glyph_extents
871 | Context.glyph_path
872 | Context.show_glyphs
873 | LinearGradient.get_linear_points
874 | RadialGradient.get_radial_circles
875 | SolidPattern.get_rgba
876 | SurfacePattern.get_surface
877
878 Deleted methods:
879 ImageSurface.create_for_array
880 Remove Numeric Python support, since Numeric has been made obsolete by
881 numpy, and numpy data can be read using ImageSurface.create_for_data.
882
883 Other changes:
884 the module cairo.gtk has been removed (pygtk 2.7.0 onwards has cairo
885 support built in).
886
887
888 1.2.6 - 2006-11-27
889 ------------------
890
891 * Pycairo 1.2.6 requires cairo 1.2.6 (or later).
892 * mingw32 compiler fixes (Cedric Gustin)
893 * setup.py improvements (Cedric Gustin)
894 * ImageSurface.get_data() new method added
895 ImageSurface.get_data_as_rgba() method removed
896
897
898 1.2.2 - 2006-08-21
899 ------------------
900
901 * Pycairo requires cairo 1.2.2 (or later).
902 * setup.py has been updated to allow installation by executing
903 $ python setup.py install
904 * examples/cairo_snippets/snippets/gradient_mask.py
905 A new example to demonstrate pattern masks.
906 * The cairo.svg module has been removed because:
907
908 1) Cairo does not include SVG parsing, so this module does not belong
909 in pycairo.
910 2) libsvg-cairo (the underlying C library) is unmaintained.
911
912
913 1.2.0 - 2006-07-03
914 ------------------
915
916 General changes:
917 Pycairo has been updated to work with cairo 1.2.0.
918
919 New methods:
920 | Surface.set_fallback_resolution
921 | Surface_get_content
922 | ImageSurface_get_format
923 | Image_surface_get_stride
924
925 Deleted methods:
926 PDFSurface.set_dpi, PSSurface.set_dpi, SVGSurface.set_dpi
927 - replaced by Surface.set_fallback_resolution
928
929 Other changes:
930 cairo.FORMAT_RGB16_565 added
931
932
933 1.1.6 - 2006-05-29
934 ------------------
935
936 General changes:
937 Pycairo has been updated to work with cairo 1.1.6.
938
939 New objects:
940 SVGSurface
941
942 New methods:
943 | Context.get_group_target
944 | Context.new_sub_path
945 | Context.pop_group
946 | Context.pop_group_to_source
947 | Context.push_group
948 | Context.push_group_with_content
949 | FontOptions.get_antialias
950 | FontOptions.get_hint_metrics
951 | FontOptions.get_hint_style
952 | FontOptions.get_subpixel_order
953 | FontOptions.set_antialias
954 | FontOptions.set_hint_metrics
955 | FontOptions.set_hint_style
956 | FontOptions.set_subpixel_order
957 | PDFSurface.set_size
958 | PSSurface.dsc_begin_page_setup
959 | PSSurface.dsc_begin_setup
960 | PSSurface.dsc_comment
961 | PSSurface.set_size
962 | ScaledFont.get_font_face
963 | ScaledFont.text_extents
964 | Surface.get_device_offset
965 | XlibSurface.get_depth
966
967 Updated methods:
968 PDFSurface()/PSSurface() - can now write to file-like objects (like
969 StringIO).
970
971 surface.write_to_png() and ImageSurface.create_from_png() can now write to
972 file-like objects (like StringIO).
973
974 select_font_face, show_text, text_extents and text_path now accept unicode
975 objects.
976
977 Other changes:
978 misc bug fixes.
979
980 New examples:
981 | examples/cairo_snippets/snippets_svg.py
982 | examples/cairo_snippets/snippets/ellipse.py
983 | examples/cairo_snippets/snippets/group.py
984 | examples/svg/svgconvert.py
985
986
987 1.0.2 - 2005-10-11
988 ------------------
989
990 General changes:
991 Pycairo has been updated to work with cairo 1.0.2.
992
993 New cairo functions supported:
994 cairo.ImageSurface.create_for_data()
995
996 Updated functions:
997 ctx.set_source_rgba (r, g, b, a=1.0) now supports a default alpha argument
998
999 Other changes:
1000 cairo.Matrix now supports the Python sequence protocol, so you can do:
1001 xx, yx, xy, yy, x0, y0 = matrix
1002
1003
1004 1.0.0 - 2005-08-31
1005 ------------------
1006
1007 General changes:
1008 Pycairo has been updated to work with cairo 1.0.0.
1009
1010 New cairo functions supported:
1011 | cairo.cairo_version()
1012 | cairo.cairo_version_string()
1013 | PSSurface.set_dpi()
1014
1015 Patterns are now implemented in a class hierarchy, the new constructors are:
1016 | cairo.SolidPattern (r, g, b, a=1.0)
1017 | cairo.SurfacePattern (surface)
1018 | cairo.LinearGradient (x0, y0, x1, y1)
1019 | cairo.RadialGradient (cx0, cy0, radius0, cx1, cy1, radius1)
1020
1021 Updated functions:
1022 Surface.write_to_png() now accepts a file object as well as a filename
1023
1024 Updated examples:
1025 The gtk examples now work with pygtk >= 2.7.0 without requiring the
1026 cairo.gtk module
1027
1028 Bug Fixes:
1029 fix "initializer element is not constant" compiler warnings
1030
1031
1032 0.9.0 - 2005-08-10
1033 ------------------
1034
1035 General changes:
1036 Pycairo has been updated to work with cairo 0.9.0.
1037
1038 New cairo functions supported:
1039 | cairo_get_antialias
1040 | cairo_set_antialias
1041 | cairo_surface_mark_dirty_rectangle
1042 | cairo_surface_flush
1043
1044 Bug Fixes:
1045 * double buffering now works with the cairo.gtk module
1046
1047
1048 0.6.0 - 2005-08-01
1049 ------------------
1050
1051 This version has many changes which update Pycairo to the new cairo API. The
1052 change list is not duplicated here, instead see the cairo/NEWS file for full
1053 details of all these API changes.
1054
1055 Pycairo method names that were different from the underlying cairo function
1056 names have been changed to make Pycairo more closely follow cairo and so
1057 enable the cairo documentation to be used for writing Pycairo programs. NOTES
1058 has been updated to list the differences between the C API and the Pycairo
1059 API.
1060
1061 Context.copy_path() has been implemented, it returns a Path instance which
1062 supports the iterator protocol.
1063
1064 Python 2.3 is now required.
1065
1066 New examples:
1067 examples/warpedtext.py: shows usage of the Path iterator
1068
1069 examples/cairo_snippets/: shows many of the 'cairo-demo/cairo_snippets'
1070 examples
1071
1072 examples/gtk/png_view.py: example using cairo.ImageSurface.create_from_png()
1073
1074 General changes:
1075 Pycairo has been updated to work with cairo 0.6.0, including using cairo's
1076 new error handling scheme.
1077
1078 New features:
1079 cairo.CONTENT_COLOR, cairo.ALPHA, cairo.COLOR_ALPHA have been added for
1080 working with surfaces.
1081
1082 A new class cairo.FontOptions has been added.
1083
1084 cairo.ImageSurface.create_from_png() now accepts a filename string or a
1085 file object
1086
1087 New wrapper functions have been added for cairo_get_font_options,
1088 cairo_set_font_options and cairo_surface_get_font_options.
1089
1090
1091 0.5.1 - 2005-06-22
1092 ------------------
1093
1094 New features:
1095 * new class cairo.Win32Surface (Niki Spahiev)
1096 * cairo.HAS_WIN32_SURFACE, cairo.HAS_PS_SURFACE etc are defined to give
1097 access to the values from cairo-features.h
1098
1099 Fixes:
1100 * fix cairo_mask, cairo_mask_surface and cairo_stroke_preserve wrappers
1101 * compile properly against GTK+ 2.7 (Gustavo Carneiro)
1102 * other small fixes, including fixes for gcc 4.0 warnings
1103
1104
1105 0.4.0 - 2005-03-10
1106 ------------------
1107
1108 New cairo bindings:
1109 | cairo_font_extents
1110
1111 Bindings removed:
1112 | cairo_font_set_transform
1113 | cairo_font_current_transform
1114
1115 New examples:
1116 gtk/hangman.py
1117
1118 Other:
1119 Changed version numbering to correspond directly with the Cairo version
1120 Pycairo was developed to work with. So, for example, Pycairo version 0.4.0
1121 represents the Pycairo version that has been developed and tested with
1122 Cairo 0.4.0.
1123
1124
1125 0.1.4 - 2005-01-14
1126 ------------------
1127
1128 The Pycairo license has changed so that it is now dual-licensed under the LGPL
1129 and the MPL, the same as Cairo itself. For details see the COPYING file as
1130 well as COPYING-LGPL-2.1 and COPYING-MPL-1.1.
1131
1132 New cairo bindings:
1133 | cairo_pdf_surface_create
1134 | cairo_set_target_pdf
1135
1136 New libsvg-cairo bindings:
1137 | svg_cairo_parse
1138 | svg_cairo_parse_buffer
1139 | svg_cairo_render
1140 | svg_cairo_get_size
1141
1142 Other:
1143 * Added --without-pygtk configure option.
1144 * Renamed the Pycairo API _new() functions to _wrap() to allow _new() to
1145 * be used for python __new__ functions.
1146 * New examples: svg2png.py and svgview.py.
1147
1148
1149 0.1.3 - 2004-11-24
1150 ------------------
1151
1152 After the recent server compromise we discarded all unsigned
1153 snapshots. That left us without a pycairo snapshot.
1154
1155 Additionally, there were no tags in the source repository so I
1156 couldn't recreate the 0.1.2 snapshot, so here's a new 0.1.3 snapshot.
1157
1158 I apologize if I botched the version number or left something
1159 significant out of this announcement---I'm not the one who will
1160 usually be doing pycairo maintenance.
1161
1162 New bindings:
1163 | current_path
1164 | current_path_flat
1165 | current_font_extents
1166
1167 Changes:
1168 fill_extents,stroke_extents: Remove unnecessary args and
1169 change from a method to an attribute.
1170
1171 Other:
1172 Added two new examples: context-subclass.py and warpedtext.py