mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 20:28:19 +02:00
Fix ExtTextOut function - added ignoring device context BkMode
git-svn-id: trunk@19238 -
This commit is contained in:
parent
8636b8453a
commit
78549425be
@ -819,6 +819,7 @@ function TCarbonDeviceContext.ExtTextOut(X, Y: Integer; Options: Longint;
|
||||
Rect: PRect; Str: PChar; Count: Longint; Dx: PInteger): Boolean;
|
||||
var
|
||||
TextLayout: TCarbonTextLayout;
|
||||
BrushSolid: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
//DebugLn('TCarbonDeviceContext.ExtTextOut ' + DbgS(X) + ', ' + DbgS(Y) + ' R: ' + DbgS(Rect^) +
|
||||
@ -827,7 +828,13 @@ begin
|
||||
if Rect <> nil then
|
||||
begin
|
||||
// fill background
|
||||
if (Options and ETO_OPAQUE) > 0 then FillRect(Rect^, BkBrush);
|
||||
if (Options and ETO_OPAQUE) > 0 then
|
||||
begin
|
||||
BrushSolid := BkBrush.Solid; // must ignore BkMode
|
||||
BkBrush.Solid := True;
|
||||
FillRect(Rect^, BkBrush);
|
||||
BkBrush.Solid := BrushSolid;
|
||||
end;
|
||||
//DebugLn('TCarbonDeviceContext.ExtTextOut fill ' + DbgS(Rect^));
|
||||
end;
|
||||
|
||||
@ -838,8 +845,11 @@ begin
|
||||
// fill drawed text background
|
||||
if (Rect = nil) and ((Options and ETO_OPAQUE) > 0) then
|
||||
begin
|
||||
BrushSolid := BkBrush.Solid; // must ignore BkMode
|
||||
BkBrush.Solid := True;
|
||||
BkBrush.Apply(Self, False); // do not use ROP2
|
||||
CGContextFillRect(CGContext, TextLayout.GetDrawBounds(X, Y));
|
||||
BkBrush.Solid := BrushSolid;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -165,7 +165,7 @@ type
|
||||
procedure GetRGBA(AROP2: Integer; out AR, AG, AB, AA: Single);
|
||||
function CreateCGColor: CGColorRef;
|
||||
|
||||
property Solid: Boolean read FA;
|
||||
property Solid: Boolean read FA write FA;
|
||||
property ColorRef: TColorRef read GetColorRef;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user