mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 00:49:18 +02:00
Cocoa: Add version of TCocoaContext.TextOut() with float instead of Integer position params
This commit is contained in:
parent
a574aec237
commit
038a93c1fd
@ -410,6 +410,7 @@ type
|
|||||||
procedure BackgroundFill(dirtyRect:NSRect);
|
procedure BackgroundFill(dirtyRect:NSRect);
|
||||||
procedure Ellipse(X1, Y1, X2, Y2: Integer);
|
procedure Ellipse(X1, Y1, X2, Y2: Integer);
|
||||||
procedure TextOut(X, Y: Integer; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: PInteger);
|
procedure TextOut(X, Y: Integer; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: PInteger);
|
||||||
|
procedure TextOut(X, Y: CGFloat; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: CGFloatPtr);
|
||||||
procedure DrawEdge(var Rect: TRect; edge: Cardinal; grfFlags: Cardinal);
|
procedure DrawEdge(var Rect: TRect; edge: Cardinal; grfFlags: Cardinal);
|
||||||
procedure Frame(const R: TRect);
|
procedure Frame(const R: TRect);
|
||||||
procedure Frame3dClassic(var ARect: TRect; const FrameWidth: integer; const Style: TBevelCut);
|
procedure Frame3dClassic(var ARect: TRect; const FrameWidth: integer; const Style: TBevelCut);
|
||||||
@ -1789,6 +1790,21 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCocoaContext.TextOut(X, Y: Integer; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: PInteger);
|
procedure TCocoaContext.TextOut(X, Y: Integer; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: PInteger);
|
||||||
|
var
|
||||||
|
CharsDeltaFloat: Array of CGFloat;
|
||||||
|
i: integer;
|
||||||
|
begin
|
||||||
|
if CharsDelta <> nil then begin
|
||||||
|
SetLength(CharsDeltaFloat, Count);
|
||||||
|
for i := 0 to Count - 1 do
|
||||||
|
CharsDeltaFloat[i] := CharsDelta[i];
|
||||||
|
TextOut(X,Y,Options, Rect, UTF8Chars, Count, @CharsDeltaFloat[0]);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
TextOut(X,Y,Options, Rect, UTF8Chars, Count, CGFloatPtr(nil));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaContext.TextOut(X, Y: CGFloat; Options: Longint; Rect: PRect; UTF8Chars: PChar; Count: Integer; CharsDelta: CGFloatPtr);
|
||||||
const
|
const
|
||||||
UnderlineStyle = NSUnderlineStyleSingle or NSUnderlinePatternSolid;
|
UnderlineStyle = NSUnderlineStyleSingle or NSUnderlinePatternSolid;
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user