From: SourceForge.net <no...@so...> - 2007-02-28 10:02:59
|
Patches item #1670686, was opened at 2007-02-28 10:02 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=1670686&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Sergei Ivanov (sergei_ivanov) Assigned to: Nobody/Anonymous (nobody) Summary: patch for 1659627 (IntervalMarker rendering) Initial Comment: This is a patch for the following issue: 1659627 IntervalMarker with Double.POSITIVE_INFINITY bound https://sourceforge.net/tracker/index.php?func=detail&aid=1659627&group_id=15494&atid=115494 Implementation notes: 1. I had to code all the clipping myself, because Rectangle2D.Double#createIntersection() did not work well with infinite bounds and produced NaNs while trying to calculate the width/height of the clipped rectangle. Therefore, I compared the bounds first, clipped them and only after that calculated the new width/height. 2. The marker label was not displayed in the correct location. When I previously created a marker with an infinite upper bound and also set label anchor to RectangleAnchor.CENTER, the label was drawn in the infinity, off the screen. Now the label is drawn in the centre of the visible marker area. 3. There was a bug in AbstractXYItemRenderer#drawRangeMarker(), which resulted in outline not being drawn correctly (X and Y coordinates were swapped). This was also fixed. 4. I have successfully tested the patch in all possible combinations of plot and axis orientation, with both linear and logarithmic axes. 5. As correctly pointed out in a discussion of a similar problem: http://www.jfree.org/phpBB2/viewtopic.php?t=20196 the clipping will affect the gradient paint, particularly when coupled with scaling GradientPaintTransformer. As the drawing area for the marker is clipped to the visible area, the gradient paint will be resized to fit inside the visible area (whereas previously it was stretched to the whole marker area). I do not know if this change in behaviour can be considered critical. One problem I see with the standard GradientPaintTransformer is that it demotes double coordinates to a float range, which results in loss of precision and may still have weird side effects in some situations. In the light of this, clipping will probably do more good than harm. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=315494&aid=1670686&group_id=15494 |