summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjoye <joye>2013-09-11 21:54:21 (GMT)
committerjoye <joye>2013-09-11 21:54:21 (GMT)
commite7151f39957de2858890934f731da351707be492 (patch)
tree1d6d893a4ddcd5586e171b4864c5e9c42449b991
parent7ebb2ec3a8e19d0a5e4ecf65aad563467747480d (diff)
downloadblt-e7151f39957de2858890934f731da351707be492.zip
blt-e7151f39957de2858890934f731da351707be492.tar.gz
blt-e7151f39957de2858890934f731da351707be492.tar.bz2
*** empty log message ***
-rw-r--r--src/bltGrElemLine.C24
-rw-r--r--src/bltGrElemOp.C4
-rw-r--r--src/bltGrPenOp.C12
-rw-r--r--src/bltGraph.C32
-rw-r--r--src/bltGraph.h2
5 files changed, 7 insertions, 67 deletions
diff --git a/src/bltGrElemLine.C b/src/bltGrElemLine.C
index 440e3f7..e77641b 100644
--- a/src/bltGrElemLine.C
+++ b/src/bltGrElemLine.C
@@ -32,10 +32,7 @@
#include "bltMath.h"
#include "bltGraph.h"
-#include "bltChain.h"
#include "bltGrElem.h"
-#include "bltBgStyle.h"
-#include "bltImage.h"
#include "bltBitmap.h"
#define COLOR_DEFAULT (XColor *)1
@@ -2790,8 +2787,7 @@ MapLineProc(Graph *graphPtr, Element *basePtr)
* Map connecting line segments if they are to be displayed.
*/
elemPtr->smooth = elemPtr->reqSmooth;
- if ((np > 1) && ((graphPtr->classId == CID_ELEM_STRIP) ||
- (elemPtr->builtinPen.traceWidth > 0))) {
+ if ((np > 1) && (elemPtr->builtinPen.traceWidth > 0)) {
/*
* Do smoothing if necessary. This can extend the coordinate array,
* so both mi.points and mi.nPoints may change.
@@ -2829,11 +2825,7 @@ MapLineProc(Graph *graphPtr, Element *basePtr)
if (elemPtr->fillBg != NULL) {
MapFillArea(graphPtr, elemPtr, &mi);
}
- if (graphPtr->classId == CID_ELEM_STRIP) {
- MapStrip(graphPtr, elemPtr, &mi);
- } else {
- MapTraces(graphPtr, elemPtr, &mi);
- }
+ MapTraces(graphPtr, elemPtr, &mi);
}
free(mi.screenPts);
free(mi.map);
@@ -3443,11 +3435,7 @@ ClosestLineProc(Graph *graphPtr, Element *basePtr, ClosestSearch *searchPtr)
} else {
distProc = DistanceToLineProc;
}
- if (elemPtr->obj.classId == CID_ELEM_STRIP) {
- found = ClosestStrip(graphPtr, elemPtr, searchPtr, distProc);
- } else {
- found = ClosestTrace(graphPtr, elemPtr, searchPtr, distProc);
- }
+ found = ClosestTrace(graphPtr, elemPtr, searchPtr, distProc);
if ((!found) && (searchPtr->along != SEARCH_BOTH)) {
ClosestPoint(elemPtr, searchPtr);
}
@@ -5018,11 +5006,7 @@ Blt_LineElement(Graph *graphPtr, const char *name, ClassId classId)
elemPtr = calloc(1, sizeof(LineElement));
elemPtr->procsPtr = &lineProcs;
- if (classId == CID_ELEM_LINE) {
- elemPtr->configSpecs = lineElemConfigSpecs;
- } else {
- elemPtr->configSpecs = stripElemConfigSpecs;
- }
+ elemPtr->configSpecs = lineElemConfigSpecs;
elemPtr->obj.name = Blt_Strdup(name);
Blt_GraphSetObjectClass(&elemPtr->obj, classId);
elemPtr->flags = SCALE_SYMBOL;
diff --git a/src/bltGrElemOp.C b/src/bltGrElemOp.C
index b95733b..de1773f 100644
--- a/src/bltGrElemOp.C
+++ b/src/bltGrElemOp.C
@@ -1857,7 +1857,7 @@ GetOp(
/* Report only on elements. */
if ((elemPtr != NULL) && ((elemPtr->flags & DELETE_PENDING) == 0) &&
(elemPtr->obj.classId >= CID_ELEM_BAR) &&
- (elemPtr->obj.classId <= CID_ELEM_STRIP)) {
+ (elemPtr->obj.classId <= CID_ELEM_LINE)) {
Tcl_SetStringObj(Tcl_GetObjResult(interp), elemPtr->obj.name,-1);
}
}
@@ -2137,9 +2137,7 @@ TypeOp(
}
switch (elemPtr->obj.classId) {
case CID_ELEM_BAR: string = "bar"; break;
- case CID_ELEM_CONTOUR: string = "contour"; break;
case CID_ELEM_LINE: string = "line"; break;
- case CID_ELEM_STRIP: string = "strip"; break;
default: string = "???"; break;
}
Tcl_SetStringObj(Tcl_GetObjResult(interp), string, -1);
diff --git a/src/bltGrPenOp.C b/src/bltGrPenOp.C
index f6959b3..9ac88f1 100644
--- a/src/bltGrPenOp.C
+++ b/src/bltGrPenOp.C
@@ -352,10 +352,6 @@ Blt_CreatePen(Graph *graphPtr, const char *penName, ClassId classId,
classId = CID_ELEM_BAR;
} else if (strcmp(arg, "line") == 0) {
classId = CID_ELEM_LINE;
- } else if (strcmp(arg, "strip") == 0) {
- classId = CID_ELEM_LINE;
- } else if (strcmp(arg, "contour") == 0) {
- classId = CID_ELEM_CONTOUR;
} else {
Tcl_AppendResult(graphPtr->interp, "unknown pen type \"",
arg, "\" specified", (char *)NULL);
@@ -363,9 +359,7 @@ Blt_CreatePen(Graph *graphPtr, const char *penName, ClassId classId,
}
}
}
- if (classId == CID_ELEM_STRIP) {
- classId = CID_ELEM_LINE;
- }
+ classId = CID_ELEM_LINE;
hPtr = Blt_CreateHashEntry(&graphPtr->penTable, penName, &isNew);
if (!isNew) {
penPtr = Blt_GetHashValue(hPtr);
@@ -431,9 +425,7 @@ Blt_GetPenFromObj(Tcl_Interp *interp, Graph *graphPtr, Tcl_Obj *objPtr,
}
return TCL_ERROR;
}
- if (classId == CID_ELEM_STRIP) {
- classId = CID_ELEM_LINE;
- }
+ classId = CID_ELEM_LINE;
if (penPtr->classId != classId) {
if (interp != NULL) {
Tcl_AppendResult(interp, "pen \"", name,
diff --git a/src/bltGraph.C b/src/bltGraph.C
index 012bae0..3c693bc 100644
--- a/src/bltGraph.C
+++ b/src/bltGraph.C
@@ -270,7 +270,6 @@ static Tk_EventProc GraphEventProc;
Tcl_ObjCmdProc Blt_GraphInstCmdProc;
static Blt_BindPickProc PickEntry;
-static Tcl_ObjCmdProc StripchartCmd;
static Tcl_ObjCmdProc BarchartCmd;
static Tcl_ObjCmdProc GraphCmd;
static Tcl_CmdDeleteProc GraphInstCmdDeleteProc;
@@ -525,9 +524,7 @@ Blt_GraphTags(
switch (graphObjPtr->classId) {
case CID_ELEM_BAR:
- case CID_ELEM_CONTOUR:
case CID_ELEM_LINE:
- case CID_ELEM_STRIP:
tagProc = Blt_MakeElementTag;
break;
case CID_AXIS_X:
@@ -885,8 +882,6 @@ CreateGraph(Tcl_Interp *interp, int objc, Tcl_Obj *const *objv, ClassId classId)
case CID_ELEM_BAR:
Tk_SetClass(tkwin, "Barchart");
break;
- case CID_ELEM_STRIP:
- Tk_SetClass(tkwin, "Stripchart");
default:
Tk_SetClass(tkwin, "???");
break;
@@ -1519,30 +1514,6 @@ BarchartCmd(ClientData clientData, Tcl_Interp *interp, int objc,
/*
*---------------------------------------------------------------------------
*
- * StripchartCmd --
- *
- * Creates a new window and TCL command representing an instance of a
- * barchart widget.
- *
- * Results:
- * A standard TCL result.
- *
- * Side effects:
- * See the user documentation.
- *
- *---------------------------------------------------------------------------
- */
-/*ARGSUSED*/
-static int
-StripchartCmd(ClientData clientData, Tcl_Interp *interp, int objc,
- Tcl_Obj *const *objv)
-{
- return NewGraph(interp, objc, objv, CID_ELEM_STRIP);
-}
-
-/*
- *---------------------------------------------------------------------------
- *
* DrawMargins --
*
* Draws the exterior region of the graph (axes, ticks, titles, etc)
@@ -1895,7 +1866,6 @@ Blt_GraphCmdInitProc(Tcl_Interp *interp)
static Blt_InitCmdSpec cmdSpecs[] = {
{"graph", GraphCmd,},
{"barchart", BarchartCmd,},
- {"stripchart", StripchartCmd,},
};
return Blt_InitCmds(interp, "::blt", cmdSpecs, 3);
}
@@ -1923,8 +1893,6 @@ Blt_GraphType(Graph *graphPtr)
return GRAPH;
case CID_ELEM_BAR:
return BARCHART;
- case CID_ELEM_STRIP:
- return STRIPCHART;
default:
return 0;
}
diff --git a/src/bltGraph.h b/src/bltGraph.h
index f7ef9cb..13359b1 100644
--- a/src/bltGraph.h
+++ b/src/bltGraph.h
@@ -43,9 +43,7 @@ typedef enum {
CID_AXIS_X,
CID_AXIS_Y,
CID_ELEM_BAR,
- CID_ELEM_CONTOUR,
CID_ELEM_LINE,
- CID_ELEM_STRIP,
CID_MARKER_BITMAP,
CID_MARKER_IMAGE,
CID_MARKER_LINE,