mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 23:58:14 +02:00
parent
f916cc487f
commit
72259342cb
@ -72,6 +72,7 @@ begin
|
||||
SetColors(FGColor, BGColor);
|
||||
|
||||
WidgetCont := pango_layout_get_context(AFont^.GDIFontObject);
|
||||
|
||||
OldMatrix := pango_context_get_matrix(WidgetCont);
|
||||
NewMatrix.xx := 1.0;
|
||||
NewMatrix.xy := 0.0;
|
||||
|
@ -44,6 +44,13 @@ function gdk_x11_image_get_ximage(image:PGdkImage):PXImage;cdecl;external gdklib
|
||||
procedure laz_gdk_gc_set_dashes(gc:PGdkGC; dash_offset:gint;
|
||||
dashlist:Pgint8; n:gint); cdecl; external gdkdll name 'gdk_gc_set_dashes';
|
||||
// - - - - - - - - - pango extras - - - - - - - - -
|
||||
|
||||
|
||||
function pango_unichar_direction(ch : gunichar) : TPangoDirection; cdecl; external pangolib;
|
||||
|
||||
// pango 1.4
|
||||
function pango_find_base_dir(text : Pgchar; aLength : gint) : TPangoDirection; cdecl; external pangolib;
|
||||
|
||||
type
|
||||
PPPangoAttrList = ^PPangoAttrList;
|
||||
// pango 1.16
|
||||
|
@ -765,11 +765,13 @@ var
|
||||
DevCtx: TGtk2DeviceContext absolute DC;
|
||||
DCOrigin: TPoint;
|
||||
yOffset: integer;
|
||||
Direction : TPangoDirection;
|
||||
begin
|
||||
Result := IsValidDC(DC);
|
||||
if not Result then Exit;
|
||||
if Count <= 0 then Exit;
|
||||
|
||||
|
||||
if DevCtx.HasTransf then
|
||||
DevCtx.TransfPoint(X, Y);
|
||||
|
||||
@ -784,6 +786,9 @@ begin
|
||||
DevCtx.SelectedColors := dcscCustom;
|
||||
EnsureGCColor(DC, dccCurrentTextColor, True, False);
|
||||
|
||||
Direction := pango_find_base_dir(Str, Count);
|
||||
pango_context_set_base_dir(@DevCtx, Direction);
|
||||
|
||||
DevCtx.DrawTextWithColors(Str, Count,
|
||||
X + DCOrigin.X, Y + DCOrigin.Y + yOffset,
|
||||
nil, nil);
|
||||
|
Loading…
Reference in New Issue
Block a user