Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Change pixel of a window?  (Read 2193 times)

0 Members and 1 Guest are viewing this topic.

Austech

  • Newbie
  • *
  • Posts: 23
    • View Profile
Change pixel of a window?
« on: March 12, 2010, 03:24:50 am »
Sorry if this is in the tutorials, but I can't seem to find it. Is there a way to efficiently change a window's pixel's color. I would use rectangles to draw over it, but I'm planning on making a paint like program. So that would mean that I would need about 1000 * 800 rectangles which seems insane. So is there a efficient way to set a pixel color of a window?

model76

  • Full Member
  • ***
  • Posts: 231
    • View Profile
Change pixel of a window?
« Reply #1 on: March 12, 2010, 05:10:38 am »
Well, you could create an image in the desired size, and set the pixel colors you want with Image.setPixel - that way, you could even have layers. ;)

Take a look at the Displaying a sprite tutorial - the info you seek is there. :)

Austech

  • Newbie
  • *
  • Posts: 23
    • View Profile
Change pixel of a window?
« Reply #2 on: March 12, 2010, 02:26:04 pm »
Thank you very much, I was concidering doing that.