09-19-2008 01:40 AM
09-19-2008 05:06 AM
I cannot go back now to version 5.5, but looking in CVI6 online help I noticed that GetBitmapData returns height and width in pixels, while PlotBitmap expresses height and width in graph units, possibly different from pixels in either of X / Y directions. Moreover, it seems to me that if graph plotting area height and width are not the same as bitmap dimensions this could lead to some adaptation of the image and possibly to the effects you are observing.
I am not sure of it, but you may try getting graph plotting area dimensions and setting axis scales to the same values and see if your problem is solved.
09-19-2008 06:20 AM
Hello Roberto,
it is correct, that it is possible to expand or shrink the bitmap with the PlotBitmap Function. I tried both but it is the same result. Also I tried to make the control much bigger to see if there is something hidden under the margin of the control. But also if I make the control bigger the image is not in the right size. Some lines are still missing.
cu
Oliver
09-22-2008 12:08 PM
Hello Oliver,
I'm assuming that the reason you're not seeing the entire bitmap in the graph is because the max and min of the axes is not large enough to display the entire bitmap.
As Roberto pointed out, when you pass a specific width and height to PlotBitmap, that width and height is interpreted as graph units, and not pixels. Although this is probably not what you want to do, if your graph axes are set to autoscale, then they should adjust to the full size of the bitmap.
However, passing (0,0) instead of (width,height) changes things completely. Passing (0,0) means that the bitmap should be displayed in its original dimensions, in pixels, whatever those might be, irrespective of the graph units. By default, the lower-left corner of the bitmap is positioned on the X,Y point that you pass to PlotBitmap, and the rest of the bitmap grows up and to the right (by the way, you can override the lower-left corner default by setting the ATTR_PLOT_ORIGIN plot attribute). The important point to note, however, is that when you pass (0,0) for the bitmap dimensions, the graph does not autoscale to the entire bitmap, since the dimensions of the bitmap are in pixels, and not in graph units. In other words, the top and right edges of the bitmap don't have inherent coordinates. The graph only autoscales to the X,Y origin of the bitmap. If this is what you want to do, you'll have to explicitly set the axis end points to something that will allow the full bitmap to be displayed.
Luis
09-27-2008 02:50 AM
Hi Luis,
I am not sure if I understand you right, I will try it
Thanks
Oliver
09-29-2008 11:02 AM
Hi Oliver,
If you attach a screenshot of your graph, along with the actual code that you are using to plot, I might be able to address your problem more specifically.
Luis