SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] backend_cairo.py clipping, bug in SVN

From: Michael D. <md...@st...> - 2009年04月29日 15:29:22
Yeah -- this looks like a bad merge from the branch. The branch's 
version of convert_path takes two arguments, the trunk takes three 
because it was updated to support path simplification routines which do 
their own transformation. The trunk has been updated to use the 
three-argument form consistently (r7069).
Mike
Michiel de Hoon wrote:
> Hi everybody,
>
> I believe a bug was introduced in revision 7002 of backend_cairo.py.
> This code, in two places, now calls RendererCairo.convert_path with two arguments (ctx and tpath), whereas RendererCairo.convert_path expects three arguments. In one other place, RendererCairo.convert_path is called (correctly) with three arguments. One example of the code containing the bug is
>
> tpath, affine = clippath.get_transformed_path_and_affine()
> ctx.new_path()
> affine = affine + Affine2D().scale(1.0, -1.0).translate(0.0, self.height)
> tpath = affine.transform_path(tpath)
> RendererCairo.convert_path(ctx, tpath)
>
> Before this revision, the corresponding code was 
>
> tpath, affine = path.get_transformed_path_and_affine()
> ctx.new_path()
> affine = affine + Affine2D().scale(1.0, -1.0).translate(0.0, self.renderer.height)
> RendererCairo.convert_path(ctx, path, affine) 	 
>
> RendererCairo.convert_path is defined as
>
> @staticmethod
> def convert_path(ctx, path, transform):
>
> so with three arguments. Either the calls to convert_path are incorrect, or convert_path should be updated to handle two arguments.
>
> --Michiel
>
>
> 
>
> ------------------------------------------------------------------------------
> Register Now & Save for Velocity, the Web Performance & Operations 
> Conference from O'Reilly Media. Velocity features a full day of 
> expert-led, hands-on workshops and two days of sessions from industry 
> leaders in dedicated Performance & Operations tracks. Use code vel09scf 
> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
> _______________________________________________
> Matplotlib-devel mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /