mirror of
https://github.com/Laex/Delphi-OpenCV.git
synced 2024-11-15 15:55:53 +01:00
Merge pull request #90 from micha137/fmxgraphics-only-from-xe5
Fix compilation of the FMX package with Delphis older than XE5
This commit is contained in:
commit
404651d945
@ -193,7 +193,9 @@ begin
|
|||||||
if Assigned(OnBeforePaint) then
|
if Assigned(OnBeforePaint) then
|
||||||
OnBeforePaint(Self, FImage);
|
OnBeforePaint(Self, FImage);
|
||||||
|
|
||||||
|
{$IFDEF DELPHIXE5_UP}
|
||||||
IPLImageToFMXBitmap(FImage.IpImage, BackBuffer);
|
IPLImageToFMXBitmap(FImage.IpImage, BackBuffer);
|
||||||
|
{$IFEND}
|
||||||
Canvas.DrawBitmap(BackBuffer, RectF(0, 0, BackBuffer.Width, BackBuffer.Height), PaintRect, 1, True);
|
Canvas.DrawBitmap(BackBuffer, RectF(0, 0, BackBuffer.Width, BackBuffer.Height), PaintRect, 1, True);
|
||||||
|
|
||||||
if Assigned(OnAfterPaint) then
|
if Assigned(OnAfterPaint) then
|
||||||
|
@ -3,15 +3,21 @@ unit ocv.fmxutils;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
ocv.core.types_c,
|
ocv.core.types_c
|
||||||
FMX.Graphics;
|
{$IFDEF DELPHIXE5_UP}
|
||||||
|
, FMX.Graphics
|
||||||
|
{$IFEND}
|
||||||
|
;
|
||||||
|
|
||||||
|
{$IFDEF DELPHIXE5_UP}
|
||||||
procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline;
|
procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline;
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
Uses FMX.Types;
|
Uses FMX.Types;
|
||||||
|
|
||||||
|
{$IFDEF DELPHIXE5_UP}
|
||||||
procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline;
|
procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline;
|
||||||
Var
|
Var
|
||||||
BitmapData: TBitmapData;
|
BitmapData: TBitmapData;
|
||||||
@ -56,5 +62,6 @@ begin
|
|||||||
FreeMem(SrcData);
|
FreeMem(SrcData);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$IFEND}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user