summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-17 15:01:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-17 15:01:46 (GMT)
commit8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5 (patch)
treef9aadfcad8485b193d3034a0ba5d1ce0d4f431bb /generic/tkCanvImg.c
parent477a4dc3ba8b6594484d08f875840d36fb3fce75 (diff)
downloadtk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.zip
tk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.tar.gz
tk-8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5.tar.bz2
In case-statements, use "default:" in stead of "case TK_ANCHOR_CENTER:". So unknown enum values will be handled as "center".
Diffstat (limited to 'generic/tkCanvImg.c')
-rw-r--r--generic/tkCanvImg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index fcdebf0..16b8345 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -491,7 +491,7 @@ ComputeImageBbox(
break;
case TK_ANCHOR_NW:
break;
- case TK_ANCHOR_CENTER:
+ default:
x -= width/2;
y -= height/2;
break;
@@ -747,7 +747,7 @@ ImageToPostscript(
case TK_ANCHOR_S: x -= width/2.0; break;
case TK_ANCHOR_SW: break;
case TK_ANCHOR_W: y -= height/2.0; break;
- case TK_ANCHOR_CENTER: x -= width/2.0; y -= height/2.0; break;
+ default: x -= width/2.0; y -= height/2.0; break;
}
if (!prepass) {