Is it possible to move a picture using the BITBLT method only by a unit of scale (userscalemode) instead of pixel?
And why is this method only moving the picture if a change of the picture has occured?
Printable View
Is it possible to move a picture using the BITBLT method only by a unit of scale (userscalemode) instead of pixel?
And why is this method only moving the picture if a change of the picture has occured?
What do you mean by this?Quote:
And why is this method only moving the picture if a change of the picture has occured?
I show a calculated value as a point on a scale. with the help of BITBLT I can show not only the actual value, but also the values of the last x-seconds (i.e. the points make up a line). But if there is no calculated new point, the picture is not moved by the function until anykind of figure is painted on the picture. The amount of movement however is correctly adjusted for the time, i.e. if there was no movement for 60 sec. the next move jumps for 60 sec.
to calculate between different modes you can use ScaleX and ScaleY properties of your picturebox or form you blitt to.
I'm not sure what you meant by moving a picture with bitblt, and the malfunctioning of it, but it would help if you pasted some code..
Here is some code; Picture is an Picturebox with scaleheight=-600, scaleTop=600, Scalewidth is running from 5 to 1000 (set during runtime)
This code is called by a timer, which also counts the time in seconds (Time), Sekunden will be 0 whenever a minute is complete. I tried to get a picture of 600 seconds (scaleheight -600!!), but since BITBLT moves with Pixel I had to decrease the speed by using BITBLT only each 3. second.
Now if MeasuredValue is below 0 nothing is printed until the next minute. In this case the picture will not be "moved" by BITBLT until a new line is printed on completion of a minute. At this time the picture is jumps for a complete minute.
if MeasuredValue>0 then
Picture.PSet(MeasuredValue), 6), Linecolor
End if
If Sekunden = 0 Then
Picture.Line (Picture.ScaleLeft,6)-(Picture.ScaleWidth * 0.05 + Picture.ScaleLeft, 6), vbBlack, B
End If
If Sekunden / 3 = Int(Sekunden / 3) Then
Ret = BitBlt(Picture.hDC, 0, 0, 1500,Picture.Height, Gram(i).hDC, 0, 1, SRCCOPY)
End If