Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using color in Draw string
#2
You're in 32-bit screen mode; you have to use 32-bit color values as below:

Code: (Select All)
WWidth = 1120: WHeight = 820: Mode = 32: Size = 24
Screen _NewImage(WWidth, WHeight, Mode)
SetFont: f& = _LoadFont("C:\WINDOWS\fonts\courbd.ttf", Size, "monospace"): _Font f&
lhs = (_DesktopWidth - WWidth) / 2
_ScreenMove lhs, 86 ' centre display on screen
CPL = WWidth / _PrintWidth("X")

Print &HFFFF0000& 'Red
Print &HFF00FF00& 'Green
Print &HFF0000FF& 'blue

PSet (500, 200): Draw "r100 c-65536 d100 c-16711936 l100 c-16776961 u100"
Sleep
Reply


Messages In This Thread
Using color in Draw string - by PhilOfPerth - 04-04-2024, 05:49 AM
RE: Using color in Draw string - by SMcNeill - 04-04-2024, 06:00 AM
RE: Using color in Draw string - by PhilOfPerth - 04-04-2024, 06:07 AM
RE: Using color in Draw string - by PhilOfPerth - 04-04-2024, 08:55 AM
RE: Using color in Draw string - by SMcNeill - 04-04-2024, 09:02 AM
RE: Using color in Draw string - by PhilOfPerth - 04-04-2024, 09:19 AM
RE: Using color in Draw string - by TerryRitchie - 04-04-2024, 02:52 PM
RE: Using color in Draw string - by Pete - 04-04-2024, 10:31 AM
RE: Using color in Draw string - by Dimster - 04-04-2024, 05:42 PM
RE: Using color in Draw string - by TerryRitchie - 04-04-2024, 07:20 PM
RE: Using color in Draw string - by Pete - 04-04-2024, 05:58 PM
RE: Using color in Draw string - by Dimster - 04-04-2024, 08:18 PM
RE: Using color in Draw string - by TerryRitchie - 04-04-2024, 08:48 PM
RE: Using color in Draw string - by Pete - 04-04-2024, 09:29 PM
RE: Using color in Draw string - by SMcNeill - 04-04-2024, 10:14 PM
RE: Using color in Draw string - by PhilOfPerth - 04-04-2024, 10:22 PM
RE: Using color in Draw string - by TDarcos - 04-05-2024, 01:05 AM
RE: Using color in Draw string - by PhilOfPerth - 04-05-2024, 02:09 AM
RE: Using color in Draw string - by SMcNeill - 04-04-2024, 10:28 PM
RE: Using color in Draw string - by Pete - 04-04-2024, 10:45 PM
RE: Using color in Draw string - by Pete - 04-05-2024, 02:23 AM
RE: Using color in Draw string - by PhilOfPerth - 04-05-2024, 02:34 AM
RE: Using color in Draw string - by Pete - 04-05-2024, 02:36 AM
RE: Using color in Draw string - by TerryRitchie - 04-05-2024, 03:53 PM
RE: Using color in Draw string - by PhilOfPerth - 04-05-2024, 11:48 PM
RE: Using color in Draw string - by TerryRitchie - 04-06-2024, 01:29 AM
RE: Using color in Draw string - by PhilOfPerth - 04-06-2024, 02:27 AM
RE: Using color in Draw string - by NakedApe - 04-05-2024, 07:11 PM
RE: Using color in Draw string - by TerryRitchie - 04-05-2024, 09:25 PM
RE: Using color in Draw string - by TerryRitchie - 04-05-2024, 09:39 PM
RE: Using color in Draw string - by TerryRitchie - 04-09-2024, 09:52 PM



Users browsing this thread: 1 Guest(s)