summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvLine.c
diff options
context:
space:
mode:
authorculler <culler>2018-12-20 14:24:15 (GMT)
committerculler <culler>2018-12-20 14:24:15 (GMT)
commita8e38d4f0a2001f03c453a3267e7785496f85359 (patch)
tree51eacb3dd005bb406b879b6ddadacb8cb74b2c37 /generic/tkCanvLine.c
parentf0ba2d7b3ec3c978c9433acfb4766978cbef6175 (diff)
parente26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (diff)
downloadtk-a8e38d4f0a2001f03c453a3267e7785496f85359.zip
tk-a8e38d4f0a2001f03c453a3267e7785496f85359.tar.gz
tk-a8e38d4f0a2001f03c453a3267e7785496f85359.tar.bz2
merge core-8-6-branch.
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r--generic/tkCanvLine.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index 087aa56..7179c85 100644
--- a/generic/tkCanvLine.c
+++ b/generic/tkCanvLine.c
@@ -296,7 +296,7 @@ CreateLine(
linePtr->coordPtr = NULL;
linePtr->capStyle = CapButt;
linePtr->joinStyle = JoinRound;
- linePtr->arrowGC = None;
+ linePtr->arrowGC = 0;
linePtr->arrow = ARROWS_NONE;
linePtr->arrowShapeA = (float)8.0;
linePtr->arrowShapeB = (float)10.0;
@@ -493,9 +493,9 @@ ConfigureLine(
}
if (linePtr->outline.activeWidth > linePtr->outline.width ||
- linePtr->outline.activeDash.number != 0 ||
- linePtr->outline.activeColor != NULL ||
- linePtr->outline.activeStipple != None) {
+ linePtr->outline.activeDash.number ||
+ linePtr->outline.activeColor ||
+ linePtr->outline.activeStipple) {
itemPtr->redraw_flags |= TK_ITEM_STATE_DEPENDANT;
} else {
itemPtr->redraw_flags &= ~TK_ITEM_STATE_DEPENDANT;
@@ -521,12 +521,12 @@ ConfigureLine(
#endif
arrowGC = Tk_GetGC(tkwin, mask, &gcValues);
} else {
- newGC = arrowGC = None;
+ newGC = arrowGC = 0;
}
- if (linePtr->outline.gc != None) {
+ if (linePtr->outline.gc) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->outline.gc);
}
- if (linePtr->arrowGC != None) {
+ if (linePtr->arrowGC) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->arrowGC);
}
linePtr->outline.gc = newGC;
@@ -552,7 +552,7 @@ ConfigureLine(
* line's endpoints (they were shortened when the arrowheads were added).
*/
- if ((linePtr->firstArrowPtr != NULL) && (linePtr->arrow != ARROWS_FIRST)
+ if (linePtr->firstArrowPtr && (linePtr->arrow != ARROWS_FIRST)
&& (linePtr->arrow != ARROWS_BOTH)) {
linePtr->coordPtr[0] = linePtr->firstArrowPtr[0];
linePtr->coordPtr[1] = linePtr->firstArrowPtr[1];
@@ -608,16 +608,16 @@ DeleteLine(
LineItem *linePtr = (LineItem *) itemPtr;
Tk_DeleteOutline(display, &linePtr->outline);
- if (linePtr->coordPtr != NULL) {
+ if (linePtr->coordPtr) {
ckfree(linePtr->coordPtr);
}
- if (linePtr->arrowGC != None) {
+ if (linePtr->arrowGC) {
Tk_FreeGC(display, linePtr->arrowGC);
}
- if (linePtr->firstArrowPtr != NULL) {
+ if (linePtr->firstArrowPtr) {
ckfree(linePtr->firstArrowPtr);
}
- if (linePtr->lastArrowPtr != NULL) {
+ if (linePtr->lastArrowPtr) {
ckfree(linePtr->lastArrowPtr);
}
}
@@ -840,7 +840,7 @@ DisplayLine(
int numPoints;
Tk_State state = itemPtr->state;
- if ((!linePtr->numPoints) || (linePtr->outline.gc == None)) {
+ if ((!linePtr->numPoints) || !linePtr->outline.gc) {
return;
}
@@ -2280,7 +2280,7 @@ LineToPostscript(
if (linePtr->outline.activeColor != NULL) {
color = linePtr->outline.activeColor;
}
- if (linePtr->outline.activeStipple != None) {
+ if (linePtr->outline.activeStipple) {
stipple = linePtr->outline.activeStipple;
}
} else if (state == TK_STATE_DISABLED) {
@@ -2290,7 +2290,7 @@ LineToPostscript(
if (linePtr->outline.disabledColor != NULL) {
color = linePtr->outline.disabledColor;
}
- if (linePtr->outline.disabledStipple != None) {
+ if (linePtr->outline.disabledStipple) {
stipple = linePtr->outline.disabledStipple;
}
}
@@ -2324,7 +2324,7 @@ LineToPostscript(
}
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
- if (stipple != None) {
+ if (stipple) {
Tcl_AppendToObj(psObj, "clip ", -1);
Tcl_ResetResult(interp);
if (Tk_CanvasPsStipple(interp, canvas, stipple) != TCL_OK) {
@@ -2345,7 +2345,7 @@ LineToPostscript(
Tcl_ResetResult(interp);
if ((!linePtr->smooth) || (linePtr->numPoints < 3)) {
Tk_CanvasPsPath(interp, canvas, linePtr->coordPtr, linePtr->numPoints);
- } else if ((stipple == None) && linePtr->smooth->postscriptProc) {
+ } else if (!stipple && linePtr->smooth->postscriptProc) {
linePtr->smooth->postscriptProc(interp, canvas, linePtr->coordPtr,
linePtr->numPoints, linePtr->splineSteps);
} else {
@@ -2407,8 +2407,8 @@ LineToPostscript(
* Output polygons for the arrowheads, if there are any.
*/
- if (linePtr->firstArrowPtr != NULL) {
- if (stipple != None) {
+ if (linePtr->firstArrowPtr) {
+ if (stipple) {
Tcl_AppendToObj(psObj, "grestore gsave\n", -1);
}
if (ArrowheadPostscript(interp, canvas, linePtr,
@@ -2417,7 +2417,7 @@ LineToPostscript(
}
}
if (linePtr->lastArrowPtr != NULL) {
- if (stipple != None) {
+ if (stipple) {
Tcl_AppendToObj(psObj, "grestore gsave\n", -1);
}
if (ArrowheadPostscript(interp, canvas, linePtr,
@@ -2482,11 +2482,11 @@ ArrowheadPostscript(
stipple = linePtr->outline.stipple;
if (Canvas(canvas)->currentItemPtr == (Tk_Item *) linePtr) {
- if (linePtr->outline.activeStipple!=None) {
+ if (linePtr->outline.activeStipple) {
stipple = linePtr->outline.activeStipple;
}
} else if (state == TK_STATE_DISABLED) {
- if (linePtr->outline.activeStipple!=None) {
+ if (linePtr->outline.activeStipple) {
stipple = linePtr->outline.disabledStipple;
}
}
@@ -2495,7 +2495,7 @@ ArrowheadPostscript(
Tk_CanvasPsPath(interp, canvas, arrowPtr, PTS_IN_ARROW);
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
- if (stipple != None) {
+ if (stipple) {
Tcl_AppendToObj(psObj, "clip ", -1);
Tcl_ResetResult(interp);