Point in 3d graphics
Moderator: DPlotAdmin
Point in 3d graphics
Hi, still trying to find waht is the problem. I think that we found something interesting.
If I move the mouse on the left upper corner of the graphic then the Y value for the mouse is not matching the VUR of the DPM object.
And the difference is matching the Offset.
Can you think about something for that ?
Also our graphics are good size in memory and we reduce them a lot when shown at screen. Can it be the reason why it is happening ?
Thanks !
________
DIGITAL VAPORIZER
If I move the mouse on the left upper corner of the graphic then the Y value for the mouse is not matching the VUR of the DPM object.
And the difference is matching the Offset.
Can you think about something for that ?
Also our graphics are good size in memory and we reduce them a lot when shown at screen. Can it be the reason why it is happening ?
Thanks !
________
DIGITAL VAPORIZER
Last edited by guibson on Fri Feb 11, 2011 10:49 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Yes. This is related to my previous reply:Also our graphics are good size in memory and we reduce them a lot when shown at screen. Can it be the reason why it is happening ?
If you're using StretchBlt or some other method to compress the bitmap instead of BitBlt as in the example, then nothing will work right. The DPM members are for the actual bitmap dimensions, not a picture that has been squeezed to fit in your frame. If you really want to get a large bitmap and reduce the size for display you can probably make this work if you also scale the appropriate values in the DPM structure, though you'll most likely have roundoff errors.The only other thing I can think of is that the lines and symbol are drawn at the correct location and it is the bitmap that is placed incorrectly (or at least not placed as the example expects it to be). When you call DPlot_GetBitmapEx, are you using the size of the PictureBox for the requested size of the bitmap, as in:
And if not, are you centering the bitmap within the PictureBox rather than placing it in the upper left corner? (should be the latter).Code: Select all
ret = GetClientRect(Picture1.hwnd, rcPic) . . hBitmap = DPlot_GetBitmapEx(DocNum, rcPic.Right - rcPic.Left, rcPic.Bottom - rcPic.Top, DPM)
Visualize Your Data
support@dplot.com
support@dplot.com
Our code is matching the example sent in your reply.
I wrote in my last post :
Thanks !
________
Honda Super Cub history
I wrote in my last post :
I made more test and I only get incorrect value for VUR with the 3D graphics.If I move the mouse on the left upper corner of the graphic then the Y value for the mouse is not matching the VUR of the DPM object.
And the difference is matching the Offset.
Can you think about something for that ?
Thanks !
________
Honda Super Cub history
Last edited by guibson on Fri Feb 11, 2011 10:50 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I'm confused. If you're copying the example, then what did this:
Also please check to make sure you're using version 1.9.9.1.
mean?Also our graphics are good size in memory and we reduce them a lot when shown at screen.
Also please check to make sure you're using version 1.9.9.1.
Visualize Your Data
support@dplot.com
support@dplot.com
I'm sorry but sometimes I don't know how to translate correctly from french.
We are using BitBlt to compress the graphic
Thanks !
________
HONDA ST SERIES
We are using BitBlt to compress the graphic
Our version for DPlotJr is 1.9.9Private Sub Picture_Paint(Pic As PictureBox, hBitmap As Long)
Dim bm As BITMAP
Dim hbmpOld As Long
Dim hdc As Long
Dim hdcMem As Long
Dim Ret As Long
If hBitmap <> 0 Then
hdc = GetDC(Pic.hwnd)
hdcMem = CreateCompatibleDC(hdc)
If (hdcMem <> 0) Then
hbmpOld = SelectObject(hdcMem, hBitmap)
Ret = GetObject(hBitmap, Len(bm), bm)
Ret = BitBlt(hdc, rcPic.Left, rcPic.Top, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY)
Ret = SelectObject(hdcMem, hbmpOld)
Ret = DeleteDC(hdcMem)
End If
Ret = ReleaseDC(Pic.hwnd, hdc)
'Pic.Picture = Pic.Image
End If
End Sub
Thanks !
________
HONDA ST SERIES
Last edited by guibson on Fri Feb 11, 2011 10:50 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
There's no reason to be sorry; your English is certainly much better than my FrenchI'm sorry but sometimes I don't know how to translate correctly from french.

This is most likely the problem. Without checking the source again I think turning off the legend ( [ContourLegend(0)] ) will solve the problem in the version you have. I'll post an update to DPlot Jr late tonight that has this problem corrected.Our version for DPlotJr is 1.9.9
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
... and I owe you an apology. I confused you with another user that I earlier corresponded with by e-mail who had a slightly different but similar problem. The end result of that e-mail exchange was version 1.9.9.1 beta, and I assumed you had that version.
Visualize Your Data
support@dplot.com
support@dplot.com
YES it's working but that is causing another problem.
Color scales on the right side of the graphic disappear.
Thanks !

________
Chevrolet corvette c6.r
Color scales on the right side of the graphic disappear.
Thanks !

________
Chevrolet corvette c6.r
Last edited by guibson on Fri Feb 11, 2011 10:50 pm, edited 1 time in total.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Go here. Sorry for all the run-around. Please let me know if this doesn't fix the problem for you.
Visualize Your Data
support@dplot.com
support@dplot.com
It looks like that with version 1.9.9.2 Beta the problem is fixed.
We'll post another topic if we need to.
Thank you !
________
Honda Silver Wing (scooter) specifications
We'll post another topic if we need to.
Thank you !
________
Honda Silver Wing (scooter) specifications