I am trying to make a Paint-like progam where the user can draw, and i would be able to do this except i need to restrict to mouse to large pixels (like being zoomed in a whole lot). In other words, do you know how to draw on a large grid?
Printable View
I am trying to make a Paint-like progam where the user can draw, and i would be able to do this except i need to restrict to mouse to large pixels (like being zoomed in a whole lot). In other words, do you know how to draw on a large grid?
Are you saying that you want to have a large shape drawn or have the mouse look like a large shape???:confused:
110359
What i am saying is instead of a very small grid where you fill in pixels, i have a very large grid where you fill in big squares. I think it would be easiest with ScaleWidth and Scale Height, but the squares dont seem to come out right.
so you basically want to do paint's zoom. well, i would just stretchblt the picture to say, 800% and then where ever you paint an indidual pixel, it calculates which grid block it's in (since its 800%, every 8 zoomed in pixels would form 1 when zoomed to 100%) and fill in the rest of the 63 pixels in that same block.
hmm...i cant really think of an easy alternative solution that a lot of math.
hey, the more work you put into it, the more likely your going to actually use it later :-D
Sounds like a good idea.:)
Hi,
To add to Liquid Pennies' idea could you increase the drawwidth property x8 to fill in all of those extra pixels for you?
Regards,
ChuckB
that would work real well
Yeah, that would work with some tweaking but im also haveing another problem. If i keep a pixle moving around under the mouse (and its not drawing), does anyone have a really good way i can snap it to the grid?
well, assumming you have a transparency:
calculate how many pixels your furthest pixel is to the edge of your canvas. if its <=10 then automatically set it to the edge.
that will take quite a few if-then statements, but hey, it will be worth it.
sounds like your making a disabled photoshop. hope it goes far.