aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorlecoanet2005-10-18 09:32:23 +0000
committerlecoanet2005-10-18 09:32:23 +0000
commit644f9796c22aadecb29599fcf215a8e9a9ea1027 (patch)
treefe880c7248e99f414e5be408f4fd58a7a9f93867 /generic
parent8df802b8d32819254d184596b7292d2ae404dd9c (diff)
downloadtkzinc-644f9796c22aadecb29599fcf215a8e9a9ea1027.zip
tkzinc-644f9796c22aadecb29599fcf215a8e9a9ea1027.tar.gz
tkzinc-644f9796c22aadecb29599fcf215a8e9a9ea1027.tar.bz2
tkzinc-644f9796c22aadecb29599fcf215a8e9a9ea1027.tar.xz
LabelFormat filed width adjustments can be be negative to allow
for small negative jerning of the fileds.
Diffstat (limited to 'generic')
-rw-r--r--generic/Attrs.c12
-rw-r--r--generic/Field.c6
2 files changed, 12 insertions, 6 deletions
diff --git a/generic/Attrs.c b/generic/Attrs.c
index 5b6a74f..bc64977 100644
--- a/generic/Attrs.c
+++ b/generic/Attrs.c
@@ -709,12 +709,12 @@ ZnLFCreate(Tcl_Interp *interp,
if (num_tok != 4) {
goto lf_error_syn;
}
- if (width < 0) {
- width = 0;
- }
- if (height < 0) {
- height = 0;
- }
+ //if (width < 0) {
+ // width = 0;
+ //}
+ //if (height < 0) {
+ // height = 0;
+ //}
field_struct.x_dim = CharToDim(x_char);
field_struct.y_dim = CharToDim(y_char);
diff --git a/generic/Field.c b/generic/Field.c
index ee812a1..3b8eb5e 100644
--- a/generic/Field.c
+++ b/generic/Field.c
@@ -207,6 +207,9 @@ ComputeFieldAttachment(ZnFieldSet field_set,
real_width = text_width < real_width ? real_width : text_width;
}
real_width += (ZnDim) width_spec;
+ if (real_width < 0) {
+ real_width = 0;
+ }
break;
}
case ZN_LF_DIM_LABEL:
@@ -247,6 +250,9 @@ ComputeFieldAttachment(ZnFieldSet field_set,
real_height = text_height < real_height ? real_height : text_height;
}
real_height += (ZnDim) height_spec;
+ if (real_height < 0) {
+ real_height = 0;
+ }
break;
}
case ZN_LF_DIM_LABEL: