Fixed bounds calculation of CText
This commit is contained in:
1 parent
9021a444b5
commit
fa22096914
4 files changed
+39
-123
No files matched your search
@@ -116,10 +116,10 @@ namespace Vocaluxe.Base.Fonts
|
||||
float dx = (fullSize.Width - boundingSize.Width - 1) / 2;
|
||||
_DrawBounding.X -= dx;
|
||||
_Texture = CDraw.AddTexture(bmpCropped);
|
||||
_DrawBounding.X *= _Texture.Width / _DrawBounding.Width;
|
||||
/*_DrawBounding.X *= _Texture.Width / _DrawBounding.Width;
|
||||
_DrawBounding.Y *= _Texture.Width / _DrawBounding.Width;
|
||||
_DrawBounding.Width = _Texture.Width;
|
||||
_DrawBounding.Height = _Texture.Height;
|
||||
_DrawBounding.Height = _Texture.Height;*/
|
||||
if (false)
|
||||
{
|
||||
if (outline > 0)
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Vocaluxe.Screens
|
||||
base.Init();
|
||||
const string test = " ÖÄÜabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPGRSTUVWGXZ1234567890";
|
||||
SColorF color = new SColorF(1, 0, 0, 1);
|
||||
CText text = new CText(10, 50, 1, 32, 0, EAlignment.Left, EStyle.Normal, "Normal", color, "Normal Text" + test, -1, 26, 0);
|
||||
CText text = new CText(10, 50, 1, 200, 0, EAlignment.Left, EStyle.Normal, "Normal", color, "Normal Text" + test, -1, 26, 0);
|
||||
_AddText(text);
|
||||
text = new CText(10, 90, 1, 32, 0, EAlignment.Left, EStyle.Bold, "Normal", color, "Bold Text" + test, -1, 26, 0);
|
||||
_AddText(text);
|
||||
@@ -51,7 +51,7 @@ namespace Vocaluxe.Screens
|
||||
_AddText(text);
|
||||
text = new CText(10, 210, 1, 32, 0, EAlignment.Left, EStyle.Bold, "Outline", color, "Bold Text" + test, -1, 26, 0);
|
||||
_AddText(text);
|
||||
text = new CText(10, 250, 1, 400, 0, EAlignment.Left, EStyle.Italic, "Outline", color, "Italic Text" + test, -1, 26, 0);
|
||||
text = new CText(10, 250, 1, 32, 0, EAlignment.Left, EStyle.Italic, "Outline", color, "Italic Text" + test, -1, 26, 0);
|
||||
_AddText(text);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user