diff options
author | Dylan Simon <dylan@dylex.net> | 2009-09-27 14:44:35 -0400 |
---|---|---|
committer | James Cloos <cloos@jhcloos.com> | 2009-09-27 14:44:35 -0400 |
commit | 5e825a140f4022b88dd7a1a20a9a01b653f1a95c (patch) | |
tree | 36a25fc8b364053ea0c126013eabaa7cb69075b8 /transform.c | |
parent | dbb8401026c421d64a2962e6ac6eb900f6dc141e (diff) |
Add xrender support
Optionally draw all components (except shape) with xrender.
Enabled by default. Xlib rendering can be restored by
"configure --without-xrender" or "xeyes +render".
Signed-off-by: Dylan Simon <dylan@dylex.net>
Signed-off-by: James Cloos <cloos@jhcloos.com>
Diffstat (limited to 'transform.c')
-rw-r--r-- | transform.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/transform.c b/transform.c index 0f02498..5f63516 100644 --- a/transform.c +++ b/transform.c @@ -83,25 +83,20 @@ TDrawArc ( #endif void -TFillArc (Display *dpy, Drawable d, GC gc, Transform *t, - double x, double y, double width, double height, - int angle1, int angle2) +Trectangle(const Transform *t, const TRectangle *i, TRectangle *o) { - int xx, xy, xw, xh; - - xx = Xx(x,y,t); - xy = Xy(x,y,t); - xw = Xwidth (width, height, t); - xh = Xheight (width, height, t); - if (xw < 0) { - xx += xw; - xw = -xw; - } - if (xh < 0) { - xy += xh; - xh = -xh; - } - XFillArc (dpy, d, gc, xx, xy, xw, xh, angle1, angle2); + o->x = t->mx * i->x + t->bx; + o->y = t->my * i->y + t->by; + o->width = t->mx * i->width; + o->height = t->my * i->height; + if (o->width < 0) { + o->x += o->width; + o->width = -o->width; + } + if (o->height < 0) { + o->y += o->height; + o->height = -o->height; + } } void |