From 9b51660a47653d40e22a9154faff737cdf0cf53c Mon Sep 17 00:00:00 2001 From: yvt Date: Fri, 22 Nov 2013 23:27:46 +0900 Subject: [PATCH] Added scripting reference for font API. --- Resources/Scripts/Reference/API/Font.as | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Resources/Scripts/Reference/API/Font.as diff --git a/Resources/Scripts/Reference/API/Font.as b/Resources/Scripts/Reference/API/Font.as new file mode 100644 index 00000000..696838d7 --- /dev/null +++ b/Resources/Scripts/Reference/API/Font.as @@ -0,0 +1,36 @@ +/* + Copyright (c) 2013 yvt + + This file is part of OpenSpades. + + OpenSpades is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenSpades is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OpenSpades. If not, see . + + */ + +namespace spades { + + /** Represents a bitmap-based font. */ + class Font { + + /** Measures the size of the given string. */ + Vector2 Measure(const string@ text); + + /** Renders the string. */ + void Draw(const string@ text, Vector2 origin, float scale, Vector4 color); + + /** Renders the string with a shadow. */ + void DrawShadow(const string@ text, Vector2 origin, float scale, Vector4 color); + + } +} \ No newline at end of file