Menu

Highlighted point painted over by trace

Help
Anonymous
2016-01-19
2016-01-22
  • Anonymous

    Anonymous - 2016-01-19

    I am using ITracePoint2D.addAdditionalPointPainter( PointPainterDisc(8) ) to highlight a start and an end point in a segment of the trace. The points are shown as expected. However, they are subsequently painted over by the trace that contains the point. If the trace is a sparse line with nothing in its vicinity, this is not a problem and the ring created by PointPainterDisc is only broken at the entry and the exit of that ring. But in some cases in my application the GPS flight-track rendered in the chart can become quite crowded, so that the ring is completely covered by the track crossing over it repeatedly, making the ring completely invisble, although it had been successfully painted before.
    Question: Is there a way I can change the order of painting like: trace first, then the highlighted points?
    It is not too bad though, because I connect the start point with the endpoint by a segment trace in a different color, however I cannot see where the segments starts an ends.
    Regards Wolfgang

     

    Last edit: Anonymous 2016-01-20
  • Anonymous

    Anonymous - 2016-01-22

    I verified that the PointPainter is indeed called after the TracePainter painted the line at this point. So the chart paints in the desired order.
    I solved the problem by applying addAdditionalPointPainter() to the start and end points of the segment trace, instead of the corresponding points in the whole track trace. If only one point is selected (1) the segment trace consists only of this single point. Since the segment trace has been added to the chart last, it is always painted after the whole track trace, the points are visible. Of course, the a long segment trace may also paint over these points, but it is unrealistic in this application to select points that are far apart.
    (1) I selected the points in another chart (for altitude over time) which fires a PropertyChangeEvent to the GPS trackchart.

     

Anonymous
Anonymous

Add attachments
Cancel