diff --git a/source/component/ocv.comp.ViewFMX.pas b/source/component/ocv.comp.ViewFMX.pas index 57b8f5d..bb36f16 100644 --- a/source/component/ocv.comp.ViewFMX.pas +++ b/source/component/ocv.comp.ViewFMX.pas @@ -193,7 +193,9 @@ begin if Assigned(OnBeforePaint) then OnBeforePaint(Self, FImage); +{$IFDEF DELPHIXE5_UP} IPLImageToFMXBitmap(FImage.IpImage, BackBuffer); +{$IFEND} Canvas.DrawBitmap(BackBuffer, RectF(0, 0, BackBuffer.Width, BackBuffer.Height), PaintRect, 1, True); if Assigned(OnAfterPaint) then diff --git a/source/ocv.fmxutils.pas b/source/ocv.fmxutils.pas index 584d48d..e1a90dc 100644 --- a/source/ocv.fmxutils.pas +++ b/source/ocv.fmxutils.pas @@ -3,15 +3,21 @@ unit ocv.fmxutils; interface Uses - ocv.core.types_c, - FMX.Graphics; + ocv.core.types_c +{$IFDEF DELPHIXE5_UP} + , FMX.Graphics +{$IFEND} + ; +{$IFDEF DELPHIXE5_UP} procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline; +{$IFEND} implementation Uses FMX.Types; +{$IFDEF DELPHIXE5_UP} procedure IPLImageToFMXBitmap(const IpImage: pIplImage; const FMXBitmap: TBitmap); inline; Var BitmapData: TBitmapData; @@ -56,5 +62,6 @@ begin FreeMem(SrcData); end; end; +{$IFEND} end.