![]() |
Rätselhafte EInvalidGraphicOperation
Hallo!
Wie die Themenüberschrift schon sagt, kann ich mir die genannte Exception nicht erklären. Hier ist die Methode, in der sie auftritt:
Delphi-Quellcode:
Kann mir jemand helfen. Warum läuft dieser Code nicht. TBitmaap ist die Klasse aus der Graphics Unit.
constructor TScreen64. Create( YourCanvas: TCanvas; xres,yres: Longint;pixf:TPixelFormat);
begin WasAssigned:= False; gCanvas:= YourCanvas; bmWidth:= xres; bmHeight:=yres; bmBitsPixel:= pixf; bmBpp:= (bmBitsPixel + 7) shr 3; BackBuffer:= TBitmap. Create; {new back buffer} //Bitmap wird ordnungsgemäß erzeugt BackBuffer. Width:= bmWidth; BackBuffer. Height:= bmHeight; //Der integrierte Debugger zegt mir den Wert 97 //Das kann nicht zu groß sein case bmBitsPixel of pf8bit: BackBuffer. PixelFormat:= Graphics.pf8bit; pf15bit: BackBuffer. PixelFormat:= Graphics.pf15bit; pf16bit: BackBuffer. PixelFormat:= Graphics.pf16bit; pf32bit: BackBuffer. PixelFormat:= Graphics.pf32bit; else raise exception.Create('Unsupported pixel format!'); end; //------------------------------------------------------------------------------ bmBits:= BackBuffer.ScanLine[ BackBuffer.Height]; //Hier kommt die Exception //------------------------------------------------------------------------------ Longint( bmBits):= Longint( bmBits) + bmBpp* (BackBuffer.width); {seek to end of DIB} SetupBits; SetClipper(); end; Ratlose Grüße von profmaster |
Re: Rätselhafte EInvalidGraphicOperation
Der Index für ScanLine läuft wahrscheinlich von 0 bis Pred(Height)...
Grüße vom marabu |
Re: Rätselhafte EInvalidGraphicOperation
Hallo marabu!
Zitat:
Hab das an meheren Stellen, die mir der Bebugger noch gezeigt hat, korrigieren müssen. Jetzt läuft das Programm. Danke für die schnelle Hilfe sagt profmaster |
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:40 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz