aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bezier.c17
-rw-r--r--generic/Arc.c17
-rw-r--r--generic/Group.c50
-rw-r--r--generic/Map.c43
-rw-r--r--generic/Reticle.c17
-rw-r--r--generic/Tabular.c15
-rw-r--r--generic/Window.c2
7 files changed, 133 insertions, 28 deletions
diff --git a/Bezier.c b/Bezier.c
index adfa243..9f55f53 100644
--- a/Bezier.c
+++ b/Bezier.c
@@ -811,6 +811,22 @@ Draw(Item item)
/*
**********************************************************************************
*
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ /*WidgetInfo *wi = item->wi;
+ BezierItem bz = (BezierItem) item;*/
+
+}
+
+
+/*
+ **********************************************************************************
+ *
* IsSensitive --
*
**********************************************************************************
@@ -1168,6 +1184,7 @@ static ItemClassStruct BEZIER_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
PickVertex, /* PickVertex */
diff --git a/generic/Arc.c b/generic/Arc.c
index a4f83d8..69966cd 100644
--- a/generic/Arc.c
+++ b/generic/Arc.c
@@ -1151,6 +1151,22 @@ Draw(Item item)
/*
**********************************************************************************
*
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ /*WidgetInfo *wi = item->wi;
+ ArcItem arc = (ArcItem) item;*/
+
+}
+
+
+/*
+ **********************************************************************************
+ *
* IsSensitive --
*
**********************************************************************************
@@ -1611,6 +1627,7 @@ static ItemClassStruct ARC_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
NULL, /* PickVertex */
diff --git a/generic/Group.c b/generic/Group.c
index 268904b..1cd79ae 100644
--- a/generic/Group.c
+++ b/generic/Group.c
@@ -840,6 +840,55 @@ Draw(Item item)
/*
**********************************************************************************
*
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ GroupItem group = (GroupItem) item;
+ WidgetInfo *wi = item->wi;
+ Item current_item;
+ ZnBBox bbox, old_damaged_area, *clip_box;
+
+ PushTransform(item);
+ PushClip(group, True);
+ if (group->clip != ZN_NO_ITEM) {
+ ITEM_P.CurrentClip(wi, NULL, &clip_box, NULL);
+ old_damaged_area = wi->damaged_area;
+ IntersectBBox(&wi->damaged_area, clip_box, &bbox);
+ wi->damaged_area = bbox;
+ }
+
+ current_item = group->tail;
+ while (current_item != ZN_NO_ITEM) {
+ if (ISSET(current_item->flags, VISIBLE_BIT)) {
+ IntersectBBox(&wi->damaged_area, &current_item->item_bounding_box, &bbox);
+ if (!IsEmptyBBox(&bbox)) {
+ if (current_item->class != ZnGroup) {
+ PushTransform(current_item);
+ }
+ current_item->class->Render(current_item);
+ if (current_item->class != ZnGroup) {
+ PopTransform(current_item);
+ }
+ }
+ }
+ current_item = current_item->previous;
+ }
+
+ if (group->clip != ZN_NO_ITEM) {
+ wi->damaged_area = old_damaged_area;
+ }
+ PopClip(group, True);
+ PopTransform(item);
+}
+
+
+/*
+ **********************************************************************************
+ *
* IsSensitive --
*
**********************************************************************************
@@ -1077,6 +1126,7 @@ static ItemClassStruct GROUP_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
NULL, /* PickVertex */
diff --git a/generic/Map.c b/generic/Map.c
index e7dd9e6..2d6a8ed 100644
--- a/generic/Map.c
+++ b/generic/Map.c
@@ -79,10 +79,6 @@ typedef struct _MapItemStruct {
ZnList marks;
ZnList symbols;
ZnList texts;
-#ifdef PERFOS
- Chrono chrono_trans;
- Chrono chrono_draw;
-#endif
} MapItemStruct, *MapItem;
@@ -227,12 +223,6 @@ Init(Item item,
map->marks = NULL;
map->symbols = NULL;
map->texts = NULL;
-
-#ifdef PERFOS
- map->chrono_trans = NewChrono("Temps de transfo carte");
- map->chrono_draw = NewChrono("Temps de dessin carte");
- RazChronos();
-#endif
return ZN_OK;
}
@@ -487,10 +477,6 @@ ComputeCoordinates(Item item,
map_info = map->map_info;
-#ifdef PERFOS
- StartUCChrono(map->chrono_trans);
-#endif
-
num_points = 0;
num_dashed_points = 0;
num_dotted_points = 0;
@@ -850,12 +836,6 @@ ComputeCoordinates(Item item,
ZnListAssertSize(map->dotted_arcs, num_dotted_arcs);
ZnListAssertSize(map->mixed_arcs, num_mixed_arcs);
-#ifdef PERFOS
- StopUCChrono(map->chrono_trans);
- PrintChronos();
- RazChronos();
-#endif
-
/* If map is filled, only the vectors description is valid. */
if (!map->filled) {
if (map->symbol_patterns) {
@@ -1042,9 +1022,6 @@ Draw(Item item)
}
else { /* Not filled */
-#ifdef PERFOS
- StartUCChrono(map->chrono_draw);
-#endif
if (ZnListSize(map->vectors)) {
SetLineStyle(wi->dpy, wi->gc, LINE_SIMPLE);
values.fill_style = FillSolid;
@@ -1277,12 +1254,21 @@ Draw(Item item)
}
}
}
+}
-#ifdef PERFOS
- StopUCChrono(map->chrono_draw);
- PrintChronos();
- RazChronos();
-#endif
+
+/*
+ **********************************************************************************
+ *
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ /*WidgetInfo *wi = item->wi;
+ MapItem map = (MapItem) item;*/
}
@@ -1396,6 +1382,7 @@ static ItemClassStruct MAP_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
NULL, /* PickVertex */
diff --git a/generic/Reticle.c b/generic/Reticle.c
index 5250634..792bc59 100644
--- a/generic/Reticle.c
+++ b/generic/Reticle.c
@@ -374,6 +374,22 @@ Draw(Item item)
/*
**********************************************************************************
*
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ /*WidgetInfo *wi = item->wi;
+ ReticleItem reticle = (ReticleItem) item;*/
+
+}
+
+
+/*
+ **********************************************************************************
+ *
* IsSensitive --
*
**********************************************************************************
@@ -494,6 +510,7 @@ static ItemClassStruct RETICLE_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
NULL, /* PickVertex */
diff --git a/generic/Tabular.c b/generic/Tabular.c
index 8f179e0..1cbe425 100644
--- a/generic/Tabular.c
+++ b/generic/Tabular.c
@@ -324,6 +324,20 @@ Draw(Item item)
/*
**********************************************************************************
*
+ * Render --
+ *
+ **********************************************************************************
+ */
+static void
+Render(Item item)
+{
+ ITEM_P.RenderFields(&((TabularItem) item)->field_set);
+}
+
+
+/*
+ **********************************************************************************
+ *
* IsSensitive --
*
**********************************************************************************
@@ -574,6 +588,7 @@ static ItemClassStruct TABULAR_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Render,
IsSensitive,
Pick,
NULL, /* PickVertex */
diff --git a/generic/Window.c b/generic/Window.c
index 972fb6b..eae6e84 100644
--- a/generic/Window.c
+++ b/generic/Window.c
@@ -504,6 +504,7 @@ IsSensitive(Item item,
return True;
}
+
/*
**********************************************************************************
*
@@ -680,6 +681,7 @@ static ItemClassStruct WINDOW_ITEM_CLASS = {
ComputeCoordinates,
ToArea,
Draw,
+ Draw, /* Render use the same code as Draw. */
IsSensitive,
Pick,
NULL, /* PickVertex */