Hi,
I have a problem...

I have a subclass of Guigfx.mcc. The class dislays a picture. In my
subclass I have an own Draw function. That function draws something on
top of the picture. That works nicely for lines and for circles for
example.
Now I want to draw a filled circle over the picture. How can I do that?
I tried AreaCircle() but that crashes the system imediately. Then I
tried Flood() to fill my Circle, but that seems to have no effect.

For a simple example I used a plain gray picture, drawed a circle and
tried to fill it.

static ULONG test_MUIM_Draw(struct IClass *cl, Object *obj, struct
MUIP_Draw * msg)
{
   DoSuperMethodA(cl, obj, (Msg) msg);
 {
   int iPixelWidth=_mright(obj)-_mleft(obj);
   int iPixelHeight=_mbottom(obj)-_mtop(obj);
                
   int iX0= _mleft(obj) + PixelWidth/2;                          
   int iY0= _mtop(obj)  + iPixelHeight/2;

   SetAPen(_rp(obj), _rp(obj)->AOlPen);
   DrawEllipse(_rp(obj),iX0,iY0,20,20);
   Flood(_rp(obj),0,iX0,iY0);
 }
   return (0);
}

So questions: 

Why does the example code not fill my circle?

How to correctly draw a filled shape? (Later filling could be the
wrong way as the undelying picture could prevent the circle from
beeing properly filled?)

Best regards selco, http://selco.da.ru


------------------------------------

Visit http://www.amiga.dk/tumult for MUI-related
information, especially about MUI custom classes.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MUI/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/MUI/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to