aboutsummaryrefslogtreecommitdiff
path: root/generic/Group.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Group.c')
-rw-r--r--generic/Group.c50
1 files changed, 50 insertions, 0 deletions
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 */