That's something what I've been trying to do but it just doesn't seem to increase the scale to a level that would look better.
What you said by locating the top left corner and subtrcting that from all x and y, that would mean I subtract 0,0 from all x,y because from top left corner is 0,0. I don't get that point.
Besides what I tried to do was I subtracted 72 from all x's as they all has 72.something values, so I was left with 0.something values. Next I multiplied that by 100 to increase the scale. I did the same with y's by subtracting 32 and multiplying by 100.
Now logically that seems fine but the scale is still not big enough. e.g. I had some points like this:
X: 72.9444, Y: 33.7070
X: 72.9429, Y: 33.7064
X: 72.9414, Y: 33.7062
X: 72.9396, Y: 33.7059
X: 72.9384, Y: 33.7059
X: 72.9372, Y: 33.7056
X: 72.9359, Y: 33.7053
X: 72.9345, Y: 33.7047
X: 72.9319, Y: 33.7033
X: 72.9299, Y: 33.7017
Now as you can very well see even when I do all the maths, I end up with numbers like this:
Points: 94.44
Points: 94.29
Points: 94.14
Points: 93.96
Points: 93.84
Points: 93.72
Points: 93.59
Points: 93.45
Points: 93.19
Points: 92.99
Now I cannot multiply the orginal numbers by 1000 because that would result in the points being way outside the size of the image and all I'll get would be a nice big box filled with some color.
Plus I don't think I'll be able to use these points to draw a polygon because ImageFilledPolygon only takes integers as input. This also hampers my progress as I end up at square one with a point difference that does not matter when I reduce the numbers to integers.
Robert wrote:
There are two stages that I would go through to do this:
1) Find the top left-hand point co-ordinates (i presume that the co-ords are from the top left - if they're not then find the relevant corner's co-ordinates). Subtract the co-ordinates from the polygon points, i.e. subtract corner x from x and corner y from y. Do this for ALL points within view.
2) Next you magnify the points so that there is a larger difference between them, e.g:
new coords = (x,y) * zoom
You can alter the value of zoom to whatever you like - if you set it to 1 then the result will be the same as you started with. If you set it below 1 then you will zoom out. If you set it above 1 then you will zoom in.
Remove points that are not in the visible area - ones that aren't will be below 0 in the x or y co-ord shouldn't be displayed. Points above the highest value of the visible area should be removed too.
O yea - if you want to find out the size of the visible area then:
if you know the original ....