Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Chromium Embedded - XE3 (https://www.delphipraxis.net/175024-delphi-chromium-embedded-xe3.html)

API 25. Mai 2013 17:53

Delphi Chromium Embedded - XE3
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,

Beim Kompilieren der unit ceffmx.pas zeigt es einige Fehlermeldungen an. Kann mir jemand helfen, den Code für XE3 lauffähig zu machen?

Zitat:

[dcc32 Error] ceffmx.pas(440): E2003 Undeclared identifier: 'ScanLine'
Delphi-Quellcode:
function CefGetBitmap(const browser: ICefBrowser; typ: TCefPaintElementType; Bitmap: TBitmap): Boolean;
var
  w, h, i: Integer;
  p, s: Pointer;
begin
  browser.GetSize(typ, w, h);
  Bitmap.SetSize(w, h);
  GetMem(p, h * w * 4);
  try
    Result := browser.GetImage(typ, w, h, p);
    s := p;
    for i := 0 to h - 1 do
    begin
      Move(s^, Bitmap.ScanLine[i]^, w*4);
      Inc(Integer(s), w*4);
    end;
  finally
    FreeMem(p);
  end;
end;
Zitat:

[dcc32 Error] ceffmx.pas(440): E2017 Pointer type required
Delphi-Quellcode:
    Move(s^, Bitmap.ScanLine[i]^, w*4);

Zitat:

[dcc32 Error] ceffmx.pas(809): E2003 Undeclared identifier: 'StartLine'
Delphi-Quellcode:
   dst := @PByte(StartLine)[offset]; // StartLine ist vermutlich eine Eigenschaft von TBitmap
Zitat:

[dcc32 Error] ceffmx.pas(815): E2034 Too many actual parameters
Delphi-Quellcode:
    Move(src^, dst^, offset);
Zitat:

[dcc32 Error] ceffmx.pas(1060): E2003 Undeclared identifier: 'Platform'
Delphi-Quellcode:
    with AbsoluteToLocal(Platform.GetMousePos) do

sx2008 25. Mai 2013 18:23

AW: Delphi Chromium Embedded - XE3
 
Das Problem ist wohl, dass Pointer s keinen Datentyp hat.
Ungetestet (hab kein XE)
Delphi-Quellcode:
function CefGetBitmap(const browser: ICefBrowser; typ: TCefPaintElementType; Bitmap: TBitmap): Boolean;
var
  w, h, i: Integer;
  p : Pointer;
  s : PInteger; // Zeiger auf einen Integer mit 4 Byte
begin
  browser.GetSize(typ, w, h);
  Bitmap.PixelFormat := pf32bit; // Wichtig
  Bitmap.SetSize(w, h);

  GetMem(p, h * w * 4);
  try
    Result := browser.GetImage(typ, w, h, p);
    s := PInteger(p);
    for i := 0 to h - 1 do
    begin
      Move(s^, Bitmap.ScanLine[i]^, w*4);
      Inc(s);
    end;
  finally
    FreeMem(p);
  end;
end;

rweinzierl 26. Mai 2013 07:51

AW: Delphi Chromium Embedded - XE3
 
Hallo

Vielleicht hilft das

https://groups.google.com/forum/#!to...ed/rLt4wgRDy0c

mfg

Reinhold

jaenicke 26. Mai 2013 09:49

AW: Delphi Chromium Embedded - XE3
 
Wenn du nicht FireMonkey nutzt, brauchst du die ceffmx.pas gar nicht.


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