• Print

Author Topic: "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&  (Read 222 times)

funkheld

  • Full Member
  • ***
  • Posts: 229
    • Email
"DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&
« on: June 30, 2011, 10:48:13 AM »
why "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&   ???

gruss


Code: [Select]
scr& = _newimage(800,600,32)
screen scr&

bild& = _NEWIMAGE(200,200 32)
..........
..........
DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10"
..........
_putimage (100,100),bild&,scr&

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&
« Reply #1 on: June 30, 2011, 10:55:39 AM »
DRAW requires a STRING value after "C" to change the color of the object drawing.

You could also use PSET(x, y), _RGB(255, 0, 0) at the start of a DRAW

You must use _RGB colors in 32 bit screens.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Clippy

  • Hero Member
  • *****
  • Posts: 16431
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&
« Reply #2 on: June 30, 2011, 11:14:52 AM »
Missing comma in _NEWIMAGE(200,200 32). Should be _NEWIMAGE(200,200, 32)
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 4664
  • QB Forever
    • Email
Re: "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&
« Reply #3 on: June 30, 2011, 01:31:37 PM »
Code: [Select]
scr& = _newimage(800,600,32)
screen scr&

bild& = _NEWIMAGE(200,200, 32)

_DEST bild& 'select image bild as our destination graphics surface
DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10"
_DEST 0 'switch back to screen page 0

_putimage (100,100),bild&,scr&
Something old... Something new... Something borrowed... Something blue...

funkheld

  • Full Member
  • ***
  • Posts: 229
    • Email
Re: "DRAW "c" + STR$(_RGB(255, 0, 0)) + "r10d10l10d10" in the _newimage bild&
« Reply #4 on: July 01, 2011, 12:21:17 AM »
jup..., thanks.

gruss

  • Print