Browse Source

function rename, DrawLine() -> DevDrawLine()

pre-master-46
rlar 16 years ago
parent
commit
38abf408d5
  1. 7
      ChangeLog
  2. 4
      src/frontend/display.c
  3. 2
      src/frontend/display.h
  4. 6
      src/frontend/plotting/graf.c
  5. 24
      src/frontend/plotting/grid.c

7
ChangeLog

@ -1,3 +1,10 @@
2010-09-08 Robert Larice
* src/frontend/display.c ,
* src/frontend/display.h ,
* src/frontend/plotting/graf.c ,
* src/frontend/plotting/grid.c :
function rename, DrawLine() -> DevDrawLine()
2010-09-08 Robert Larice 2010-09-08 Robert Larice
* src/frontend/display.c , * src/frontend/display.c ,
* src/frontend/display.h , * src/frontend/display.h ,

4
src/frontend/display.c

@ -203,7 +203,7 @@ void DevClear(void)
} }
void DrawLine(int x1, int y1, int x2, int y2)
void DevDrawLine(int x1, int y1, int x2, int y2)
{ {
(*(dispdev->DrawLine))(x1, y1, x2, y2); (*(dispdev->DrawLine))(x1, y1, x2, y2);
@ -275,7 +275,7 @@ gen_DatatoScreen(GRAPH *graph, double x, double y, int *screenx, int *screeny)
/* have to handle several types of grids */ /* have to handle several types of grids */
/* note: we can't compensate for X's demented y-coordinate system here /* note: we can't compensate for X's demented y-coordinate system here
since the grid routines use DrawLine w/o calling this routine */
since the grid routines use DevDrawLine w/o calling this routine */
if ((graph->grid.gridtype == GRID_LOGLOG) || if ((graph->grid.gridtype == GRID_LOGLOG) ||
(graph->grid.gridtype == GRID_YLOG)) { (graph->grid.gridtype == GRID_YLOG)) {
low = mylog10(graph->datawindow.ymin); low = mylog10(graph->datawindow.ymin);

2
src/frontend/display.h

@ -17,7 +17,7 @@ void DevInit(void);
int NewViewport(GRAPH *pgraph); int NewViewport(GRAPH *pgraph);
void DevClose(void); void DevClose(void);
void DevClear(void); void DevClear(void);
void DrawLine(int x1, int y1, int x2, int y2);
void DevDrawLine(int x1, int y1, int x2, int y2);
void DevDrawArc(int x0, int y0, int radius, double theta, double delta_theta); void DevDrawArc(int x0, int y0, int radius, double theta, double delta_theta);
void DevDrawText(char *text, int x, int y); void DevDrawText(char *text, int x, int y);
void DefineColor(int colorid, double red, double green, double blue); void DefineColor(int colorid, double red, double green, double blue);

6
src/frontend/plotting/graf.c

@ -278,7 +278,7 @@ gr_point(struct dvec *dv,
/* If it's a linear plot, ignore first point since we don't /* If it's a linear plot, ignore first point since we don't
want to connect with oldx and oldy. */ want to connect with oldx and oldy. */
if (np) if (np)
DrawLine(fromx, fromy, tox, toy);
DevDrawLine(fromx, fromy, tox, toy);
if ((tics = (double *) currentgraph->ticdata)) { if ((tics = (double *) currentgraph->ticdata)) {
for (; *tics < HUGE; tics++) { for (; *tics < HUGE; tics++) {
if (*tics == (double) np) { if (*tics == (double) np) {
@ -309,7 +309,7 @@ gr_point(struct dvec *dv,
DatatoScreen(currentgraph, DatatoScreen(currentgraph,
(double) 0, currentgraph->datawindow.ymin, (double) 0, currentgraph->datawindow.ymin,
&dummy, &ymin); &dummy, &ymin);
DrawLine(tox, ymin, tox, toy);
DevDrawLine(tox, ymin, tox, toy);
break; break;
case PLOT_POINT: case PLOT_POINT:
/* Here, gi_linestyle is the character used for the point. */ /* Here, gi_linestyle is the character used for the point. */
@ -431,7 +431,7 @@ drawlegend(GRAPH *graph, int plotno, struct dvec *dv)
- 3 * graph->fontwidth, y); - 3 * graph->fontwidth, y);
} else { } else {
SetLinestyle(dv->v_linestyle); SetLinestyle(dv->v_linestyle);
DrawLine(x, i, x + graph->viewport.width / 20, i);
DevDrawLine(x, i, x + graph->viewport.width / 20, i);
} }
SetColor(1); SetColor(1);
DevDrawText(dv->v_name, x + graph->viewport.width / 20 DevDrawText(dv->v_name, x + graph->viewport.width / 20

24
src/frontend/plotting/grid.c

@ -101,10 +101,10 @@ gr_fixgrid(GRAPH *graph, double xdelta, double ydelta, int xtype, int ytype)
/* do we really need this? */ /* do we really need this? */
/* /*
SetLinestyle(0); SetLinestyle(0);
DrawLine(graph->viewportxoff, graph->viewportyoff,
DevDrawLine(graph->viewportxoff, graph->viewportyoff,
graph->viewport.width + graph->viewportxoff, graph->viewport.width + graph->viewportxoff,
graph->viewportyoff); graph->viewportyoff);
DrawLine(graph->viewportxoff, graph->viewportyoff,
DevDrawLine(graph->viewportxoff, graph->viewportyoff,
graph->viewportxoff, graph->viewportxoff,
graph->viewport.height + graph->viewportyoff); graph->viewport.height + graph->viewportyoff);
SetLinestyle(1); SetLinestyle(1);
@ -496,11 +496,11 @@ drawlingrid(GRAPH *graph, char *units, int spacing, int nsp, double dst, double
SetLinestyle(0); SetLinestyle(0);
if (graph->grid.gridtype != GRID_NONE) { if (graph->grid.gridtype != GRID_NONE) {
if (axis == x_axis) if (axis == x_axis)
DrawLine(graph->viewportxoff + i,
DevDrawLine(graph->viewportxoff + i,
graph->viewportyoff, graph->viewportxoff + i, graph->viewportyoff, graph->viewportxoff + i,
graph->viewport.height + graph->viewportyoff); graph->viewport.height + graph->viewportyoff);
else else
DrawLine(graph->viewportxoff,
DevDrawLine(graph->viewportxoff,
graph->viewportyoff + i, graph->viewportyoff + i,
graph->viewport.width + graph->viewportxoff, graph->viewport.width + graph->viewportxoff,
graph->viewportyoff + i); graph->viewportyoff + i);
@ -654,13 +654,13 @@ drawloggrid(GRAPH *graph, char *units, int hmt, int lmt, int decsp, int subs, in
/* Draw the decade line */ /* Draw the decade line */
if (graph->grid.gridtype != GRID_NONE) { if (graph->grid.gridtype != GRID_NONE) {
if (axis == x_axis) if (axis == x_axis)
DrawLine(graph->viewportxoff + i,
DevDrawLine(graph->viewportxoff + i,
graph->viewportyoff, graph->viewportyoff,
graph->viewportxoff + i, graph->viewportxoff + i,
graph->viewport.height graph->viewport.height
+graph->viewportyoff); +graph->viewportyoff);
else else
DrawLine(graph->viewportxoff,
DevDrawLine(graph->viewportxoff,
graph->viewportyoff + i, graph->viewportyoff + i,
graph->viewport.width graph->viewport.width
+ graph->viewportxoff, + graph->viewportxoff,
@ -698,13 +698,13 @@ drawloggrid(GRAPH *graph, char *units, int hmt, int lmt, int decsp, int subs, in
m = i + decsp * log10((double) t * k); m = i + decsp * log10((double) t * k);
if (graph->grid.gridtype != GRID_NONE) { if (graph->grid.gridtype != GRID_NONE) {
if (axis == x_axis) if (axis == x_axis)
DrawLine(graph->viewportxoff + m,
DevDrawLine(graph->viewportxoff + m,
graph->viewportyoff, graph->viewportyoff,
graph->viewportxoff + m, graph->viewportxoff + m,
graph->viewport.height graph->viewport.height
+ graph->viewportyoff); + graph->viewportyoff);
else else
DrawLine(graph->viewportxoff,
DevDrawLine(graph->viewportxoff,
graph->viewportyoff + m, graph->viewportyoff + m,
graph->viewport.width graph->viewport.width
+ graph->viewportxoff, + graph->viewportxoff,
@ -896,7 +896,7 @@ drawpolargrid(GRAPH *graph)
graph->grid.yaxis.circular.center, graph->grid.yaxis.circular.center,
graph->grid.xaxis.circular.radius)) graph->grid.xaxis.circular.radius))
{ {
DrawLine(x1, y1, x2, y2);
DevDrawLine(x1, y1, x2, y2);
/* Add a label here */ /* Add a label here */
/*XXXX*/ /*XXXX*/
adddeglabel(graph, i * 30, x2, y2, x1, y1, adddeglabel(graph, i * 30, x2, y2, x1, y1,
@ -932,7 +932,7 @@ drawpolargrid(GRAPH *graph)
graph->grid.xaxis.circular.center, graph->grid.xaxis.circular.center,
graph->grid.yaxis.circular.center, graph->grid.yaxis.circular.center,
graph->grid.xaxis.circular.radius)) { graph->grid.xaxis.circular.radius)) {
DrawLine(x1, y1, x2, y2);
DevDrawLine(x1, y1, x2, y2);
/* Put on the label */ /* Put on the label */
adddeglabel(graph, i, x2, y2, x1, y1, adddeglabel(graph, i, x2, y2, x1, y1,
graph->grid.xaxis.circular.center, graph->grid.xaxis.circular.center,
@ -1270,7 +1270,7 @@ drawsmithgrid(GRAPH *graph)
zheight = gr_radius * sin(acos((double) xoff / gr_radius)); zheight = gr_radius * sin(acos((double) xoff / gr_radius));
if (zheight < 0) if (zheight < 0)
zheight = - zheight; zheight = - zheight;
DrawLine(gr_xcenter + xoff, gr_ycenter - zheight,
DevDrawLine(gr_xcenter + xoff, gr_ycenter - zheight,
gr_xcenter + xoff, gr_ycenter + zheight); gr_xcenter + xoff, gr_ycenter + zheight);
} }
*/ */
@ -1278,7 +1278,7 @@ drawsmithgrid(GRAPH *graph)
zheight = gr_radius * cos(asin((double) yoff / gr_radius)); zheight = gr_radius * cos(asin((double) yoff / gr_radius));
if (zheight < 0) if (zheight < 0)
zheight = - zheight; zheight = - zheight;
DrawLine(gr_xcenter - zheight, gr_ycenter + yoff,
DevDrawLine(gr_xcenter - zheight, gr_ycenter + yoff,
gr_xcenter + zheight, gr_ycenter + yoff); gr_xcenter + zheight, gr_ycenter + yoff);
DevDrawText("0", gr_xcenter + zheight + gi_fntwidth, gr_ycenter + yoff - DevDrawText("0", gr_xcenter + zheight + gi_fntwidth, gr_ycenter + yoff -
gi_fntheight / 2); gi_fntheight / 2);

Loading…
Cancel
Save