In message <[EMAIL PROTECTED]> you wrote: > Hi Mark,
> [EMAIL PROTECTED] wrote: >>> Also, out of curiousity, why are you overriding the createContext() method? >> >> We use a custom PaintContext in our PDF renderer to handle >> PatternColorspaces where the Pattern is also rotated or inverted. >> In PatternColorspaces a single titled image is drawn again and again >> to fill an area. Because the pattern needs to overlap and repeat >> correctly when rotated, you can not just use a standard TextPaint to >> just repeatedly draw it as it will not line up. > I didn't thoroughly follow the description you give here, it sounds like > a description of the TexturePaint object itself. In particular, the > TexturePaint is capable of tiling images in a rotated or otherwise > transformed coordinate space so I don't see where the differences are. The tiled image being used is rotated and the co-ordinates are inverted compared to Java2D. We have already altered the Transformation matrix to map PDFspace onto Java2D space. We then need to map the image onto 'PatternSpace'. We could not see how we could easily do this so we overrode createContext to create a single image, plotted the images onto this and then used the standard TexturePaint functionality. >> Our custom PaintContext creates a single image and works out the >> tiling repeat offsets so it is drawn correctly. > In any case you seem to be describing a situation where the TexturePaint > doesn't perform the operation you need it to perform. Fair enough, > TexturePaint may not meet everyone's needs. That is why it is just one > implementation of a general interface. It performs it brilliantly in most cases. It is just not called in the Apple implementation so our code never gets called. >> When we started to debug it on the Apple, our TexturePaint is >> instanced as we would expect, but createContext is never called. > The question then becomes, why are you creating a Paint implementation > by subclassing TexturePaint rather than simply implementing the Paint > interface directly in an unrelated class? Since there is only 1 method > in the Paint interface, you could simply change your class from "extends > TexturePaint" to "implements Paint" and you should be set, no? We will have a look. Regards, MArk =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA2D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".