Jump to content


Photo

pixel not drawing


  • Please log in to reply
5 replies to this topic

#1 faissialoo

faissialoo

    I get high on orange

  • GMC Member
  • 1027 posts
  • Version:GM8

Posted 22 April 2012 - 07:55 AM

I am making a qr code-like system, except with colors, however this line of code seems to not execute:
draw_set_color(ord(string_char_at(a,22))/**10*/) draw_rectangle(22,0,22+1,0+1,false)
(note I have 100 lines of similar code) This is so I can create the qr-like image, reading works fine though except for character 22 (the one that I am showing you)
  • 0

#2 TheouAegis

TheouAegis

    GMC Member

  • GMC Member
  • 4749 posts
  • Version:GM8

Posted 22 April 2012 - 04:14 PM

Check that draw_set_color code in debug mode and make sure it's not drawing the same color as the background.
  • 0

#3 SenakuJin

SenakuJin

    GMC Member

  • New Member
  • 2765 posts

Posted 22 April 2012 - 04:31 PM

10 should be a very dark red, how are you setting the string 'a'?
  • 0

#4 faissialoo

faissialoo

    I get high on orange

  • GMC Member
  • 1027 posts
  • Version:GM8

Posted 22 April 2012 - 06:26 PM

I am setting a through get_string
  • 0

#5 IsmAvatar

IsmAvatar

    Good Samaritan

  • GMC Member
  • 2411 posts
  • Version:GM8

Posted 22 April 2012 - 06:36 PM

As SenakuJin said, 10 is a *very* dark red, almost indistinguishable from black.
I'm skeptical that this is what you want, which makes you think that it's not working (because you're expecting 10 to be a non-black color, but you can't tell it apart from Black).

Perhaps you could tell us how you want the colors to work - and try to be as specific as possible.
  • 0

#6 faissialoo

faissialoo

    I get high on orange

  • GMC Member
  • 1027 posts
  • Version:GM8

Posted 22 April 2012 - 07:10 PM

The colors are red to black, I use draw_getpixel to read the pixels exact color which coresponds to the charachter, the background is white, which is why I get a fancy y insteated of the charachter
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users