Previous Thread
Next Thread
Print Thread
Colour //RECTANGLE #1193 06 Feb 18 10:41 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
An easy question as I must of missed the obvious, is there a way to set a GDI //RECTANGLE background colour, for example Yellow the fill only has greys.

Was looking for a simple command that will give us a nice box filled yellow with some central black text.

looked at other variations like //SETBKCOLOR but thats for TextOut.

Re: Colour //RECTANGLE #1194 06 Feb 18 10:53 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
maybe i've stumbled upon it.. (But yet to try)

Quote

To achieve a solid colored rectangle with no apparent border, set the RGB background in both the SETPENEX and SETBRUSH to the same color

Re: Colour //RECTANGLE #1195 06 Feb 18 11:06 AM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Actually, I think just above that in the RECTANGLE topic is the key sentence:

Quote

The light gray, gray, and dark gray fill values will be overridden by a brush defined using SETBRUSH.
The SETPENEX color would just apply to the border of the rectangle. (You have to make both the border and the fill be the same color if you want to achieve a "borderless" rectangle.)

Re: Colour //RECTANGLE #1196 06 Feb 18 11:23 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Thanks, I shell refocus on it in the morning.. smile

Re: Colour //RECTANGLE #1197 07 Feb 18 02:49 AM
Joined: Sep 2003
Posts: 4,158
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,158
Alan here says Thanks, your tips helped.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3