diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-17 15:01:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-12-17 15:01:46 (GMT) |
commit | 8150acfc1c5ec02aaba46d2a5571e3934bbe6cf5 (patch) | |
tree | f9aadfcad8485b193d3034a0ba5d1ce0d4f431bb /generic/tkCanvImg.c | |
parent | 477a4dc3ba8b6594484d08f875840d36fb3fce75 (diff) | |
download | tk-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.c | 4 |
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) { |