summaryrefslogtreecommitdiff
path: root/src/corelib/render
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2014-10-15 13:38:32 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2014-10-15 13:38:32 +0100
commitae49a6e611fc8d0a6e2d38b6e51a224cbbb807ba (patch)
tree8c8ea023077174c57abe34d1dcb26413d145cfdb /src/corelib/render
parent8e8f619239f08e7c085a15726dc815d15b4f5a6f (diff)
downloadfpGUI-ae49a6e611fc8d0a6e2d38b6e51a224cbbb807ba.tar.xz
Sync more fpGUI Agg2D code to console agg_2D unit.
Not much, but it is a start. There are still many more of this to come.
Diffstat (limited to 'src/corelib/render')
-rw-r--r--src/corelib/render/software/agg_2D.pas12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/corelib/render/software/agg_2D.pas b/src/corelib/render/software/agg_2D.pas
index f167630f..4ffe3bd1 100644
--- a/src/corelib/render/software/agg_2D.pas
+++ b/src/corelib/render/software/agg_2D.pas
@@ -2128,7 +2128,7 @@ procedure Agg2D.font(
fileName : char_ptr; height : double;
bold : boolean = false;
italic : boolean = false;
- ch : FontCacheType = RasterFontCache;
+ ch : FontCacheType = VectorFontCache;
angle : double = 0.0 );
var
b : int;
@@ -2147,10 +2147,11 @@ begin
m_fontEngine.hinting_(m_textHints );
if ch = VectorFontCache then
- m_fontEngine.height_(height )
+ {$NOTE We need to fix this. Translating from font pt to pixels is inaccurate. This is just a temp fix for now. }
+ m_fontEngine.height_(height * 1.3333 ) // 9pt = ~12px so that is a ratio of 1.3333
else
m_fontEngine.height_(worldToScreen(height ) );
-{$ENDIF }
+{$ENDIF}
{$IFDEF AGG2D_USE_WINFONTS}
m_fontEngine.hinting_(m_textHints );
@@ -2193,7 +2194,9 @@ end;
procedure Agg2D.textHints(hints : boolean );
begin
m_textHints:=hints;
-
+ {$IFNDEF AGG2D_NO_FONT}
+ m_fontEngine.hinting_(m_textHints );
+ {$ENDIF}
end;
{ TEXTWIDTH }
@@ -2376,6 +2379,7 @@ end;
procedure Agg2D.resetPath;
begin
m_path.remove_all;
+ m_path.move_to(0 ,0 );
end;