aboutsummaryrefslogtreecommitdiff
path: root/generic/MapInfo.c
diff options
context:
space:
mode:
authorlecoanet2006-10-17 12:10:05 +0000
committerlecoanet2006-10-17 12:10:05 +0000
commit9c7580c5eeec27f4ce772cee18ea04662cd5a278 (patch)
treef6b408c5c4a03e82ecccfcc6844dd23cd8f0fe63 /generic/MapInfo.c
parentebe36f9605d87a095beaaec3dcf7179cd55c5d27 (diff)
downloadtkzinc-9c7580c5eeec27f4ce772cee18ea04662cd5a278.zip
tkzinc-9c7580c5eeec27f4ce772cee18ea04662cd5a278.tar.gz
tkzinc-9c7580c5eeec27f4ce772cee18ea04662cd5a278.tar.bz2
tkzinc-9c7580c5eeec27f4ce772cee18ea04662cd5a278.tar.xz
Ported to Mac Os (without X11).
Diffstat (limited to 'generic/MapInfo.c')
-rw-r--r--generic/MapInfo.c48
1 files changed, 9 insertions, 39 deletions
diff --git a/generic/MapInfo.c b/generic/MapInfo.c
index 2af18bd..24678df 100644
--- a/generic/MapInfo.c
+++ b/generic/MapInfo.c
@@ -314,12 +314,7 @@ ZnMapInfoAddLine(ZnMapInfoId map_info,
}
line_struct.style = line_style;
- if (line_width == 1.0) {
- line_struct.width = 0;
- }
- else {
- line_struct.width = (int) line_width;
- }
+ line_struct.width = (int) line_width;
line_struct.tag = tag;
line_struct.from.x = x_from;
line_struct.from.y = y_from;
@@ -357,12 +352,7 @@ ZnMapInfoReplaceLine(ZnMapInfoId map_info,
}
line_ptr->style = line_style;
- if (line_width == 1.0) {
- line_ptr->width = 0;
- }
- else {
- line_ptr->width = (int) line_width;
- }
+ line_ptr->width = (int) line_width;
line_ptr->tag = tag;
line_ptr->from.x = x_from;
line_ptr->from.y = y_from;
@@ -421,12 +411,7 @@ ZnMapInfoGetLine(ZnMapInfoId map_info,
*line_style = line_ptr->style;
}
if (line_width) {
- if (line_ptr->width == 1.0) {
- *line_width = 0;
- }
- else {
- *line_width = line_ptr->width;
- }
+ *line_width = line_ptr->width;
}
if (x_from) {
*x_from = line_ptr->from.x;
@@ -742,12 +727,7 @@ ZnMapInfoAddArc(ZnMapInfoId map_info,
}
arc_struct.style = NOT_MARKED_STYLE(line_style);
- if (line_width == 1.0) {
- arc_struct.width = 0;
- }
- else {
- arc_struct.width = (int) line_width;
- }
+ arc_struct.width = (int) line_width;
arc_struct.tag = tag;
arc_struct.center.x = center_x;
arc_struct.center.y = center_y;
@@ -779,12 +759,7 @@ ZnMapInfoReplaceArc(ZnMapInfoId map_info,
arc_ptr = ZnListAt(cur_map->arcs, index);
if (arc_ptr) {
arc_ptr->style = NOT_MARKED_STYLE(line_style);
- if (line_width == 1.0) {
- arc_ptr->width = 0;
- }
- else {
- arc_ptr->width = (int) line_width;
- }
+ arc_ptr->width = (int) line_width;
arc_ptr->tag = tag;
arc_ptr->center.x = center_x;
arc_ptr->center.y = center_y;
@@ -837,12 +812,7 @@ ZnMapInfoGetArc(ZnMapInfoId map_info,
*line_style = arc_ptr->style;
}
if (line_width) {
- if (arc_ptr->width == 1.0) {
- *line_width = 0;
- }
- else {
- *line_width = arc_ptr->width;
- }
+ *line_width = arc_ptr->width;
}
if (center_x) {
*center_x = arc_ptr->center.x;
@@ -1127,17 +1097,17 @@ FillMap(ZnMapInfoId map,
if (vm->dashed) {
ZnMapInfoAddLine(map, ZnMapInfoNumLines(map), NULL, ZnMapInfoLineDashed,
- 0, x_cur, y_cur,
+ 1, x_cur, y_cur,
(int) (short) vm->x[i], (int) (short) vm->y[i]);
}
else if (vm->marked) {
ZnMapInfoAddLine(map, ZnMapInfoNumLines(map), NULL, ZnMapInfoLineMarked,
- 0, x_cur, y_cur,
+ 1, x_cur, y_cur,
(int) (short) vm->x[i], (int) (short) vm->y[i]);
}
else {
ZnMapInfoAddLine(map, ZnMapInfoNumLines(map), NULL, ZnMapInfoLineSimple,
- 0, x_cur, y_cur,
+ 1, x_cur, y_cur,
(int) (short) vm->x[i], (int) (short) vm->y[i]);
}