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