Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8e9c89a

Browse files
committed
Changes for Merge consecutive rasterizations
Document user and api changes.
1 parent 7f9f32b commit 8e9c89a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Consecutive rasterized draws now merged
2+
---------------------------------------
3+
4+
Tracking of depth of raster draws has moved from
5+
`.backend_mixed.MixedModeRenderer.start_rasterizing` and
6+
`.backend_mixed.MixedModeRenderer.stop_rasterizing` into
7+
`.artist.allow_rasterization`. This means the start and stop functions are
8+
only called when the rasterization actually needs to be started and stopped.
9+
10+
The output of vector backends will change in the case that rasterized
11+
elements are merged. This should not change the appearance of outputs.
12+
13+
The renders in 3rd party backends are now expected to have
14+
``self._raster_depth`` and ``self._rasterizing`` initialized to ``0`` and
15+
``False`` respectively.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Consecutive rasterized draws now merged
2+
---------------------------------------
3+
4+
Elements of a vector output can be individually set to rasterized, using
5+
the ``rasterized`` keyword, or `~.artist.Artist.set_rasterized()`. This can
6+
be useful to reduce file sizes. For figures with multiple raster elements
7+
they are now automatically merged into a smaller number of bitmaps where
8+
this will not effect the visual output. For cases with many elements this
9+
can result in significantly smaller file sizes.
10+
11+
To ensure this happens do not place vector elements between raster ones.
12+
13+
To inhibit this merging set ``Figure.suppressComposite`` to True.

0 commit comments

Comments
 (0)