In Graphics each color is assigned a number.
How to set text color in c++ graphics. We can color both the background and text color in the output screen in the following ways. Textcolor int color. Enum Colors blue1 green cyan red purple yellow grey dgrey hblue hgreen hred hpurple hyellow hwhite.
Function lovedraw lovegraphicssetColor1 0 0 lovegraphicscirclefill 50 50 20 lovegraphicssetColor0 0 1 lovegraphicscirclefill 50 100 20 myColor 0 1 0 1 lovegraphicssetColormyColor lovegraphicscirclefill 50 150 20 end. This worked for me and it is simple. For changing color of text 2.
You will have to pass the name of the color or corresponding value which is shown in the table in the parameter of the function in which color you want to display the character on the screen or print it. The TextAttributeFONT defines the font to render text and the TextAttributeFOREGROUND sets the color. Just discovered this today 92013.
Dim drawString As String Sample Text Create font and brush. Include include main textcolorRED. Include or include Syntax.
The values defined indicates the position of. However this will set the entire String to be drawn green if you want only parts to be drawn green use JLabel for HTML support up to HTML32. It may also be a numerical constant identifier eg.
That will be enough to change the background color of the text. Then all you have to do is. Dim drawFont As New Font Arial 16 Dim drawBrush As New SolidBrush ColorBlack Create point for upper-left corner of drawing.