jagadeesh
Dec 17th, 2001, 03:12 AM
Hello
We are developing one tools for GIS related Projects.
In this tools we draw lines and points on the vb form
by taking values form the text file.
Every thing is fine up to drawing of the lines and points.
Now we want to add Zoom in and Zoom out functionality to
that.
We deviding the form as per the min and max values which
are taken from the text file for the first time.
After that i want to set up the min and max values for
the map as per mouse clicks. This mouse clicks are for
, We drag the mouse to select the part that is to be Zoomed.
For this i want min and max (x and y)values.
At present i am taking mouse down values for minx and miny.
and mouse up values for maxx and maxy values.
but according to i am not getting exactly what i want.
Below is the code to draw line, reading values from the
text file.This is only the part that is which convert or
divides the form as per min and max values which are read
from the text file.
dx = 768 / ((maxx - minx))
dy = 521 / ((maxy - miny))
diffx1 = Abs(((minx - X1)) * dx)
diffy1 = Abs(((miny - Y1)) * dy)
diffx2 = Abs(((minx - X2)) * dx)
diffy2 = Abs(((miny - Y2)) * dy)
Newy1 = Totalheight - (diffy1)
Newy2 = Totalheight - (diffy2)
Line (diffx1, Newy1)-(diffx2, Newy2), QBColor(5)
Now i want to write code for the Zoom.
Can any one help me on this.
If u want any clarifications feel free to ask
Thank in advance
We are developing one tools for GIS related Projects.
In this tools we draw lines and points on the vb form
by taking values form the text file.
Every thing is fine up to drawing of the lines and points.
Now we want to add Zoom in and Zoom out functionality to
that.
We deviding the form as per the min and max values which
are taken from the text file for the first time.
After that i want to set up the min and max values for
the map as per mouse clicks. This mouse clicks are for
, We drag the mouse to select the part that is to be Zoomed.
For this i want min and max (x and y)values.
At present i am taking mouse down values for minx and miny.
and mouse up values for maxx and maxy values.
but according to i am not getting exactly what i want.
Below is the code to draw line, reading values from the
text file.This is only the part that is which convert or
divides the form as per min and max values which are read
from the text file.
dx = 768 / ((maxx - minx))
dy = 521 / ((maxy - miny))
diffx1 = Abs(((minx - X1)) * dx)
diffy1 = Abs(((miny - Y1)) * dy)
diffx2 = Abs(((minx - X2)) * dx)
diffy2 = Abs(((miny - Y2)) * dy)
Newy1 = Totalheight - (diffy1)
Newy2 = Totalheight - (diffy2)
Line (diffx1, Newy1)-(diffx2, Newy2), QBColor(5)
Now i want to write code for the Zoom.
Can any one help me on this.
If u want any clarifications feel free to ask
Thank in advance