Hear that? It's the sound of me banging my head on my desk. It took me nearly a day to work out the right formula to shorten a line by the right amount. This solution totally fixed the problem and I've just finished backing out all the Pythagoras calls. I sure know how to overcomplicate things. Thanks a bunch for the solution.
Michael Bishop -----Original Message----- From: Andrew Plotkin [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 5:18 PM To: [email protected] Subject: Re: "Marrying" Graphics2D and SVG. On Mon, 9 Jan 2006, Bishop, Michael W. CONTR J9C880 wrote: > Graphics2D seems to do things "wrong". If I set a stroke width of 4 and > start to draw a line, the line is started with the mouse "centered" in > the endpoint of the line. So the first "end point" of the line is > actually a 4x4 "box" with the mouse in the center. When the mouse is > released, Batik renders the line as starting where the mouse pointer > starts and ending where the mouse pointer ends. It results in a shorter > line because Graphics2D centers endpoints on the mouse while Batik > STARTS endpoints at the mouse. I think you want to change the "end cap" parameter on the Graphics2D stroke. You've got CAP_SQUARE, and you want CAP_BUTT. --Z "And Aholibamah bare Jeush, and Jaalam, and Korah: these were the borogoves..." * If the Bush administration hasn't subjected you to searches without a warrant, it's for one reason: they don't feel like it. Not because of the Fourth Amendment. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
