cocoa: invert bitmap coordintes

git-svn-id: trunk@43474 -
This commit is contained in:
paul 2013-11-23 09:43:58 +00:00
parent c78384ddba
commit 6f8d2278a7

View File

@ -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;
{------------------------------------------------------------------------------