Page 2 of 2 FirstFirst 12
Results 41 to 42 of 42

Thread: Very Simple Drawing Program

  1. #41
    New Member
    Join Date
    Dec 2022

    Re: Very Simple Drawing Program

    Quote Originally Posted by wqweto View Post
    Can you implement saving zoomed images based on some scale variable e.g. scale = 0.5 for half the size, scale = 2.0 for double the original size?
    Yes, not problem. I will try to implement that.

  2. #42
    Sinecure devotee
    Join Date
    Aug 2013
    Southern Tier NY

    Re: Very Simple Drawing Program

    If you want to implement zooming, I would suggest using the ScaleTransform method of the Graphics Class to do the scaling and avoid all the math coordinate calculations and manipulation for your drawing.
    If you draw the image and then all the lines in whatever coordinate system you choose, you can scale the drawing up or down or even rotated without having to modify the coordinates of your drawing at all.

    This post includes a couple of links that references a number of attachments with various examples of drawing situations. In particular, the "VB_Drawing_Demo" and the "PaperPuppetExample" both make use of the ScaleTransform to increase or decrease the size of the drawing without having to change any of the core drawing routines at all.
    "Anyone can do any amount of work, provided it isn't the work he is supposed to be doing at that moment" Robert Benchley, 1930

Page 2 of 2 FirstFirst 12

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