[josm-dev] Bug 595 - Virtual nodes - Comments requested
Petr.Nejedly at Sun.COM
Mon Aug 18 19:50:03 BST 2008
Dirk Stöcker napsal(a):
> On Mon, 18 Aug 2008, Petr Nejedly wrote:
>> I just don't like the appearance of the "virtual nodes". Could you turn them into
>> small (nonzoomed), thin red plus signs instead of rendering them the same style
>> as the way they sit on?
> Sure. In SimplePaintVisitor there is one function drawing the virtual
> nodes. This needs to be adapted.
> If I find out how I can change the style without disturbing to much other
> program behaviour, I will do so.
> Patches welcome :-)
Not that simple thanks to the way SimplePaintVisitor tries to collect all
the strokes of one kind together and flush them at once.
Is there a measurable benefit of this approach opposed to naive implemetation
that would just set colors and draw segments as they come?
In Josm-ng, I use the naive approach when it comes to graphics primitives,
yet it is very fast even on large datasets. Maybe the other optimizations
overweight the cost of cloning and setting up Graphics2D for every paint?
Maybe it depends on a graphics card? (Well, I run an underclocked GeForce 8600M)
If the speedup gained by batching same strokes is neglible, we can easily
port a Drawer/Part from josm-ng:
It would improve rendering as you could easily enforce layering (nodes always on top of ways,
even the layer/tunel/bridge way attributes can be honoured) and you can easily post-render
such virtual entities without looping all the primitives once again.
Petr "Nenik" Nejedly, NetBeans/Sun Microsystems, http://www.netbeans.org
355/113 -- Not the famous irrational number PI, but an incredible simulation!
More information about the josm-dev