Hi,
I have created a procedure that parses a DXF file, and stores all similar types of drawing objects in seperate files. For example, all circles that are found in the dxf file are output to a 'circles' file, which contains the instructions for drawing them. Similar files are created for lines, and text etc.
Since these dxf files can contain thousands and thousands of objects to draw, when I read these files to actually draw the 'map' onto the screen it takes about 20 seconds. This is reasonable. However, after the map is loaded for the first time, I would expect that zooming in and out on the drawing would be much faster, but as of now, I've only been redrawing the entire map each and every time.
Is there any way to do this, so that I could speed up the 'redrawing' code for zooming in or out, and panning around the map. Is there some way to store 2 dimensional data in different 'regions' so that only the viewable regions are redrawn? I thought this might be possible, but some lines etc span across the entire map.
I don't know what to do, and I need to find something to speed this up or this project will be useless. If you need more information about what I'm trying to do, I can try to explain a little better, as I'm sure the above is confusing to you also.
I have created a procedure that parses a DXF file, and stores all similar types of drawing objects in seperate files. For example, all circles that are found in the dxf file are output to a 'circles' file, which contains the instructions for drawing them. Similar files are created for lines, and text etc.
Since these dxf files can contain thousands and thousands of objects to draw, when I read these files to actually draw the 'map' onto the screen it takes about 20 seconds. This is reasonable. However, after the map is loaded for the first time, I would expect that zooming in and out on the drawing would be much faster, but as of now, I've only been redrawing the entire map each and every time.
Is there any way to do this, so that I could speed up the 'redrawing' code for zooming in or out, and panning around the map. Is there some way to store 2 dimensional data in different 'regions' so that only the viewable regions are redrawn? I thought this might be possible, but some lines etc span across the entire map.
I don't know what to do, and I need to find something to speed this up or this project will be useless. If you need more information about what I'm trying to do, I can try to explain a little better, as I'm sure the above is confusing to you also.