Commit c0732e20 authored by Željan Rikalo's avatar Željan Rikalo 🏊🏼
Browse files

Gtk2: drawtext with rotated font. issue #27547

git-svn-id: trunk@48299 -
parent 03928b4b
......@@ -2561,13 +2561,18 @@ var
end;
function NeedOffsetCalc: Boolean;
var
AClipRect: TRect;
begin
{see issue #27547}
AClipRect := RectFromGdkRect(TGtkDeviceContext(DC).ClipRect);
OffsetRect(AClipRect, -AClipRect.Left, -AClipRect.Top);
Result := (TGtkDeviceContext(DC).CurrentFont^.LogFont.lfOrientation <> 0) and
(Flags and DT_SINGLELINE <> 0) and
(Flags and DT_VCENTER = 0) and (Flags and DT_CENTER = 0) and
(Flags and DT_RIGHT = 0) and (Flags and DT_BOTTOM = 0) and
(Flags and DT_CALCRECT = 0) and not IsRectEmpty(SavedRect);
(Flags and DT_CALCRECT = 0) and not IsRectEmpty(SavedRect) and
EqualRect(AClipRect, Rect);
end;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment