I recently upgraded my copy of DPLOT from 2.1.0.5 to 2.1.1.8 and noticed an unfortunate side effect (for me at least) in doing so. It appears that when displaying a plot using the DATA_3DR data format the generated plot doesn't fill up the entire picturebox anymore. At least it appears that way on my current setup.
The easiest way to understand, I believe, is to try the BTEST2 sample project you provide with the DPLOTLIB. In the 2.1.0.5 version pressing the "gridded data" button followed by the "random data" button produces the following result (basically the random data plot completely covers the previous plot): http://s14.photobucket.com/albums/a337/ ... OT2105.jpg
In the 2.1.1.8 version when I follow the same steps it appears as though the plot doesn't generate wide enough and as a result gets anchored to the left side of the plot, thus not completely covering the previous plot: http://s14.photobucket.com/albums/a337/ ... ot2118.jpg
So is there anyway (new command?) I can get the new version to react the same way as 2.1.0.5 version? Should I start to look for ways to counteract this new result in my program? Could the problem be specific to my computer? Note its not the failure to cover the previous plot that is my concern, its more that it doesn't completely fill the picturebox, and is no longer centered in the picturebox.
That's an unintended side effect of a recent change that, by default, removes most white space from bitmaps. Unfortunately the new [SetImageCrop()] command has no effect on bitmaps retrieved with any of the DPLOTLIB functions, only on bitmaps saved to disk. I'll fix this oversight in the next release, sorry for the trouble.
In the meantime about all you can do is erase the interior of the destination rectangle before drawing the bitmap. In the btest2 demo's Picture1_Paint routine, add
ret = FillRect(hdc, rcPic, GetStockObject(WHITE_BRUSH))
anywhere after "hdc = GetDC(Picture1.hwnd)" and before the BitBlt line.
If it's important to you that the bitmap is centered in the destination rectangle then you'll also need to make use of the bitmap dimensions retrieved with GetObject: