How do I draw part of parabola using iText ? Or how do I create quadratic bezier curves from cubic b

Posted by drasto on Stack Overflow See other posts from Stack Overflow or by drasto
Published on 2010-05-01T19:03:42Z Indexed on 2010/05/01 19:07 UTC
Read the original article Hit count: 345

Filed under:
|
|
|
|

I need to draw a shape whose boundaries are parts of parabola (that is quadratic bezier curves) using iText. I have found only method for drawing cubic bezier curves in PdfContentByte class.

So how do I draw quadratic bezier curves using iText ? One way would be to use method for cubic bezier curves. Is it possible to draw quadratic bezier curves as a cubic bezier curves (with 2 control points). I gues it is but I cannot make up the formula. If somebody states the formula tu "translate" cubic bezier curves to quadratic that would solve the problem. Any other ways to draw quadratic bezier(parts of parabola) curves in iText (and filled shapes made of them) is also the solution.

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about itext