English
Source / code snippets

Bitmap Gdiplus Hpic Rotation rotate

 
Andreas Miethe, Beitrag=52242, Zeitpunkt=09.05.2009

2peter Bierbach, Beitrag=52209, Zeitpunkt=08.05.2009
Hello Andreas, I need once more your Help.
I have one Image hpic& drawn.
this transportiere I with the Gdi into hbitmap& and show it on.

now would like I the hpic& before rotate let around the Mittelpunkt and then first into hbitmap& bring.

How are the?


there had I too first schlau make.
CompileMarkSeparation
 $H windows.ph
 $H includes\Functions_GDIPLUS.ph
 $H includes\GDIP_Imageging.ph
 $I includes\GDIP_Helper.inc
Declare hPic&,hwin&,lngImage&,hBitmap&
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
Var gdiplusToken& = InitGDIPlus()GDIPlus starten
hpic&=create(hnewpic,128,128,$ffffff)
Var ImWidth& = %BmpX  Breite und
Var ImHeight& = %BmpY Höhe sichern, brauchen wir zum Berechnen
startpaint hpic&
Rectangle 0,0-4,4
line 10,10-120,120
endpaint
Diagonale berechnen, hier kann ich endlich mal was mit dem
Satz des Pythagoras anfangen !
Var Dig& = Sqrt(Sqr(ImWidth&) + Sqr(ImHeight&)) Diagonale ( a²+b² = c² ) die Wurzel von c² ist die Diagonale
hbitmap&=create(hnewpic,Dig&,Dig&,0)
~GdipCreateBitmapFromHBITMAP(hPic&,0,@Addr(lngImage&))
StartPaint hBitmap&
Var Imagedc& = 0
~GdipCreateFromhDC(%hdc,ADDR(ImageDC&))
~GdipRotateWorldTransform(ImageDc&,Single(225.0),1)=45 Grad nach rechts
~GdipTranslateWorldTransform(ImageDc&,Single(Dig&/2),Single(Dig&/2),1)
~GdipDrawImageRectI(ImageDc&,lngImage&,ImWidth&/2,ImHeight&/2,-ImWidth&,-ImHeight&)
EndPaint
startpaint hwin&
DrawPic hBitmap&,0,0;0
DrawPic hPic&,180,180;0
endpaint
WaitInput
DeleteObject hPic&
DeleteObject hBitmap&
~GdipDeleteGraphics(ImageDc&)
~GdipDisposeImage(lngImage&)
ExitGDIPlus(gdiplusToken&) GDIPlus beenden
End
 
05/09/09  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.835 Views

Untitledvor 0 min.
Sven Bader08/11/21
Rainer Hoefs04/05/18
funkheld04/01/14
Andre Rohland11/11/12
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie