|
-
Jun 25th, 2002, 02:10 AM
#1
Thread Starter
Addicted Member
Drawing
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?
-
Jun 27th, 2002, 11:40 PM
#2
Member
Are you saying that you want to have a large shape drawn or have the mouse look like a large shape???
110359
Why is it that when you kill one man people call you a murderer and when you kill one thousand you are a conqueror?
-
Jun 28th, 2002, 04:21 AM
#3
Thread Starter
Addicted Member
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.
-
Jun 29th, 2002, 12:28 PM
#4
Lively Member
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
-
Jun 29th, 2002, 07:55 PM
#5
Member
Sounds like a good idea.
Why is it that when you kill one man people call you a murderer and when you kill one thousand you are a conqueror?
-
Jun 30th, 2002, 12:23 AM
#6
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
-
Jun 30th, 2002, 11:47 AM
#7
Lively Member
that would work real well
-
Jun 30th, 2002, 12:10 PM
#8
Thread Starter
Addicted Member
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?
-
Jun 30th, 2002, 12:14 PM
#9
Lively Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|