Le 17/12/2012 11:49, Charlie Reinl a écrit :
>
> Oh, thats right.
> But sorry, that I don't understand.
> By coding
>
>    Paint.Background = Color.Cyan           ' set the Background Color
>    Paint.Brush = Paint.Color(0)            ' set the Foreground Color
>    Paint.ClipRect(10, 135,50,22)      ' draw Cyan Rectangle
>    Paint.Text("Hello",10,135,50,22,3) ' write Hallo into the Rectangle
>    Paint.Fill
>
> Paint.Background is really confusing for setting a 'Foreground'
>

Again: Paint.Background and Paint.Brush are the same property, with a 
different syntax. There is no "foreground" or "background" color with 
the Paint class. Paint.Background is there only to ease the 
implementation of the Draw class on top of the Paint class.

Please read the Paint class documentation carefully, and/or the cairo 
documentation, to understand the concept of path.

In your code, Paint.Fill() fills the path defined by Paint.Text with the 
black color affected to Paint.Brush(), that's all.

Regards,

-- 
Benoît Minisini

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to