You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Twister <tw...@bagend.eu.org> on 2006/06/13 15:20:52 UTC

ExtendedGeneralPath.clone() bug?

Hi,
I'm trying to use the clone function of ExtendedGeneralPath and it returns
me an empty path.

I looked at this function and saw this :

            result.values = new float[values.length];
            System.arraycopy(result.values, 0, values, 0, values.length);
            result.numVals = numVals;

            result.types = new int[types.length];
            System.arraycopy(result.types, 0, types, 0, types.length);
            result.numSeg = numSeg;

Am I wrong or the SRC and DEST arrays are inverted in the arraycopy calls ?
...


Regards.





---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org


Re: ExtendedGeneralPath.clone() bug?

Posted by Cameron McCormack <ca...@mcc.id.au>.
Hi.

Twister:
> I'm trying to use the clone function of ExtendedGeneralPath and it returns
> me an empty path.
> 
> I looked at this function and saw this :
> 
>             result.values = new float[values.length];
>             System.arraycopy(result.values, 0, values, 0, values.length);
>             result.numVals = numVals;
> 
>             result.types = new int[types.length];
>             System.arraycopy(result.types, 0, types, 0, types.length);
>             result.numSeg = numSeg;
> 
> Am I wrong or the SRC and DEST arrays are inverted in the arraycopy calls ?

You’re right!  This is now fixed in SVN.

Thanks,

Cameron

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org