diff --git a/lcl/interfaces/cocoa/cocoagdiobjects.pas b/lcl/interfaces/cocoa/cocoagdiobjects.pas index c8d3329253..60eb48ee54 100644 --- a/lcl/interfaces/cocoa/cocoagdiobjects.pas +++ b/lcl/interfaces/cocoa/cocoagdiobjects.pas @@ -1781,9 +1781,12 @@ begin // if Assigned(MskImage) then // CGContextClipToMask(LayerContext, ImgRect, MskImage); + // convert Y coodrinate of the source bitmap + YSrc := Bmp.Height - (SrcHeight + YSrc); + Result := DrawImageRep( GetNSRect(X, Y, Width, Height), - GetNSRect(XSrc, -YSrc, SrcWidth, SrcHeight), Bmp.ImageRep); + GetNSRect(XSrc, YSrc, SrcWidth, SrcHeight), Bmp.ImageRep); end; {------------------------------------------------------------------------------