Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 481d820

Browse filesBrowse files
committed
Merge pull request #4231 from mdboom/fix-sketch-paths
Fix : Don't overflow buffer with sketch path. Closes #4230
2 parents e1bcf2b + 7be497e commit 481d820
Copy full SHA for 481d820

File tree

Expand file treeCollapse file tree

7 files changed

+12233
-41
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+12233
-41
lines changed

‎lib/matplotlib/backends/backend_svg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_svg.py
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,21 +540,23 @@ def option_image_nocomposite(self):
540540
else:
541541
return not rcParams['image.composite_image']
542542

543-
def _convert_path(self, path, transform=None, clip=None, simplify=None):
543+
def _convert_path(self, path, transform=None, clip=None, simplify=None,
544+
sketch=None):
544545
if clip:
545546
clip = (0.0, 0.0, self.width, self.height)
546547
else:
547548
clip = None
548549
return _path.convert_to_string(
549-
path, transform, clip, simplify, None, 6,
550+
path, transform, clip, simplify, sketch, 6,
550551
[b'M', b'L', b'Q', b'C', b'z'], False).decode('ascii')
551552

552553
def draw_path(self, gc, path, transform, rgbFace=None):
553554
trans_and_flip = self._make_flip_transform(transform)
554555
clip = (rgbFace is None and gc.get_hatch_path() is None)
555556
simplify = path.should_simplify and clip
556557
path_data = self._convert_path(
557-
path, trans_and_flip, clip=clip, simplify=simplify)
558+
path, trans_and_flip, clip=clip, simplify=simplify,
559+
sketch=gc.get_sketch_params())
558560

559561
attrib = {}
560562
attrib['style'] = self._get_style(gc, rgbFace)
Binary file not shown.
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.