[Xastir-dev] Anti-aliasing and transparency
Curt, WE7U
archer at eskimo.com
Mon Apr 20 12:34:57 EDT 2009
On Mon, 20 Apr 2009, Tom Hayward wrote:
> I like the GraphicsMagick map anti-aliasing hack. That sounds simple
> enough to implement. Despite being hackish, it probably wouldn't hurt
> performance much on fast systems. However I'm not familiar enough with
> X to know where to grab the whole canvas for a resize. Maybe it's a
> good time to learn this stuff :)
We use three Pixmaps to draw into, then we copy the final pixmap
onto the screen. The reason for the odd drawing scheme is to make
things faster believe it or not.
a) Maps are drawn into #1.
b) #1 copied to #2.
c) Weather alerts are drawn into #2.
d) #2 copied to #3.
e) Symbols/tracks are drawn into #3.
f) #3 copied to the screen.
Symbols/tracks change most often, so we just have to do (d) through
(f) to do an update.
If weather alerts change, we do (b) through (f), skipping redrawing
of maps.
If maps/panning/zoom levels change, we do (a) through (f).
Main.c:
Pixmap pixmap;
Pixmap pixmap_alerts;
Pixmap pixmap_final;
Do a search on those names and you'll find where the stuff is done.
I believe it's all in main.c
I won't go into who came up with this crazy scheme...
--
Curt, WE7U. archer at eskimo dot com
http://www.eskimo.com/~archer
Lotto: A tax on people who are bad at math. - unknown
Windows: Microsoft's tax on computer illiterates. - WE7U.
The world DOES revolve around me: I picked the coordinate system!"
More information about the Xastir-dev
mailing list