This discussion is archived
3 Replies Latest reply: Mar 9, 2012 2:20 AM by 922380 RSS

clipping path problem

922380 Newbie
Currently Being Moderated
Hello, I'm in the process of rendering pdf, no matter the reasons; fonts, images and operators are all ok, except for the clipping path operators.

As Adobe and Sun worked together to build the java graphics rendering engine I see no reason for all other operators to work perfectly ' as is ' and not clipping path operators
Basically, all operations resume, given path and clipping path, to fill and stroke.

my stroke implementation


my fill implementation

          Area pathArea=new Area(transform.createTransformedShape(path));
          Area clippingPathArea=new Area(clippingPath);

First, I do not see why, despite based on same operands, the stroke operation do not render correctly if written like fill above. In other words, why clipping like fill do not stroke correctly.

Second, testing on different pdf do not always render correctly or do not always fail, I must be missing an important feature

In other words, what is the correct way to apply clipping path to stroke, fill and drawImage operations ?

Thank you very much for your time


  • Correct Answers - 10 points
  • Helpful Answers - 5 points