Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Tgraphic und Timage: Inkompatible Typen? (https://www.delphipraxis.net/15977-tgraphic-und-timage-inkompatible-typen.html)

pepe2502 8. Feb 2004 12:19


Tgraphic und Timage: Inkompatible Typen?
 
Delphi-Quellcode:
{**************************DrawGrid + Gegenstände zeichnen**********************}
PROCEDURE TScene.DrawGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
               Rect: TRect; State: TGridDrawState);

VAR    Objekt : TGegenstand;
    Listenende : Boolean;
             i : Integer;
BEGIN
REPEAT
 Inventar_aus_liste_laden(Objekt,i,Listenende);
 IF (Acol=i) AND (Arow <> 0) THEN
 WITH scene.DrawGrid1.Canvas DO
            Draw(Rect.Left, Rect.Top, [b]Bildspeicher[Objekt.Bildadresse])[/b]
 UNTIL listenende=true;
end;
{**************************DrawGrid + Gegenstände zeichnen**********************}
Hallo,
Ich möchte gern die Bilder aus dem Array[1..100] of timage in mein DrawGrid laden
aber ich kriege immer die Fehlermeldung Inkompatible Typen: Tgraphic und Timage;

Was mach ich falsch :wall: Ist Tgraphic nicht die Klasse von Der Timage erbt???

Bitte um Hilfe!!!

[edit=sakura] [delphi] Mfg, sakura[/edit]

Jens Schumann 8. Feb 2004 12:25

Re: Tgraphic und Timage: Inkompatible Typen?
 
Hallo,
versuch es mal mit
Delphi-Quellcode:
Draw(Rect.Left, Rect.Top, Bildspeicher[Objekt.Bildadresse].Graphic)

Jens Schumann 8. Feb 2004 17:32

Re: Tgraphic und Timage: Inkompatible Typen?
 
Zitat:

Zitat von Jens Schumann
Hallo,
versuch es mal mit
Delphi-Quellcode:
Draw(Rect.Left, Rect.Top, Bildspeicher[Objekt.Bildadresse].Graphic)

es muss
Delphi-Quellcode:
Draw(Rect.Left, Rect.Top, Bildspeicher[Objekt.Bildadresse].Picture.Graphic)
lauten

pepe2502 9. Feb 2004 09:18

Re: Tgraphic und Timage: Inkompatible Typen?
 
Danke, jetzt funktionierts!!! :dp:


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:10 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz