cocoa: Patch from bug #30815

git-svn-id: trunk@54393 -
This commit is contained in:
sekelsenmat 2017-03-12 21:18:18 +00:00
parent 0a5b1a8a78
commit 54d2c7c435
3 changed files with 5 additions and 3 deletions

View File

@ -343,6 +343,7 @@ type
property Font: TCocoaFont read FFont write SetFont;
property BackgroundColor: TColor read FBackgroundColor write SetBackgoundColor;
property ForegroundColor: TColor read FForegroundColor write SetForegoundColor;
property Layout: NSLayoutManager read FLayout;
end;
{ TCocoaContext }

View File

@ -161,6 +161,7 @@ type
function RawImage_FromCocoaBitmap(out ARawImage: TRawImage; ABitmap, AMask: TCocoaBitmap; ARect: PRect = nil): Boolean;
function RawImage_DescriptionToBitmapType(ADesc: TRawImageDescription; out bmpType: TCocoaBitmapType): Boolean;
function GetImagePixelData(AImage: CGImageRef; out bitmapByteCount: PtrUInt): Pointer;
class function Create32BitAlphaBitmap(ABitmap, AMask: TCocoaBitmap): TCocoaBitmap;
property NSApp: NSApplication read FNSApp;
property CurrentCursor: HCursor read FCurrentCursor write FCurrentCursor;
property CaptureControl: HWND read FCaptureControl;

View File

@ -534,7 +534,7 @@ begin
Result := HFont(TCocoaFont.Create(LogFont, LongFontName));
end;
function Create32BitAlphaBitmap(ABitmap, AMask: TCocoaBitmap): TCocoaBitmap;
class function TCocoaWidgetSet.Create32BitAlphaBitmap(ABitmap, AMask: TCocoaBitmap): TCocoaBitmap;
var
ARawImage: TRawImage;
Desc: TRawImageDescription absolute ARawimage.Description;
@ -548,7 +548,7 @@ var
begin
Result := nil;
if not RawImage_FromBitmap(ARawImage, HBITMAP(ABitmap), HBITMAP(AMask)) then
if not LCLIntf.RawImage_FromBitmap(ARawImage, HBITMAP(ABitmap), HBITMAP(AMask)) then
Exit;
ImgMaskHandle := 0;
@ -578,7 +578,7 @@ begin
end;
try
if not RawImage_CreateBitmaps(ImagePtr^, ImgHandle, ImgMaskHandle, True) then Exit;
if not LCLIntf.RawImage_CreateBitmaps(ImagePtr^, ImgHandle, ImgMaskHandle, True) then Exit;
Result := TCocoaBitmap(ImgHandle);
finally