[kde-edu]: Re: Kig exporters: fix for rational bezier curves
Maurizio Paolini
paolini at dmf.unicatt.it
Sun Apr 3 22:43:08 CEST 2011
It seems that we are now migrating kdeedu to git, and no svn commits
are allowed.
We must wait some time before committing patches.
Concerning the "ImpVisitor" object, I must confess that I have no
idea of their use and how they work. If there is someone that can
answer Raoul, he is welcome!
Maurizio
On Wed, Mar 30, 2011 at 05:57:46PM +0200, Raoul wrote:
> Hi,
>
>
> In a recent mail I wrote:
>
> > > And the rational bezier cuves do crash Kig when exporting
> > > to PSTricks, pgf/Tikz and Asy. But we can export to images
> > > and svg.
>
> Today I debugged this and found what I think is the reason.
> Although I'm no expert on such things it seems to me the cause
> is an endless call loop in the following two code parts:
>
> bezier_imp.cc:502:
>
> void RationalBezierImp::visit( ObjectImpVisitor* vtor ) const
> {
> vtor->visit( this );
> }
>
> And object_imp.cc:83
>
> void ObjectImpVisitor::visit( const ObjectImp* imp )
> {
> imp->visit( this );
> }
>
> The generic visit( const ObjectImp* imp ) is called because we
> have no specialization for RationalBezierImp Objects. I don't
> know why the generic function should call again imp->visit( this ) ...?
>
> If I add this specialized function the issue is fixed. The patch
> attached does this and overwrites the function for Asy/TikZ and PS
> exporters. Thus we can now export rational bezier curves :-)
>
> However the issue of course remains for other object types
> where there is no suitable visit function in the visitor.
> (I did not check if there are any more issues.)
>[...]
More information about the kde-edu
mailing list