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

Author Topic: paint program  (Read 2199 times)

0 Members and 2 Guests are viewing this topic.

Gregory

  • Newbie
  • *
  • Posts: 41
    • View Profile
paint program
« on: January 05, 2010, 04:16:24 am »
I'm making a paint program, called "simple paint", but I have a vague idea of how to make the paint bucket. Any ideas?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
paint program
« Reply #1 on: January 05, 2010, 04:51:41 am »
Find the color of the pixel that is clicked with the paint bucket, then for every pixel surrounding it that is the same color, change the color to the new color, and do that for all pixels surrounding those, and so on. By "surrounding", I mean directly to the left, right, top, or bottom of the pixel. No diagonals.
I use the latest build of SFML2

Gregory

  • Newbie
  • *
  • Posts: 41
    • View Profile
paint program
« Reply #2 on: January 05, 2010, 05:50:59 am »
Can I use a list of pixels that color, and I got this list ouver adjacent pixels with this color put it in the list

 

anything