mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 01:39:20 +02:00
LazUtils: Missing TFPImageFreeTypeDrawer.DrawGlyph added. Issue #35032. Patch from Ondrej Pokorny
git-svn-id: trunk@60363 -
This commit is contained in:
parent
2035539759
commit
a85a3d9e59
@ -53,6 +53,7 @@ type
|
|||||||
procedure DrawHorizLine(x1,y,x2: integer; const c: TFPColor);
|
procedure DrawHorizLine(x1,y,x2: integer; const c: TFPColor);
|
||||||
procedure FillPixels(const c: TFPColor);
|
procedure FillPixels(const c: TFPColor);
|
||||||
procedure DrawText(AText: string; AFont: TFreeTypeRenderableFont; x,y: single; AColor: TFPColor); override;
|
procedure DrawText(AText: string; AFont: TFreeTypeRenderableFont; x,y: single; AColor: TFPColor); override;
|
||||||
|
procedure DrawGlyph(AGlyph: integer; AFont: TFreeTypeRenderableFont; x,y: single; AColor: TFPColor); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
property Image: TFPCustomImage read FImage;
|
property Image: TFPCustomImage read FImage;
|
||||||
end;
|
end;
|
||||||
@ -455,6 +456,21 @@ begin
|
|||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPImageFreeTypeDrawer.DrawGlyph(AGlyph: integer;
|
||||||
|
AFont: TFreeTypeRenderableFont; x, y: single; AColor: TFPColor);
|
||||||
|
var f: TFreeTypeFont;
|
||||||
|
begin
|
||||||
|
if AFont is TFreeTypeFont then
|
||||||
|
begin
|
||||||
|
f := TFreeTypeFont(AFont);
|
||||||
|
FColor := AColor;
|
||||||
|
if AFont.ClearType then
|
||||||
|
f.RenderGlyph(AGlyph, x, y, GetClipRect, @RenderDirectlyClearType)
|
||||||
|
else
|
||||||
|
f.RenderGlyph(AGlyph, x, y, GetClipRect, @RenderDirectly);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TFPImageWithScanlineFreeTypeDrawer }
|
{ TFPImageWithScanlineFreeTypeDrawer }
|
||||||
|
|
||||||
procedure TFPImageWithScanlineFreeTypeDrawer.MoveToPixel(x, y: integer);
|
procedure TFPImageWithScanlineFreeTypeDrawer.MoveToPixel(x, y: integer);
|
||||||
|
Loading…
Reference in New Issue
Block a user