mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 11:19:26 +02:00
LazUtils: Missing TFPImageFreeTypeDrawer.DrawGlyph added. Issue #35032. Patch from Ondrej Pokorny
git-svn-id: branches/fixes_2_0@60389 -
This commit is contained in:
parent
5fba012ef1
commit
c3d904cd87
@ -53,6 +53,7 @@ type
|
||||
procedure DrawHorizLine(x1,y,x2: integer; const c: TFPColor);
|
||||
procedure FillPixels(const c: TFPColor);
|
||||
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;
|
||||
property Image: TFPCustomImage read FImage;
|
||||
end;
|
||||
@ -455,6 +456,21 @@ begin
|
||||
inherited Destroy;
|
||||
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 }
|
||||
|
||||
procedure TFPImageWithScanlineFreeTypeDrawer.MoveToPixel(x, y: integer);
|
||||
|
Loading…
Reference in New Issue
Block a user