* BUG: Paint.Arc() has been fixed.

[GB.QT4]
* BUG: Paint.Begin() now starts with a solid black brush.


git-svn-id: svn://localhost/gambas/trunk@2544 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2009-12-30 00:12:09 +00:00
parent 79e76072d1
commit be7b2620de
2 changed files with 2 additions and 8 deletions

View file

@ -476,6 +476,7 @@ static void ClosePath(GB_PAINT *d)
static void Arc(GB_PAINT *d, float xc, float yc, float radius, float angle, float length)
{
cairo_new_sub_path(CONTEXT(d));
angle = - angle;
if (length >= 0.0)
cairo_arc_negative(CONTEXT(d), xc, yc, radius, angle, angle - length);
else

View file

@ -58,14 +58,6 @@
#define PAINTER(d) EXTRA(d)->painter
#define PATH(d) EXTRA(d)->path
//DRAW_INTERFACE DRAW EXPORT;
//static bool _init = FALSE;
/*static void set_background(GB_DRAW *d, int col);
static void set_foreground(GB_DRAW *d, int col);
static void set_fill_color(GB_DRAW *d, int col);*/
static inline qreal to_deg(float angle)
{
return (qreal)(angle * 180 / M_PI);
@ -97,6 +89,7 @@ static bool init_painting(GB_PAINT *d, QPaintDevice *device)
pen.setMiterLimit(10.0);
pen.setWidthF(2.0);
PAINTER(d)->setPen(pen);
PAINTER(d)->setBrush(Qt::black);
return FALSE;
}