jWalker Posted January 22, 2012 Posted January 22, 2012 Hey, i am working on sth like an engine - like making the creation of games etc in GDI+ eaysier... Now i just want to let objects be able to rotate. I know that it can be done with these Matrix-things... I have this.. Func _DrawRectangle( $cWindow, $iX, $iY, $iWidth, $iHeight, $sColor = "Black" ) If IsString( $sColor ) Then $sColor = _StringToColor( $sColor ) $cBrush = _GDIPlus_BrushCreateSolid( ) _GDIPlus_BrushSetSolidColor( $cBrush, $sColor ) $hMatrix = _GDIPlus_MatrixCreate( ) _GDIPlus_MatrixRotate( $hMatrix, 30 ) _GDIPlus_GraphicsFillRect( $hMatrix, $iX, $iY, $iWidth, $iHeight, $cBrush ) EndFunc Can i now just put the matrix into my Window? if then how? I have seen some examples that made an image of the part that shall be rotated. But if a rectangle and a circle would overlap, wouldnt the rectangle part of the circle's picture get a part of the rectangle object?
UEZ Posted January 22, 2012 Posted January 22, 2012 You have created on each object its own graphic buffer which can be rotated seperately. Afterwards copy the objects to the main screen.Have a look to Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now