Results 1 to 9 of 9

Thread: Drawing

  1. #1

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247

    Question 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?

  2. #2
    Member 110359's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    43
    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?

  3. #3

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    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.

  4. #4
    Lively Member Liquid Pennies's Avatar
    Join Date
    Jun 2002
    Location
    Charlotte, NC
    Posts
    124
    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

  5. #5
    Member 110359's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne, Australia
    Posts
    43
    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?

  6. #6
    ChuckB
    Guest
    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

  7. #7
    Lively Member Liquid Pennies's Avatar
    Join Date
    Jun 2002
    Location
    Charlotte, NC
    Posts
    124
    that would work real well

  8. #8

    Thread Starter
    Addicted Member Flip's Avatar
    Join Date
    Jun 2002
    Location
    Burke, VA
    Posts
    247
    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?

  9. #9
    Lively Member Liquid Pennies's Avatar
    Join Date
    Jun 2002
    Location
    Charlotte, NC
    Posts
    124
    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
  •  



Click Here to Expand Forum to Full Width