Пример #1
0
 public SharedLibary.Rectangle GetTextBounds(SharedLibary.Font font, string text)
 {
     return(new SharedLibary.Rectangle
            (
                0, 0,
                SplashKit.TextWidth(text, GetSplashKitFont(font), font.Size),
                SplashKit.TextHeight(text, GetSplashKitFont(font), font.Size)
            ));
 }
Пример #2
0
 public SharedLibary.Rectangle GetTextBounds(SharedLibary.Font font, string text)
 {
     return(new SharedLibary.Rectangle
            (
                0, 0,
                SwinGame.TextWidth(GetSwinGameFont(font), text),
                SwinGame.TextHeight(GetSwinGameFont(font), text)
            ));
 }
Пример #3
0
 private SplashKitSDK.Font GetSplashKitFont(SharedLibary.Font font)
 {
     return(SplashKit.LoadFont(font.ID, font.FileLocation));
 }
Пример #4
0
 private SwinGameSDK.Font GetSwinGameFont(SharedLibary.Font font)
 {
     return(SwinGameSDK.SwinGame.LoadFontNamed(font.ID, font.FileLocation, font.Size));
 }
Пример #5
0
 public override void DrawText(SharedLibary.Colour color, SharedLibary.Point2D point, SharedLibary.Font font, string text)
 {
     SwinGame.DrawText(text, ToSwinGameColor(color), GetSwinGameFont(font), (float)point.X, (float)point.Y);
 }