Autor Beitrag
barana
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Mi 22.06.05 20:02 
Hallo,

ich wollte euch fragen, ob und wenn ja, wie man Gegenstände neigt. Ich will z.B., dass sch eine Image um einen bestimmten Winkel kippt. Geht das?

Danke im Voraus
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 22.06.05 21:42 
Moin!

user profile iconbarana hat folgendes geschrieben:
Ich will z.B., dass sch eine Image um einen bestimmten Winkel kippt. Geht das?

Ja.

:wink: Sorry, konnte nicht wiederstehen; benutz´ mal die Suchfunktion, dann findest du auch Code dafür (IMHO sogar hier im DF).

cu
Narses
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mi 22.06.05 21:45 
Jup. Das ist Möglich, jedoch nicht ganz ohne Programmieraufwand.

Die einfachste Version ist, das Bild in einem TImage anzuzeigen, das Kippen aber als "Bildeffekt" direkt in das Bild rein zu berechnen.

Die andere Möglichkeit besteht darin, einen Panel zu nehmen und auf diesem einen OpenGL-Kontext zu erzeugen. Danach musst Du nur noch das Bild als Textur an OGL weiterreichen und als Quad auf den Kontext rendern.

Beides hat seine Nachteile und kaum Vorteile; außer eben, dass es zum Ziel führt.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
battledevil
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 96

WinXP, Win7
C#, C++, VBNET
BeitragVerfasst: Do 23.06.05 11:19 
Ich beschäftige mich auch gerade mit diesem Thema, allerdings im Dreidimensionalen. Von daher hier mal ein kleines OpenGL-Programm, was zeigt, wie man einen Würfel mittels einer Scherungsmatrix manipulieren kann. Du müßtest nur noch dein Bild als Textur auf den Würfel (oder einfacher nur auf ein Quadrat) bringen und dann die Matrix mit den entsprechenden Parametern darauf anwenden und schon hast du eine Verzerrung oder das Kippen des Bildes erreicht (manchmal eignet sich auch eine Rotation, deswegen sind beide Operationen im Programm).
Einloggen, um Attachments anzusehen!
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Do 23.06.05 11:23 
Da gibt es verschiedene Möglichkeiten. Über Hardware (OpenGl) oder selbst programmiert.
Geht es dir um die Geschwindigkeit oder Qualität?
barana Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 39



BeitragVerfasst: Fr 24.06.05 13:44 
Genau danach hab ich gesucht. Gibt es irgendwelche Tutorials zu so einem Programm?
Am besten zu Delphi 6.