how use PlgBlt() API function?
ok.. the PlgBlt () API functions is for draw an image and it can be rotated too:
Code:
Private Declare Function PlgBlt Lib "gdi32" Alias "PlgBlt" (
ByVal hdcDest As Long,
lpPoint As POINTAPI,
ByVal hdcSrc As Long,
ByVal nXSrc As Long,
ByVal nYSrc As Long,
ByVal nWidth As Long,
ByVal nHeight As Long,
ByVal hbmMask As Long,
ByVal xMask As Long,
ByVal yMask As Long) As Long
i need understand somethings about these function:
what is the lpPoint(POINT structure\type)? what is for? how can i use it?
the hbmMask is the image for transparency?
Re: how use PlgBlt() API function?
Search bing or google for "Plgblt win32".
Re: how use PlgBlt() API function?
"lpPointA pointer to an array of three points in logical space that identify three corners of the destination parallelogram. The upper-left corner of the source rectangle is mapped to the first point in this array, the upper-right corner to the second point in this array, and the lower-left corner to the third point. The lower-right corner of the source rectangle is mapped to the implicit fourth point in the parallelogram."
from: https://docs.microsoft.com/en-us/win...-wingdi-plgblt
and seems that i only need 3 points instead 4 points... was here that i was confused...
Re: how use PlgBlt() API function?
The fourth point coordinates are easily calculated from the other three points:
https://www.google.com/search?newwin...sclient=psy-ab
Re: how use PlgBlt() API function?
please i need understand more 1 thing: imagine that i have 1 plane.
we have the vector's A, B, C and D(the plane have 4 vectors)... every vector have their own X,Y and Z(thing that i know them, so we can use VA, VB, VC and VD to identify the plane vectors....
now how can i add the vectors on point's array?
Re: how use PlgBlt() API function?
Have a look at https://patch.com/new-jersey/wyckoff...her-3-geometry
Here you will find how to calculate thecoordinates of the fourth point.
If it would be not enough - use Google
Re: how use PlgBlt() API function?
Quote:
Originally Posted by
Cambalinho
please i need understand more 1 thing: imagine that i have 1 plane.
we have the vector's A, B, C and D(the plane have 4 vectors)... every vector have their own X,Y and Z(thing that i know them, so we can use VA, VB, VC and VD to identify the plane vectors....
now how can i add the vectors on point's array?
It's up to you to convert your vector's values to XY coordinates to pass to the calculation formulas (if you still need it!) and then to the PlgBlt() API function.
Re: how use PlgBlt() API function?
but the PlgBltpoint(4), is:
Code:
dim VA as POINTAPI
dim VB as POINTAPI
dim VC as POINTAPI
dim VD as POINTAPI
dim PlgBltpoint(4) as POINTAPI
'here i know their X and Y values(i know convert 3D to 2D)
'then i can add the points:
PlgBltpoint(0)=VA
PlgBltpoint(1)=VB
PlgBltpoint(2)=VC
PlgBltpoint(3)=VD
'add it to the function:
PlgBlt PlgBltpoint.....
so is these assignment correct?
so it's the same if i have more than 4 vectors?
Re: how use PlgBlt() API function?
Quote:
Originally Posted by
Cambalinho
but the
PlgBltpoint(4), is:
Code:
dim VA as POINTAPI
dim VB as POINTAPI
dim VC as POINTAPI
dim PlgBltpoint(4) as POINTAPI
...
'then i can add the points:
PlgBltpoint(0)=VA
...
PlgBltpoint(3)=VD
'add it to the function:
PlgBlt PlgBltpoint.....
so is these assignment correct?
Well, as long as VA is the upper-left corner of the parallelogram, VB is the upper-right corner, and VC and the lower-left corner then it looks promising.
Re: how use PlgBlt() API function?
is like:
(upper-left)VA - VB(upper-right)
(low-right)VC - VD(low-left)
Re: how use PlgBlt() API function?
i'm sorry, but you miss some words?
"... VB is the upper-right corner, and VC and the lower-left corner then it looks..."
Re: how use PlgBlt() API function?
Quote:
Originally Posted by
Cambalinho
i'm sorry, but you miss some words?
"... VB is the upper-right corner, and VC and the lower-left corner then it looks..."
What did I miss?:confused:
Re: how use PlgBlt() API function?
maybe i was confused.. nothing more.. sorry
Re: how use PlgBlt() API function?
thank you so much for all... thank you
Re: how use PlgBlt() API function?