xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: CubicCurve2D in a Batik application
Date Thu, 08 Jul 2010 10:06:36 GMT
Hi Anjello,

Anjello <Anjelloatoz@gmail.com> wrote on 07/07/2010 11:58:17 AM:

> I develop a java application which uses batik, and I need to split a 
> at a specific location. What I try to do is to convert the svg into an 
> shape and do the splitting. It was succesful with the lines, however I 
> not understand how the offset parameters work in the CubicCurve2D 
object. (I
> am trying to use subdivide(double[] src, int srcoff, double[] left, int
> leftoff, double[] right, int rightoff) method)

        Those are offsets into the src, left, and right arrays.  The 
class doesn't let you split a curve at a specific location it only allows 
to subdivide a curve into two "equal" halves.  The offset parameters let 
allocate one large array and then store the subdivided cubics into that 

        You might want to look at Batik's 
class that offers a bit more flexibility in subdividing cubic curves. 
classes in that package use the methods to subdivide cubics for the text
wrapping code.

View raw message