10000 Merge pull request #5432 from mdboom/fix-segfault-in-text-drawing by jenshnielsen · Pull Request #5436 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Merge pull request #5432 from mdboom/fix-segfault-in-text-drawing #5436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Merge pull request #5432 from mdboom/fix-segfault-in-text-drawing
Don't draw text when it's completely clipped away
  • Loading branch information
jenshnielsen committed Nov 8, 2015
commit 51291360b4047986cc2608166b924d79c5497c6e
8 changes: 5 additions & 3 deletions src/_backend_agg.h
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,11 @@ inline void RendererAgg::draw_text_image(GCAgg &gc, ImageArray &image, int x, in
text.clip(clip);
}

for (int yi = text.y1; yi < text.y2; ++yi) {
pixFmt.blend_solid_hspan(text.x1, yi, (text.x2 - text.x1), gc.color,
&image(yi - (y - image.dim(0)), text.x1 - x));
if (text.x2 > text.x1) {
for (int yi = text.y1; yi < text.y2; ++yi) {
pixFmt.blend_solid_hspan(text.x1, yi, (text.x2 - text.x1), gc.color,
&image(yi - (y - image.dim(0)), text.x1 - x));
}
}
}
}
Expand Down
0