Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Software-Projekte der Mitglieder (https://www.delphipraxis.net/26-software-projekte-der-mitglieder/)
-   -   [Andorra2D] - TPictureCollection (https://www.delphipraxis.net/100893-%5Bandorra2d%5D-tpicturecollection.html)

Niels14 5. Okt 2007 05:56


[Andorra2D] - TPictureCollection
 
Hi,
ich wollte gerade die Beispiel Tutorials von Andorra2D durcharbeiten, habe aber jetzt ein kleines Problem.
(Ich verwende hier momentan Delphi 7)
Er findet das TPictureCollection Object nicht. (In AddApps.pas -> Undeclared identifier: 'TPictureCollection')
Ich denke dass ich alle Andorra Bibliotheken eingebunden habe aber irgendwie findet er das nicht. In welcher Bibliothek ist es genau?
Danke fuer eure Hilfe

LG Niels

marabu 5. Okt 2007 06:22

Re: [Andorra2D] - TPictureCollection
 
Hallo Niels,

TPictureCollection findest du in der Unit AdDraws, wenn du im source folder so vorgehst:

Code:
FINDSTR /I "TPictureCollection" *.pas
Grüße vom marabu nach down under

Niels14 5. Okt 2007 06:58

Re: [Andorra2D] - TPictureCollection
 
Hallo Marabu, Danke fuer Deine schneller Antwort :-).
Aber ich bekomme als Loesung die Felder angezeigt:

ADDraws.pas:{TPictureCollectionItem}
ADDraws.pas:{TPictureCollection}

Im Source Code sieht das folgend aus:

Delphi-Quellcode:
procedure TRectList.SetItem(AIndex:integer;AItem:TRect);
begin
  PRect(inherited Items[AIndex])^ := AItem;
end;

{TPictureCollectionItem}

constructor TAdImage.Create(AAdDraw:TAdDraw);
begin
  inherited Create;
  FTexture := TAdTexture.Create(AAdDraw);
  FParent := AAdDraw;
  FParent.RegisterNotifyEvent(Notify);
  Rects := TRectList.Create;
  FColor := clWhite;
  FAlpha := 255;
  FOwnTexture := true;
  FDetails := 1;
  Initialize;
end;
und

Delphi-Quellcode:
function TAdImage.GetPatternRect(ANr: Integer):TRect;
begin
  result := Rects[ANr];
end;


{TPictureCollection}

function TAdImageList.Add(AName: string): TAdImage;
begin
  result := TAdImage.Create(FParent);
  result.Name := AName;
  result.FreeByList := true;
  inherited Add(result);
end;
irgendwie stelle ich mich saudaemlich an oder etwas stimmt nicht mit meinen sources.
Ich habe das erst mal so geloest dass ich statt TPictureCollection direkt TAdImageList verwende.
Habe ich vielleicht einen alten Andorra Code? oder einen zu neuen? :-)
Danke noch mal fuer Deine schnelle Antwort!

igel457 5. Okt 2007 10:58

Re: [Andorra2D] - TPictureCollection
 
Du hast gerade den neuen Andorra Code - TPictureCollection heißt TAdImageList und TPictureCollectionItem heißt TAdImage - so ist es vom Namen her logischer. Apropos: TPerformanceCounter heißt in der neusten CVS-Version auch TAdPerformanceCounter.

Niels14 5. Okt 2007 11:21

Re: [Andorra2D] - TPictureCollection
 
Super Danke!
Dann war ich doch auf dem richtigen Weg! :-)


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:56 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