Autor Beitrag
the_immortal
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78



BeitragVerfasst: Do 20.10.05 17:49 
Meine Frage ist, ob man aus einem TBitmap ein Kreis austecken könnte, das heisst, dass man dann das bild nur in einem Kreis hat und rund herum z.B weiss
TM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 74

Win xp
D7 ET
BeitragVerfasst: Do 20.10.05 17:59 
Hi,

Vllt gehts auch einfacher, aber ich würds so machen:
Les dein Bild in ein Image, zeichne in ein Bitmap(gleiche Größe) einen Kreis/Ellipse und fülle den Inhalt transparent, den Rand zB weiß. Dann zeichnest du das Bitmap auf dein Bild.

wie die einzelnen Funktionen heißen, weiß ich net auswendig, aber es gibt ja a Hilfe.

müsste so klappen.

_________________
Dieser Beitrag enthält keine Schreibfehler.
Das sind versteckte Hinweise.
the_immortal Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 78



BeitragVerfasst: Do 20.10.05 18:19 
user profile iconTM hat folgendes geschrieben:
Hi,

Vllt gehts auch einfacher, aber ich würds so machen:
Les dein Bild in ein Image, zeichne in ein Bitmap(gleiche Größe) einen Kreis/Ellipse und fülle den Inhalt transparent, den Rand zB weiß. Dann zeichnest du das Bitmap auf dein Bild.

wie die einzelnen Funktionen heißen, weiß ich net auswendig, aber es gibt ja a Hilfe.

müsste so klappen.


Meinst du 2 images mit je einem bitmap inside übereinander?
TM
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 74

Win xp
D7 ET
BeitragVerfasst: Do 20.10.05 18:30 
Ja, eines mit deinem Bild drin und eines, in das du die Maske zeichnest.
und dann zeichnest du das MaskenBitmap mit
ausblenden Delphi-Quelltext
1:
DeinImage.Canvas.Draw(0,0,MaskenImage.Picture.Graphic);					

über dein Bild.
hab auch schon mal was ähnliches gemacht, es geht!

..

_________________
Dieser Beitrag enthält keine Schreibfehler.
Das sind versteckte Hinweise.
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: Fr 21.10.05 09:13 
Das geht mit Hilfe der GDI sehr einfach und das sogar ohne großen Ressourcen-Overhead:

Dafür kannst Du Paths nutzen:
Maske auf Zielfläche Zeichnen (deinen Kreis) und dann mit BitBlt dein eigentliches Bild draufkopieren. Damit kannst Du sogar Masken mit beliebiger Form zeichnen ;-)

_________________
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.