QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: krovit on November 11, 2020, 05:47:15 pm

Title: DRAW (help)
Post by: krovit on November 11, 2020, 05:47:15 pm
Code: QB64: [Select]
  1. PSET(100, 100), _rgb32(255,255,14): DRAW "U20R20G20P"
  2.  

Hello everyone!

it should be simple... but I can't do it: how do you fill the triangle with a color?

Title: Re: DRAW (help)
Post by: FellippeHeitor on November 11, 2020, 05:53:53 pm
Code: QB64: [Select]
  1. PSET (100, 100), _RGB(255, 255, 14)
  2. DRAW "U20R20G20 BM 105,90 P" + STR$(_RGB(255, 255, 14)) + "," + STR$(_RGB(255, 255, 14))

Don't use _RGB32 in legacy screen modes, use just _RGB(), which will find a color in the current palette that most closely matches your desired color.
In the change above, after drawing the triangle, I turn the drawing off (B) then (M)ove to a pixel inside the drawn triangle and (P)aint using that color until a border of the same color is found.
Title: Re: DRAW (help)
Post by: krovit on November 11, 2020, 07:24:41 pm
Thank you Fellippe,
i could have tried for a whole month and i wouldn't have solved anything...