Autor Beitrag
Hagbard
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP Home / Pro
D7.1 Architekt
BeitragVerfasst: Di 27.04.04 10:52 
Hallo zusammen,

seid kurzen bin Ich in der Delphi und OOP Welt zu gange und habe deswegen noch kaum Erfahrung in dem Bereich.

Ich habe mir nun eine Klasse gebaut, mit einer Funktion, der Ich ein beliebiges Canvas Object übergebe auf dem ich Zeichnen möchte. Ellipse und Co funktioniert auch schon. Aber kann mir vieleicht jemand einen Tip geben, wie Ich in den Hintergrund des Canvas eine Bitmap, Gif oder besser ein JPEG zeichnen kann?

Wäre sehr dankbar über einen Codeschnipsel oder sowas.

Vielen Dank und
Viele Grüße,

Christian

Moderiert von user profile iconPeter Lustig (16:32, 27.04.2004): Topic verschoben
Hagbard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP Home / Pro
D7.1 Architekt
BeitragVerfasst: Di 27.04.04 15:20 
Titel: hat sich erledigt
Sorry, falsches Forum...

aber hat sich inzwischen sowieso erledigt.

Gruß,
Christian
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Di 27.04.04 15:33 
Dann schreibe bitte auch, wie Du das Problem gelöst hast, damit andere auch etwas davon haben! :-)

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Hagbard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP Home / Pro
D7.1 Architekt
BeitragVerfasst: Mi 28.04.04 08:56 
achso, ja vergessen :-(

Also, Ich erzeuge mir ein TPanel Object auf der Form (die Ich an meine Klasse übergebe).
Und Diese hat dann ein Bitmap.Canvas Object, wo ich dann mit Draw(x,y,Bitmap) eine Grafik drauf zeichne.


ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
   // Panel Properties
    pPanel.SetBounds(10,10,400,400);
    pPanel.Name := 'test123';
    pPanel.Caption := 'dsfjkhasdklfhasdkljfh';

   // Bitmap: to draw on Panel  ( same Size as Panel)
    pPanel.Bitmap := TBitmap.Create;
    pPanel.Bitmap.Height := pPanel.Height;
    pPanel.Bitmap.Width := pPanel.Width;

   // Panel Background Picture

    // create Bitmap
    Bitmap1 := TBitmap.Create;
    Bitmap1.LoadFromFile('C:\Media-Archiv\Picture\Seifenblase.bmp');

    pPanel.Bitmap.Canvas.Draw(0,0,Bitmap1);

    Bitmap1.Free;


Moderiert von user profile iconPeter Lustig (09:56, 28.04.2004): Delphi-Tags hinzugefügt
Hagbard Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 142

Win XP Home / Pro
D7.1 Architekt
BeitragVerfasst: Mi 28.04.04 08:57 
Achso, Ich übergebe also kein Canvas mehr, sondern eine Form an meine Klasse auf der Ich dann rum zeichne usw...