First, many thanks for the quick response and your patience. I On Tue, Dec 31, 2019 at 5:49 AM Tilman Hausherr <thaush...@t-online.de> wrote:
> Can we simplify this question and focus on one single thing? > > Is the core of the question that the circle on the bottom left is filled > with red color, but it shouldn't be? > Yes. I assume the red colour comes from the text fill already processed > > THat > > |PDGraphicsstroke:AWTfill:java.awt.Color[r=255,g=0,b=0] should be > ||PDGraphicsstroke:AWTfill:null| > || > > Yes. (I convert AWTFill: null to SVG:"none") ? > > If so, can you reproduce the whole thing with a PDF that has only that > circle? (I can create such a PDF for you) > It should probably have a single filled character preceding the circle since that is providing the fill colour. > Weird stuff: > > - your |strokePath() method is different on SO and on github| > > My bad in copying. I probably tried to simplify it. Are you happy to work from the Github code? Some questions which will clarify the process for me (and hopefully avoid wasting your time): * that the strategy of intercepting fillPath and strokePath and capturing the graphics attributes and path is viable? * that fillPath draws both fill and stroke in the AWT canvas (and that strokePath does the same) so that either may be called. This doesn't seem right * the calls were after " beginText ...endText" - does endText clear the stroke/fill attributes? * are fill, stroke and (Basic)Stroke (which provides lineWidth, etc.) the only states that need to be considered? I will tidy the Github code, create a simpler example (I export PDF from PPT, but could use Inkscape), and work from that. P. > > -- "I always retain copyright in my papers, and nothing in any contract I sign with any publisher will override that fact. You should do the same". Peter Murray-Rust Reader Emeritus in Molecular Informatics Unilever Centre, Dept. Of Chemistry University of Cambridge CB2 1EW, UK +44-1223-763069