Question Scaling Drawn Lines

GameMakerX

Member
Joined
May 30, 2008
Messages
10
Programming Experience
Beginner
Does anyone know how to scale a line to make it longer in a picturebox? The line is drawn when a button is clicked that executes this line of code:

picturebox.creategraphics.drawline()

The coordinates used for the line are calculated, so don't just say change the coordinates. If there isn't such a way, then can someone know how to zoom a picturebox towards the line or set of lines.

I would appreciate any help offered.
 
Never mind, I found out I just had to multiply each calculated coordinate by the same number like this:

5* 1x, 5*1y, 5*2x, 5*2y
 
Try using ScaleTransform
 
Back
Top