getting proper resolution graphics
Posted: Sun Dec 11, 2005 4:51 am
Hello,
I have a bit of a tricky problem ( I think).
Lets say I have a plot where the x- and y-axes are 100 pixels long. I am also graphing data that possibly goes from 0..99. That means, that each data point should be one pixel, since there is 100 pixels, and 100 possible data values.
Everything is good so far.
Now lets say, that I have an option to have a multiplier for my dot sizes, and the user picks 0.5. Well, that would mean my dots should be 0.5 pixels wide onscreen. Well, they cannot be, so I draw them as 1 pixel wide.
However, for a printer, where I have higher resolution, I have the resolution to show the different between a 0.5x dot and a regular dot. So, I tried to do TeeCreateMetafile(true,rect(0,0,200,200)) to create a metafile that would be larger. The problem is that while the plot was larger, the fonts stayed the same size, so the fonts looked smaller in the metafile than in the plot on screen.
I need to know how I can draw the chart to a larger metafile when needed, so I can see the difference between the "0.5 pixel" and "1 pixel" plots when printed. I cannot simply print the plot using the print method, since we have to manipulate the metafile in various ways first.
I notice that the printPartial method takes in a plain tcanvas. Can I use this to print to a metafile canvas, and set the printresolution parameter appropriately to have the font sizes adjusted.... I am not quite sure how to set the printresolution in this case, since the instructions are a little vague.
Thanks for your help
I have a bit of a tricky problem ( I think).
Lets say I have a plot where the x- and y-axes are 100 pixels long. I am also graphing data that possibly goes from 0..99. That means, that each data point should be one pixel, since there is 100 pixels, and 100 possible data values.
Everything is good so far.
Now lets say, that I have an option to have a multiplier for my dot sizes, and the user picks 0.5. Well, that would mean my dots should be 0.5 pixels wide onscreen. Well, they cannot be, so I draw them as 1 pixel wide.
However, for a printer, where I have higher resolution, I have the resolution to show the different between a 0.5x dot and a regular dot. So, I tried to do TeeCreateMetafile(true,rect(0,0,200,200)) to create a metafile that would be larger. The problem is that while the plot was larger, the fonts stayed the same size, so the fonts looked smaller in the metafile than in the plot on screen.
I need to know how I can draw the chart to a larger metafile when needed, so I can see the difference between the "0.5 pixel" and "1 pixel" plots when printed. I cannot simply print the plot using the print method, since we have to manipulate the metafile in various ways first.
I notice that the printPartial method takes in a plain tcanvas. Can I use this to print to a metafile canvas, and set the printresolution parameter appropriately to have the font sizes adjusted.... I am not quite sure how to set the printresolution in this case, since the instructions are a little vague.
Thanks for your help