[Xastir-dev] Seeing weird fill patterns

Curt Mills archer at eskimo.com
Sun May 30 23:39:34 EDT 2004


On Sun, 30 May 2004, Tom Russo wrote:

> Since draw_shapefile_map resets fill_style to 0 each call, and
> XSetFillStyle is supposed to be called each time through draw_shapefile_map
> that doesn't return prior to drawing, it shouldn't be the case that a weather
> alert can cause all subsequent fills to be stippled anymore.
>
> It's true that there are many returns possible prior to this call of
> XSetFillStyle, but it seems that all of those would result in the current
> shapefile not getting drawn.

Yea, but other things can draw.  We end up drawing symbols, tracks,
severe weather polygons, etc, perhaps with the same GC.  If the
draw_shapefile_map() function returned without resetting things,
then the next things to come along might end up using some of the
same parameters.  Since we have several places where we can return
without drawing a shapefile map, I can imagine that occuring.


> On the other hand, the fill style is not reset to solid until the next
> time a non-weather-alert draw_shapefile_map is called, which is wrong: perhaps
> the stipple pattern is still set for non-shapefile maps that get drawn
> after your wx alert.  Perhaps another call to XSetFillStyle(XtDisplay(w), gc,
> FillSolid) needs to happen prior to all the returns subsequent to the one on
> line 1648 to be sure draw_shapefile_map cleans up its droppings when it's
> done instead of next time it gets called.
>
> > Perhaps some of the dbfawk files don't handle this?
>
> Question: are you seeing any instances of "No DBFAWK signature for (shapefile
> name)!  Using default." when you run the code?  It could be a problem related
> to the default rule, which contains no reset of the fill style variable (or
> much else, for that matter).

Yea:

No DBFAWK signature for z_30au02.shp!  Using default.
No DBFAWK signature for transparent/shapefiles/noaa/s_24ja01.shp!  Using default.


> In map_shp.c the lines:

> (i.e. adding "fill_style=0" after "filled=0" at a minimum.  I don't see how
> all the other default setting of fill_style could be allowing an old setting
> of that variable to continue to stipple subsequent maps, but that's what's
> going on there.

Ok.  Adding that to the file.  Thanks!

-- 
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