Author Topic: DRAW (help)  (Read 1561 times)

0 Members and 1 Guest are viewing this topic.

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
DRAW (help)
« 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?

Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)

FellippeHeitor

  • Guest
Re: DRAW (help)
« Reply #1 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.
« Last Edit: November 11, 2020, 05:55:33 pm by FellippeHeitor »

Offline krovit

  • Forum Regular
  • Posts: 179
    • View Profile
Re: DRAW (help)
« Reply #2 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...
Nothing is easy, especially when it appears simple (and nothing could be as dangerous as trying to do good to others)