Previous Thread
Next Thread
Print Thread
Colour //RECTANGLE #1193 06 Feb 18 03:41 AM
Joined: Sep 2003
Posts: 4,178
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,178
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 03:53 AM
Joined: Sep 2003
Posts: 4,178
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,178
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 04:06 AM
Joined: Jun 2001
Posts: 11,925
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,925
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 04:23 AM
Joined: Sep 2003
Posts: 4,178
Steve - Caliq Offline OP
Member
OP Offline
Member
Joined: Sep 2003
Posts: 4,178
Thanks, I shell refocus on it in the morning.. smile

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


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3