- } else if (l->surface.grad == RR_SURFACE_SOLID)
- gradient_solid(l, 0, 0, w, h);
- else
- gradient_render(&l->surface, w, h);
-
- RECT_SET(tarea, 0, 0, w, h);
- if (l->surface.grad != RR_SURFACE_PARENTREL) {
- if (l->surface.relief != RR_RELIEF_FLAT) {
- switch (l->surface.bevel) {
- case RR_BEVEL_1:
- tarea.x += 1; tarea.y += 1;
- tarea.width -= 2; tarea.height -= 2;
- break;
- case RR_BEVEL_2:
- tarea.x += 2; tarea.y += 2;
- tarea.width -= 4; tarea.height -= 4;
- break;
- }
- } else if (l->surface.border) {
- tarea.x += 1; tarea.y += 1;
- tarea.width -= 2; tarea.height -= 2;
- }
- }
+ } else
+ RrRender(a, w, h);
+
+ {
+ gint l, t, r, b;
+ RrMargins(a, &l, &t, &r, &b);
+ RECT_SET(tarea, l, t, w - l - r, h - t - b);
+ }