SF.net SVN: matplotlib:[8454] trunk/matplotlib/agg24/include/ agg_rasterizer_cells_aa.h
Revision: 8454
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8454&view=rev
Author: mdboom
Date: 2010-06-22 16:00:55 + (Tue, 22 Jun 2010)
Log Message:
---
Debian Bug#585442: python-matplotlib: crashes when calling axis() after imshow()
This allows the C++ exception raised when Agg rendering complexity is exceeded
to percolate up correctly to a Python exception, rather than crashing the
interpreter.
Modified Paths:
--
trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h
Modified: trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h
===
--- trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h2010-06-21
21:41:19 UTC (rev 8453)
+++ trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h2010-06-22
16:00:55 UTC (rev 8454)
@@ -29,16 +29,15 @@
#ifndef AGG_RASTERIZER_CELLS_AA_INCLUDED
#define AGG_RASTERIZER_CELLS_AA_INCLUDED
+#include "CXX/Exception.hxx"
#include
#include
#include
#include "agg_math.h"
#include "agg_array.h"
-
namespace agg
{
-
//-rasterizer_cells_aa
// An internal class that implements the main rasterization algorithm.
// Used in the rasterizer. Should not be used direcly.
@@ -180,6 +179,11 @@
template
AGG_INLINE void rasterizer_cells_aa::add_curr_cell()
{
+static Py::Exception e(
+Py::OverflowError(
+"Agg rendering complexity exceeded. Consider downsampling or
decimating your data."));
+
+
if(m_curr_cell.area | m_curr_cell.cover)
{
if((m_num_cells & cell_block_mask) == 0)
@@ -187,8 +191,7 @@
if(m_num_blocks >= cell_block_limit) {
/* If this exception is thrown too often, one can
increase cell_block_limit */
-throw "Agg rendering complexity exceeded. "
-"Consider downsampling or decimating your data.";
+throw e;
}
allocate_block();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[8455] trunk/matplotlib/agg24/include/ agg_rasterizer_cells_aa.h
Revision: 8455
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8455&view=rev
Author: mdboom
Date: 2010-06-22 16:30:24 + (Tue, 22 Jun 2010)
Log Message:
---
Debian Bug#585442: python-matplotlib: crashes when calling axis() after imshow()
This allows the C++ exception raised when Agg rendering complexity is exceeded
to percolate up correctly to a Python exception, rather than crashing the
interpreter.
Fixes problem in last commit.
Modified Paths:
--
trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h
Modified: trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h
===
--- trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h2010-06-22
16:00:55 UTC (rev 8454)
+++ trunk/matplotlib/agg24/include/agg_rasterizer_cells_aa.h2010-06-22
16:30:24 UTC (rev 8455)
@@ -179,16 +179,15 @@
template
AGG_INLINE void rasterizer_cells_aa::add_curr_cell()
{
-static Py::Exception e(
-Py::OverflowError(
-"Agg rendering complexity exceeded. Consider downsampling or
decimating your data."));
-
-
if(m_curr_cell.area | m_curr_cell.cover)
{
if((m_num_cells & cell_block_mask) == 0)
{
if(m_num_blocks >= cell_block_limit) {
+static Py::Exception e(
+Py::OverflowError(
+"Agg rendering complexity exceeded. Consider
downsampling or decimating your data."));
+
/* If this exception is thrown too often, one can
increase cell_block_limit */
throw e;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib:[8456] trunk/matplotlib/src/_image.cpp
Revision: 8456 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8456&view=rev Author: mdboom Date: 2010-06-22 19:30:57 + (Tue, 22 Jun 2010) Log Message: --- Fix severe slowness with very high image magnification. Modified Paths: -- trunk/matplotlib/src/_image.cpp Modified: trunk/matplotlib/src/_image.cpp === --- trunk/matplotlib/src/_image.cpp 2010-06-22 16:30:24 UTC (rev 8455) +++ trunk/matplotlib/src/_image.cpp 2010-06-22 19:30:57 UTC (rev 8456) @@ -353,6 +353,7 @@ agg::rasterizer_scanline_aa<> ras; agg::scanline_u8 sl; + ras.clip_box(0, 0, numcols, numrows); //srcMatrix *= resizingMatrix; //imageMatrix *= resizingMatrix; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
