-
September 20th, 2020, 09:24 AM
#1
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?
-
September 20th, 2020, 01:32 PM
#2
Re: how use PlgBlt() API function?
Search bing or google for "Plgblt win32".
-
September 20th, 2020, 01:38 PM
#3
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...
-
September 21st, 2020, 01:29 PM
#4
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
Last edited by VictorN; September 21st, 2020 at 01:30 PM.
Reason: spell check
Victor Nijegorodov
-
September 21st, 2020, 03:02 PM
#5
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?
-
September 21st, 2020, 04:11 PM
#6
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
Victor Nijegorodov
-
September 21st, 2020, 04:15 PM
#7
Re: how use PlgBlt() API function?
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.
Victor Nijegorodov
-
September 21st, 2020, 04:23 PM
#8
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?
Last edited by Cambalinho; September 21st, 2020 at 04:46 PM.
-
September 22nd, 2020, 01:31 AM
#9
Re: how use PlgBlt() API function?
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.
Victor Nijegorodov
-
September 22nd, 2020, 02:11 PM
#10
Re: how use PlgBlt() API function?
is like:
(upper-left)VA - VB(upper-right)
(low-right)VC - VD(low-left)
-
September 22nd, 2020, 02:42 PM
#11
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..."
-
September 22nd, 2020, 03:04 PM
#12
Re: how use PlgBlt() API function?
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?
Victor Nijegorodov
-
September 22nd, 2020, 03:07 PM
#13
Re: how use PlgBlt() API function?
maybe i was confused.. nothing more.. sorry
-
September 22nd, 2020, 03:27 PM
#14
Re: how use PlgBlt() API function?
thank you so much for all... thank you
-
September 22nd, 2020, 03:43 PM
#15
Re: how use PlgBlt() API function?
You are welcome!
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|