View previous topic :: View next topic |
Author |
Message |
guibson
Joined: 10 Mar 2004 Posts: 54
|
Posted: Tue Apr 19, 2005 2:36 pm Post subject: 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
Last edited by guibson on Fri Feb 11, 2011 10:49 pm; edited 1 time in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 19, 2005 3:07 pm Post subject: |
|
|
Quote: | 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 ? |
Yes. This is related to my previous reply:
Quote: | 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:
Code: | ret = GetClientRect(Picture1.hwnd, rcPic)
.
.
hBitmap = DPlot_GetBitmapEx(DocNum, rcPic.Right - rcPic.Left, rcPic.Bottom - rcPic.Top, DPM) |
And if not, are you centering the bitmap within the PictureBox rather than placing it in the upper left corner? (should be the latter). |
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. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
guibson
Joined: 10 Mar 2004 Posts: 54
|
Posted: Tue Apr 19, 2005 3:28 pm Post subject: |
|
|
Our code is matching the example sent in your reply.
I wrote in my last post :
Quote: | 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 ? |
I made more test and I only get incorrect value for VUR with the 3D graphics.
Thanks !
________
Honda Super Cub history
Last edited by guibson on Fri Feb 11, 2011 10:50 pm; edited 1 time in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 19, 2005 3:33 pm Post subject: |
|
|
I'm confused. If you're copying the example, then what did this:
Quote: | Also our graphics are good size in memory and we reduce them a lot when shown at screen. |
mean?
Also please check to make sure you're using version 1.9.9.1. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
guibson
Joined: 10 Mar 2004 Posts: 54
|
Posted: Tue Apr 19, 2005 3:52 pm Post subject: |
|
|
I'm sorry but sometimes I don't know how to translate correctly from french.
We are using BitBlt to compress the graphic
Quote: | Private 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 |
Our version for DPlotJr is 1.9.9
Thanks !
________
HONDA ST SERIES
Last edited by guibson on Fri Feb 11, 2011 10:50 pm; edited 1 time in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 19, 2005 3:57 pm Post subject: |
|
|
Quote: | I'm sorry but sometimes I don't know how to translate correctly from french. |
There's no reason to be sorry; your English is certainly much better than my French
Quote: | Our version for DPlotJr is 1.9.9 |
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. _________________ Visualize Your Data
support@dplot.com |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 19, 2005 4:02 pm Post subject: |
|
|
... 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 |
|
Back to top |
|
|
guibson
Joined: 10 Mar 2004 Posts: 54
|
Posted: Tue Apr 19, 2005 4:04 pm Post subject: |
|
|
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
Last edited by guibson on Fri Feb 11, 2011 10:50 pm; edited 1 time in total |
|
Back to top |
|
|
DPlotAdmin Site Admin
Joined: 24 Jun 2003 Posts: 2311 Location: Vicksburg, Mississippi
|
Posted: Tue Apr 19, 2005 5:42 pm Post subject: |
|
|
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 |
|
Back to top |
|
|
guibson
Joined: 10 Mar 2004 Posts: 54
|
Posted: Wed Apr 20, 2005 9:17 am Post subject: |
|
|
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 !
________
[URL=http://www.honda-wiki.org/wiki/Honda_Silver_Wing_(scooter)]Honda Silver Wing (scooter) specifications[/URL] |
|
Back to top |
|
|
|