summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvLine.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 21:17:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-03 21:17:50 (GMT)
commite1188642314803f517fa3b8cf093d7ef0d20fe3e (patch)
treefbc638cb9281478d92aec05f4a34e93953413bc1 /generic/tkCanvLine.c
parent5dd4251644115731a5874f1a6ad24edd6f5369e8 (diff)
parent9997531222f9a5ea6e8da18ca5eb0241f06c0c61 (diff)
downloadtk-e1188642314803f517fa3b8cf093d7ef0d20fe3e.zip
tk-e1188642314803f517fa3b8cf093d7ef0d20fe3e.tar.gz
tk-e1188642314803f517fa3b8cf093d7ef0d20fe3e.tar.bz2
re-base to 'cleaned-up' core-8-6-branch
Diffstat (limited to 'generic/tkCanvLine.c')
-rw-r--r--generic/tkCanvLine.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c
index f862238..087aa56 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 = NULL;
+ linePtr->arrowGC = None;
linePtr->arrow = ARROWS_NONE;
linePtr->arrowShapeA = (float)8.0;
linePtr->arrowShapeB = (float)10.0;
@@ -521,12 +521,12 @@ ConfigureLine(
#endif
arrowGC = Tk_GetGC(tkwin, mask, &gcValues);
} else {
- newGC = arrowGC = NULL;
+ newGC = arrowGC = None;
}
- if (linePtr->outline.gc) {
+ if (linePtr->outline.gc != None) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->outline.gc);
}
- if (linePtr->arrowGC) {
+ if (linePtr->arrowGC != None) {
Tk_FreeGC(Tk_Display(tkwin), linePtr->arrowGC);
}
linePtr->outline.gc = newGC;
@@ -654,7 +654,7 @@ ComputeLineBbox(
state = Canvas(canvas)->canvas_state;
}
- if (!(linePtr->numPoints) || (state==TK_STATE_HIDDEN)) {
+ if (!(linePtr->numPoints) || (state == TK_STATE_HIDDEN)) {
linePtr->header.x1 = -1;
linePtr->header.x2 = -1;
linePtr->header.y1 = -1;
@@ -667,7 +667,7 @@ ComputeLineBbox(
if (linePtr->outline.activeWidth > width) {
width = linePtr->outline.activeWidth;
}
- } else if (state==TK_STATE_DISABLED) {
+ } else if (state == TK_STATE_DISABLED) {
if (linePtr->outline.disabledWidth > 0) {
width = linePtr->outline.disabledWidth;
}
@@ -840,7 +840,7 @@ DisplayLine(
int numPoints;
Tk_State state = itemPtr->state;
- if ((!linePtr->numPoints) || !linePtr->outline.gc) {
+ if ((!linePtr->numPoints) || (linePtr->outline.gc == None)) {
return;
}
@@ -2277,20 +2277,20 @@ LineToPostscript(
if (linePtr->outline.activeWidth > width) {
width = linePtr->outline.activeWidth;
}
- if (linePtr->outline.activeColor) {
+ if (linePtr->outline.activeColor != NULL) {
color = linePtr->outline.activeColor;
}
- if (linePtr->outline.activeStipple) {
+ if (linePtr->outline.activeStipple != None) {
stipple = linePtr->outline.activeStipple;
}
} else if (state == TK_STATE_DISABLED) {
if (linePtr->outline.disabledWidth > 0) {
width = linePtr->outline.disabledWidth;
}
- if (linePtr->outline.disabledColor) {
+ if (linePtr->outline.disabledColor != NULL) {
color = linePtr->outline.disabledColor;
}
- if (linePtr->outline.disabledStipple) {
+ if (linePtr->outline.disabledStipple != None) {
stipple = linePtr->outline.disabledStipple;
}
}
@@ -2324,7 +2324,7 @@ LineToPostscript(
}
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
- if (stipple) {
+ if (stipple != None) {
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 && linePtr->smooth->postscriptProc) {
+ } else if ((stipple == None) && linePtr->smooth->postscriptProc) {
linePtr->smooth->postscriptProc(interp, canvas, linePtr->coordPtr,
linePtr->numPoints, linePtr->splineSteps);
} else {
@@ -2495,7 +2495,7 @@ ArrowheadPostscript(
Tk_CanvasPsPath(interp, canvas, arrowPtr, PTS_IN_ARROW);
Tcl_AppendObjToObj(psObj, Tcl_GetObjResult(interp));
- if (stipple) {
+ if (stipple != None) {
Tcl_AppendToObj(psObj, "clip ", -1);
Tcl_ResetResult(interp);