[GRASS-SVN] r31961 - in grass/trunk: gui/wxpython/gui_modules
gui/wxpython/nviz include lib lib/nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jul 2 06:13:08 EDT 2008
Author: martinl
Date: 2008-07-02 06:13:08 -0400 (Wed, 02 Jul 2008)
New Revision: 31961
Added:
grass/trunk/gui/wxpython/nviz/nviz_types.i
Removed:
grass/trunk/gui/wxpython/nviz/dig_types.i
Modified:
grass/trunk/gui/wxpython/gui_modules/nviz.py
grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
grass/trunk/gui/wxpython/nviz/Makefile
grass/trunk/gui/wxpython/nviz/draw.cpp
grass/trunk/gui/wxpython/nviz/nviz.h
grass/trunk/gui/wxpython/nviz/surface.cpp
grass/trunk/include/nviz.h
grass/trunk/lib/grasslib.dox
grass/trunk/lib/nviz/Makefile
grass/trunk/lib/nviz/draw.c
Log:
nviz2: wxGUI fixes (surface draw mode), initial doxygen updates
Modified: grass/trunk/gui/wxpython/gui_modules/nviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz.py 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/gui_modules/nviz.py 2008-07-02 10:13:08 UTC (rev 31961)
@@ -79,6 +79,7 @@
# None])
self.init = False
+ self.render = True # render in full resolution
#
# create nviz instance
@@ -192,16 +193,11 @@
def OnLeftUp(self, event):
self.ReleaseMouse()
- def UpdateMap(self, render=False):
+ def UpdateMap(self):
"""
Updates the canvas anytime there is a change to the
underlaying images or to the geometry of the canvas.
- render:
- - None do not render (todo)
- - True render
- - False quick render
-
@param render re-render map composition
"""
start = time.clock()
@@ -225,12 +221,11 @@
#glRotatef((self.y - self.lastY) * yScale, 1.0, 0.0, 0.0);
#glRotatef((self.x - self.lastX) * xScale, 0.0, 1.0, 0.0);
- if render is not None:
- self.parent.onRenderGauge.Show()
- if self.parent.onRenderGauge.GetRange() > 0:
- self.parent.onRenderGauge.SetValue(1)
- self.parent.onRenderTimer.Start(100)
- self.parent.onRenderCounter = 0
+ self.parent.onRenderGauge.Show()
+ if self.parent.onRenderGauge.GetRange() > 0:
+ self.parent.onRenderGauge.SetValue(1)
+ self.parent.onRenderTimer.Start(100)
+ self.parent.onRenderCounter = 0
if 'view' in self.update.keys():
self.nvizClass.SetView(self.view['pos']['x'], self.view['pos']['y'],
@@ -243,11 +238,10 @@
self.nvizClass.SetZExag(self.view['z-exag']['value'])
del self.update['z-exag']
- # if render is True:
- # self.nvizClass.Draw(False)
- # elif render is False:
- # self.nvizClass.Draw(True) # quick
- self.nvizClass.Draw(False)
+ if self.render is True:
+ self.nvizClass.Draw(False)
+ else:
+ self.nvizClass.Draw(True) # quick
self.SwapBuffers()
@@ -267,7 +261,7 @@
# self.parent.StatusbarUpdate()
Debug.msg(3, "GLWindow.UpdateMap(): render=%s, -> time=%g" % \
- (render, (stop-start)))
+ (self.render, (stop-start)))
def EraseMap(self):
"""
@@ -583,15 +577,18 @@
# size=globalvar.DIALOG_GSELECT_SIZE,
size=(200, -1),
type="raster")
- self.win['surface'][code]['map'] = map.GetId() - 1 # FIXME !
+ self.win['surface'][code]['map'] = map.GetId() - 1 # FIXME
map.Bind(wx.EVT_TEXT, self.OnSurfaceMap)
+ # changing map topography not allowed
+ if code == 'topo':
+ map.Enable(False)
gridSizer.Add(item=map, flag=wx.ALIGN_CENTER_VERTICAL,
pos=(row, 2))
if code == 'color':
value = csel.ColourSelect(panel, id=wx.ID_ANY,
colour=UserSettings.Get(group='nviz', key='surface',
- subkey=['color', 'value']))
+ subkey=['color', 'value']))
value.Bind(csel.EVT_COLOURSELECT, self.OnSurfaceMap)
elif code == 'mask':
value = None
@@ -817,7 +814,8 @@
style=style,
size=size)
- slider.Bind(wx.EVT_SCROLL, self.OnChangeValue)
+ slider.Bind(wx.EVT_SCROLL, self.OnViewChange)
+ slider.Bind(wx.EVT_SCROLL_CHANGED, self.OnViewChanged)
self.win['view'][name]['slider'] = slider.GetId()
spin = wx.SpinCtrl(parent=parent, id=wx.ID_ANY, size=(65, -1),
@@ -829,7 +827,7 @@
# spin.SetRange(self.settings[name]['min'],
# self.settings[name]['max'])
- spin.Bind(wx.EVT_SPINCTRL, self.OnChangeValue)
+ spin.Bind(wx.EVT_SPINCTRL, self.OnViewChange)
self.win['view'][name]['spin'] = spin.GetId()
def UpdateSettings(self):
@@ -858,7 +856,8 @@
return None
- def OnChangeValue(self, event):
+ def OnViewChange(self, event):
+ """Change view, render in quick mode"""
# find control
winName = self.__GetWindowName(self.win['view'], event.GetId())
if not winName:
@@ -873,8 +872,15 @@
else:
self.mapWindow.update[winName] = None
+ self.mapWindow.render = False
self.mapWindow.Refresh(False)
+ def OnViewChanged(self, event):
+ """View changed, render in full resolution"""
+ print '#'
+ self.mapWindow.render = True
+ self.mapWindow.Refresh(False)
+
def OnResetView(self, event):
"""Reset to default view (view page)"""
self.mapWindow.ResetView()
@@ -989,6 +995,8 @@
layer = self.mapWindow.GetSelectedLayer()
id = self.mapWindow.GetMapObjId(layer)
+ print self.mapWindow.update
+
#
# surface
#
@@ -1027,10 +1035,6 @@
del self.mapWindow.update[attrb]
- # draw mode
- if self.mapWindow.update.has_key('draw-mode'):
- self.mapWindow.nvizClass.SetDrawMode(self.mapWindow.update['draw-mode'])
-
# draw res
if self.mapWindow.update.has_key('draw-res'):
coarse, fine = self.mapWindow.update['draw-res']
@@ -1094,17 +1098,18 @@
incSel = 0
if map is True: # map
- self.FindWindowById(self.win['surface'][attrb]['map']).Enable(True)
+ if attrb != 'topo': # changing map topography not allowed
+ self.FindWindowById(self.win['surface'][attrb]['map'] + 1).Enable(True) # FIXME
if self.win['surface'][attrb]['const']:
self.FindWindowById(self.win['surface'][attrb]['const']).Enable(False)
self.FindWindowById(self.win['surface'][attrb]['use']).SetSelection(1 + incSel)
elif map is False: # const
- self.FindWindowById(self.win['surface'][attrb]['map']).Enable(False)
+ self.FindWindowById(self.win['surface'][attrb]['map'] + 1).Enable(False)
if self.win['surface'][attrb]['const']:
self.FindWindowById(self.win['surface'][attrb]['const']).Enable(True)
self.FindWindowById(self.win['surface'][attrb]['use']).SetSelection(2 + incSel)
else: # unset
- self.FindWindowById(self.win['surface'][attrb]['map']).Enable(False)
+ self.FindWindowById(self.win['surface'][attrb]['map'] + 1).Enable(False)
if self.win['surface'][attrb]['const']:
self.FindWindowById(self.win['surface'][attrb]['const']).Enable(False)
self.FindWindowById(self.win['surface'][attrb]['use']).SetSelection(0)
@@ -1114,11 +1119,14 @@
if not self.mapWindow.init:
return
- attrb = self.__GetWindowName(self.win['surface'], event.GetId())
+ attrb = self.__GetWindowName(self.win['surface'], event.GetId())
if not attrb:
return
selection = self.FindWindowById(self.win['surface'][attrb]['use']).GetSelection()
+ if self.win['surface'][attrb]['required']:
+ selection += 1
+
if selection == 0: # unset
map = None
value = ''
@@ -1155,17 +1163,14 @@
mode = self.FindWindowById(self.win['surface']['draw']['mode']).GetSelection()
if mode == 0: # coarse
value |= wxnviz.DM_WIRE
- self.mapWindow.update['draw-mode'] = wxnviz.DRAW_COARSE
self.FindWindowById(self.win['surface']['draw']['res-coarse']).Enable(True)
self.FindWindowById(self.win['surface']['draw']['res-fine']).Enable(False)
elif mode == 1: # fine
value |= wxnviz.DM_POLY
- self.mapWindow.update['draw-mode'] = wxnviz.DRAW_FINE
self.FindWindowById(self.win['surface']['draw']['res-coarse']).Enable(False)
self.FindWindowById(self.win['surface']['draw']['res-fine']).Enable(True)
else: # both
value |= wxnviz.DM_WIRE_POLY
- self.mapWindow.update['draw-mode'] = wxnviz.DRAW_BOTH
self.FindWindowById(self.win['surface']['draw']['res-coarse']).Enable(True)
self.FindWindowById(self.win['surface']['draw']['res-fine']).Enable(True)
@@ -1220,7 +1225,10 @@
#
for attr in ('topo', 'color'):
self.SetSurfaceUseMap(attr, True) # -> map
- self.FindWindowById(self.win['surface'][attr]['map']).SetValue(layer.name)
+ if layer.type == 'raster':
+ self.FindWindowById(self.win['surface'][attr]['map']).SetValue(layer.name)
+ else:
+ self.FindWindowById(self.win['surface'][attr]['map']).SetValue('')
if UserSettings.Get(group='nviz', key='surface', subkey=['shine', 'map']) is False:
self.SetSurfaceUseMap('shine', False)
value = UserSettings.Get(group='nviz', key='surface', subkey=['shine', 'value'])
@@ -1254,6 +1262,11 @@
win.SetValue(data['value'])
+ def SetPage(self, name):
+ """Get named page"""
+ if name == 'surface':
+ self.notebook.SetSelection(1)
+
class ViewPositionWindow(wx.Window):
"""Position control window (for NvizToolWindow)"""
def __init__(self, parent, id, mapwindow,
@@ -1275,6 +1288,7 @@
self.Bind(wx.EVT_ERASE_BACKGROUND, lambda x: None)
self.Bind(wx.EVT_PAINT, self.OnPaint)
+ # self.Bind(wx.EVT_MOTION, self.OnMouse)
self.Bind(wx.EVT_MOUSE_EVENTS, self.OnMouse)
def Draw(self, pos=None):
@@ -1303,6 +1317,7 @@
self.pdc.DrawToDC(dc)
def OnMouse(self, event):
+ print event.LeftIsDown(), event.LeftUp()
if event.LeftIsDown():
x, y = event.GetPosition()
self.Draw(pos=(x, y))
@@ -1314,6 +1329,9 @@
self.settings['pos']['y'] = y
self.mapWindow.update['view'] = None
- self.mapWindow.Refresh(eraseBackground=False)
- # self.mapWindow.UpdateMap()
- # self.mapWindow.OnPaint(None)
+ self.mapWindow.render = False
+
+ if event.LeftUp():
+ self.mapWindow.render = True
+
+ self.mapWindow.Refresh(eraseBackground=False)
Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py 2008-07-02 10:13:08 UTC (rev 31961)
@@ -458,11 +458,11 @@
@todo vector/volume
"""
- import nviz
- dlg = nviz.RasterPropertiesDialog(parent=self,
- map=self.GetPyData(self.layer_selected)[0]['maplayer'].name)
- dlg.Show()
+ if not self.mapdisplay.nvizToolWin.IsShown():
+ self.mapdisplay.nvizToolWin.Show()
+ self.mapdisplay.nvizToolWin.SetPage('surface')
+
def RenameLayer (self, event):
"""Rename layer"""
self.EditLabel(self.layer_selected)
Modified: grass/trunk/gui/wxpython/nviz/Makefile
===================================================================
--- grass/trunk/gui/wxpython/nviz/Makefile 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/nviz/Makefile 2008-07-02 10:13:08 UTC (rev 31961)
@@ -19,8 +19,8 @@
default: install_nviz
-$(LIB_NAME).i: nviz.i dig_types.i nviz.h
- cat nviz.i dig_types.i > $(LIB_NAME).i
+$(LIB_NAME).i: nviz.i nviz_types.i nviz.h
+ cat nviz.i nviz_types.i > $(LIB_NAME).i
echo "/* auto-generated swig typedef file */" >> $(LIB_NAME).i
cat nviz.h >> $(LIB_NAME).i
Deleted: grass/trunk/gui/wxpython/nviz/dig_types.i
===================================================================
--- grass/trunk/gui/wxpython/nviz/dig_types.i 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/nviz/dig_types.i 2008-07-02 10:13:08 UTC (rev 31961)
@@ -1,43 +0,0 @@
-/* extracted from include/vect/dig_defines.h */
-
-#define GV_POINT 0x01
-#define GV_LINE 0x02
-#define GV_BOUNDARY 0x04
-#define GV_CENTROID 0x08
-#define GV_FACE 0x10
-#define GV_KERNEL 0x20
-#define GV_AREA 0x40
-#define GV_VOLUME 0x80
-
-#define GV_POINTS (GV_POINT | GV_CENTROID )
-#define GV_LINES (GV_LINE | GV_BOUNDARY )
-
-#define PORT_DOUBLE_MAX 1.7976931348623157e+308
-
-/* extracted from gui/wxpython/nviz/nviz.h */
-
-#define VIEW_DEFAULT_POS_X 0.85
-#define VIEW_DEFAULT_POS_Y 0.85
-#define VIEW_DEFAULT_PERSP 40.0
-#define VIEW_DEFAULT_TWIST 0.0
-#define VIEW_DEFAULT_ZEXAG 1.0
-
-#define DRAW_COARSE 0
-#define DRAW_FINE 1
-#define DRAW_BOTH 2
-
-/* extracted from include/gsurf.h */
-#define DM_GOURAUD 0x00000100
-#define DM_FLAT 0x00000200
-
-#define DM_FRINGE 0x00000010
-
-#define DM_WIRE 0x00000001
-#define DM_COL_WIRE 0x00000002
-#define DM_POLY 0x00000004
-#define DM_WIRE_POLY 0x00000008
-
-#define DM_GRID_WIRE 0x00000400
-#define DM_GRID_SURF 0x00000800
-
-#define WC_COLOR_ATT 0xFF000000
Modified: grass/trunk/gui/wxpython/nviz/draw.cpp
===================================================================
--- grass/trunk/gui/wxpython/nviz/draw.cpp 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/nviz/draw.cpp 2008-07-02 10:13:08 UTC (rev 31961)
@@ -29,23 +29,15 @@
Nviz_draw_cplane(data, -1, -1); // ?
- if (data->draw_mode == DRAW_COARSE ||
- data->draw_mode == DRAW_BOTH || quick) {
+ if (quick) {
Nviz_draw_quick(data, 1); // clear screen
}
-
- if (data->draw_mode == DRAW_FINE ||
- data->draw_mode == DRAW_BOTH) {
- if (data->draw_mode == DRAW_FINE) {
- Nviz_draw_all (data, 1); // clear screen
- }
- else {
- Nviz_draw_all (data, 0);
- }
+ else {
+ Nviz_draw_all (data, 1); // clear screen
}
- G_debug(1, "Nviz::Draw(): mode=%d, quick=%d",
- data->draw_mode, quick);
+ G_debug(1, "Nviz::Draw(): quick=%d",
+ quick);
return;
}
@@ -61,22 +53,3 @@
return;
}
-
-/*!
- \brief Set draw mode
-
- Draw modes:
- - DRAW_COARSE
- - DRAW_FINE
- - DRAW_BOTH
-
- \param mode draw mode
-*/
-void Nviz::SetDrawMode(int mode)
-{
- Nviz_set_draw_mode(data, mode);
-
- G_debug(1, "Nviz::SetDrawMode(): mode=%d",
- mode);
- return;
-}
Modified: grass/trunk/gui/wxpython/nviz/nviz.h
===================================================================
--- grass/trunk/gui/wxpython/nviz/nviz.h 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/nviz/nviz.h 2008-07-02 10:13:08 UTC (rev 31961)
@@ -67,7 +67,6 @@
/* draw.cpp */
void Draw(bool);
void EraseMap();
- void SetDrawMode(int);
/* surface.cpp */
int SetSurfaceTopo(int, bool, const char *);
Copied: grass/trunk/gui/wxpython/nviz/nviz_types.i (from rev 31946, grass/trunk/gui/wxpython/nviz/dig_types.i)
===================================================================
--- grass/trunk/gui/wxpython/nviz/nviz_types.i (rev 0)
+++ grass/trunk/gui/wxpython/nviz/nviz_types.i 2008-07-02 10:13:08 UTC (rev 31961)
@@ -0,0 +1,39 @@
+/* extracted from include/vect/dig_defines.h */
+
+#define GV_POINT 0x01
+#define GV_LINE 0x02
+#define GV_BOUNDARY 0x04
+#define GV_CENTROID 0x08
+#define GV_FACE 0x10
+#define GV_KERNEL 0x20
+#define GV_AREA 0x40
+#define GV_VOLUME 0x80
+
+#define GV_POINTS (GV_POINT | GV_CENTROID )
+#define GV_LINES (GV_LINE | GV_BOUNDARY )
+
+#define PORT_DOUBLE_MAX 1.7976931348623157e+308
+
+/* extracted from gui/wxpython/nviz/nviz.h */
+
+#define VIEW_DEFAULT_POS_X 0.85
+#define VIEW_DEFAULT_POS_Y 0.85
+#define VIEW_DEFAULT_PERSP 40.0
+#define VIEW_DEFAULT_TWIST 0.0
+#define VIEW_DEFAULT_ZEXAG 1.0
+
+/* extracted from include/gsurf.h */
+#define DM_GOURAUD 0x00000100
+#define DM_FLAT 0x00000200
+
+#define DM_FRINGE 0x00000010
+
+#define DM_WIRE 0x00000001
+#define DM_COL_WIRE 0x00000002
+#define DM_POLY 0x00000004
+#define DM_WIRE_POLY 0x00000008
+
+#define DM_GRID_WIRE 0x00000400
+#define DM_GRID_SURF 0x00000800
+
+#define WC_COLOR_ATT 0xFF000000
Modified: grass/trunk/gui/wxpython/nviz/surface.cpp
===================================================================
--- grass/trunk/gui/wxpython/nviz/surface.cpp 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/gui/wxpython/nviz/surface.cpp 2008-07-02 10:13:08 UTC (rev 31961)
@@ -127,6 +127,10 @@
{
int ret;
+ if (!GS_surf_exists(id)) {
+ return 0;
+ }
+
if (map) {
ret = Nviz_set_attr(id, MAP_OBJ_SURF, attr, MAP_ATT,
value, -1.0,
@@ -204,6 +208,10 @@
*/
int Nviz::UnsetSurfaceAttr(int id, int attr)
{
+ if (!GS_surf_exists(id)) {
+ return 0;
+ }
+
return Nviz_unset_attr(id, MAP_OBJ_SURF, attr);
}
@@ -214,12 +222,20 @@
\param fine x/y fine resolution
\param coarse x/y coarse resolution
- \return -1 on error
- \return 0 on success
+ \return 0 on error
+ \return 1 on success
*/
int Nviz::SetSurfaceRes(int id, int fine, int coarse)
{
- return GS_set_drawres(id, fine, fine, coarse, coarse);
+ if (!GS_surf_exists(id)) {
+ return 0;
+ }
+
+ if (GS_set_drawres(id, fine, fine, coarse, coarse) < 0) {
+ return 0;
+ }
+
+ return 1;
}
/*!
@@ -239,16 +255,27 @@
\param id surface id (<= 0 for all)
\param style draw style
- \return 0 on success
- \return -1 on error
+ \return 1 on success
+ \return 0 on error
*/
int Nviz::SetSurfaceStyle(int id, int style)
{
if (id > 0) {
- return GS_set_drawmode(id, style);
+ if (!GS_surf_exists(id)) {
+ return 0;
+ }
+
+ if (GS_set_drawmode(id, style) < 0) {
+ return 0;
+ }
+ return 1;
}
- return GS_setall_drawmode(style);
+ if (GS_setall_drawmode(style) < 0) {
+ return 0;
+ }
+
+ return 1;
}
/*!
@@ -259,10 +286,15 @@
\param surface id
\param color color string (R:G:B)
- \return 1
+ \return 1 on success
+ \return 0 on failure
*/
int Nviz::SetWireColor(int id, const char* color)
{
+ if (!GS_surf_exists(id)) {
+ return 0;
+ }
+
GS_set_wire_color(id, Nviz_color_from_str(color));
return 1;
Modified: grass/trunk/include/nviz.h
===================================================================
--- grass/trunk/include/nviz.h 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/include/nviz.h 2008-07-02 10:13:08 UTC (rev 31961)
@@ -82,8 +82,6 @@
/* background color */
int bgcolor;
- /* draw */
- int draw_mode;
} nv_data;
/* The following structure is used to associate client data with surfaces.
@@ -138,7 +136,6 @@
int Nviz_draw_all(nv_data *, int);
int Nviz_draw_quick(nv_data *, int);
int Nviz_draw_all_vect(nv_data *);
-void Nviz_set_draw_mode(nv_data *, int);
/* exag.c */
int Nviz_get_exag_height(float *, float *, float *);
Modified: grass/trunk/lib/grasslib.dox
===================================================================
--- grass/trunk/lib/grasslib.dox 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/lib/grasslib.dox 2008-07-02 10:13:08 UTC (rev 31961)
@@ -95,6 +95,7 @@
<li>symbol: Drawing symbols for %point %vector data library - \ref symbol
<li>vask: Cursor management library - \ref vask
<li>%vector: \ref Vector_Library (GRASS Vector and Direct Graph Library)
+<li>nviz: Nviz library (used by wxGUI Nviz extension and CLI-based Nviz module)
</ul>
<!--<li>image3: extra imagery library (mainly still unused) - \ref image3lib-->
<!--<li>D: display library - \ref d_displaylib-->
Modified: grass/trunk/lib/nviz/Makefile
===================================================================
--- grass/trunk/lib/nviz/Makefile 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/lib/nviz/Makefile 2008-07-02 10:13:08 UTC (rev 31961)
@@ -11,5 +11,9 @@
EXTRA_LIBS = $(GISLIB) $(XLIBPATH) $(XMLIB) $(XTLIB) $(XLIB) $(XEXTRALIBS) $(OGSFLIB)
include $(MODULE_TOPDIR)/include/Make/Lib.make
+include $(MODULE_TOPDIR)/include/Make/Doxygen.make
+# doxygen
+DOXNAME=nviz
+
default: lib
Modified: grass/trunk/lib/nviz/draw.c
===================================================================
--- grass/trunk/lib/nviz/draw.c 2008-07-02 10:04:26 UTC (rev 31960)
+++ grass/trunk/lib/nviz/draw.c 2008-07-02 10:13:08 UTC (rev 31961)
@@ -189,36 +189,38 @@
if (draw_vect)
Nviz_draw_all_vect (data);
+ /*
if (draw_site)
- ; // site_draw_all_together(data, interp);
+ site_draw_all_together(data, interp);
if (draw_vol)
- ; // vol_draw_all_cmd(data, interp, argc, argv);
-
+ vol_draw_all_cmd(data, interp, argc, argv);
+ */
GS_done_draw();
GS_set_draw(GSD_BACK);
+ /*
if (!draw_north_arrow)
- ; // draw_north_arrow = EMPTYSTRING;
+ draw_north_arrow = EMPTYSTRING;
if (!arrow_x)
- ; // arrow_x = EMPTYSTRING;
+ arrow_x = EMPTYSTRING;
if (!draw_scalebar)
- ; // draw_scalebar = EMPTYSTRING;
+ draw_scalebar = EMPTYSTRING;
if (!draw_bar_x)
- ; // bar_x = EMPTYSTRING;
+ bar_x = EMPTYSTRING;
if (!draw_fringe)
- ; // draw_fringe = EMPTYSTRING;
+ draw_fringe = EMPTYSTRING;
if (!draw_label)
- ; // draw_label = EMPTYSTRING;
+ draw_label = EMPTYSTRING;
if (!draw_legend)
- ; // draw_legend = EMPTYSTRING;
-
+ draw_legend = EMPTYSTRING;
+ */
/* Draw decorations */
/* North Arrow
@@ -308,9 +310,6 @@
*/
int Nviz_draw_quick(nv_data *dc, int clear)
{
- int i, max;
- int *surf_list, *vol_list;
-
GS_set_draw(GSD_BACK);
if (clear)
@@ -321,19 +320,6 @@
GS_alldraw_wire();
/*
- surf_list = GS_get_surf_list(&max);
-
- max = GS_num_surfs();
- for (i = 0; i < max; i++) {
- if (!check_blank(surf_list[i])) {
- GS_draw_wire(surf_list[i]);
- }
- }
-
- G_free (surf_list);
- */
-
- /*
vol_list = GVL_get_vol_list(&max);
max = GVL_num_vols();
for (i = 0; i < max; i++) {
@@ -386,20 +372,3 @@
return 1;
}
-/*!
- \brief Set draw mode
-
- Draw modes:
- - DRAW_COARSE
- - DRAW_FINE
- - DRAW_BOTH
-
- \param data nviz data
- \param mode draw mode
-*/
-void Nviz_set_draw_mode(nv_data *data, int mode)
-{
- data->draw_mode = mode;
-
- return;
-}
More information about the grass-commit
mailing list