From 160e1299ef3d95f8e8c48706d7f61dd3dc6c6b60 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 11 Feb 2020 11:29:07 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9=20tab=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/graphics/fonts/texture_font.h | 222 +++++++++++++++---------------- 1 file changed, 111 insertions(+), 111 deletions(-) (limited to 'src/libjin/graphics/fonts/texture_font.h') diff --git a/src/libjin/graphics/fonts/texture_font.h b/src/libjin/graphics/fonts/texture_font.h index 1d7f0d2..510badb 100644 --- a/src/libjin/graphics/fonts/texture_font.h +++ b/src/libjin/graphics/fonts/texture_font.h @@ -15,117 +15,117 @@ namespace JinEngine { - namespace Graphics - { - namespace Fonts - { - - /// - /// - /// - class TextureFont : public Font, public Graphic, public Object - { - public: - /// - /// - /// - TextureFont(const Bitmap* bitmap, const Content& codepoints, int cellw, int cellh); - - /// - /// - /// - TextureFont(const Bitmap* bitmap, const Content& codepoints, Color mask, int cellh); - - /// - /// - /// - TextureFont(const Bitmap* bitmap, const Text& text, Color mask, int cellh); - - /// - /// - /// - TextureFont(const Bitmap* bitmap, const Text& text, int cellw, int cellh); - - /// - /// - /// - ~TextureFont(); - - /// - /// - /// - Page* typeset(const Text& text, int lineheight, int spacing = 0) override; - - /// - /// - /// - Page* typeset(const Content& text, int lineheight, int spacing = 0) override; - - /// - /// - /// - void render(const Page* page, int x, int y) override; - - /// - /// - /// - void render(const Content& text, int x, int y, int linehgiht, int spacing = 0) override; - - /// - /// - /// - void render(const Text& text, int x, int y, int lineheight, int spacing = 0)override; - - private: - - /// - /// - /// - struct TextureGlyph - { - float x, y, w, h; - }; - - /// - /// - /// - int getCharWidth(int c); - - /// - /// - /// - int getCharHeight(int c); - - /// - /// - /// - int getTextWidth(const Content& text, int spacing = 0); - - /// - /// - /// - int getTextHeight(const Content& text, int lineheight); - - /// - /// - /// - void getTextBox(const Content& text, int* w, int* h, int lineheight, int spacing = 0); - - /// - /// - /// - const TextureGlyph* findGlyph(Codepoint codepoint) const; - - - /// - /// - /// - std::map glyphs; - - }; - - } // namespace Fonts - } // namespace Graphics + namespace Graphics + { + namespace Fonts + { + + /// + /// + /// + class TextureFont : public Font, public Graphic, public Object + { + public: + /// + /// + /// + TextureFont(const Bitmap* bitmap, const Content& codepoints, int cellw, int cellh); + + /// + /// + /// + TextureFont(const Bitmap* bitmap, const Content& codepoints, Color mask, int cellh); + + /// + /// + /// + TextureFont(const Bitmap* bitmap, const Text& text, Color mask, int cellh); + + /// + /// + /// + TextureFont(const Bitmap* bitmap, const Text& text, int cellw, int cellh); + + /// + /// + /// + ~TextureFont(); + + /// + /// + /// + Page* typeset(const Text& text, int lineheight, int spacing = 0) override; + + /// + /// + /// + Page* typeset(const Content& text, int lineheight, int spacing = 0) override; + + /// + /// + /// + void render(const Page* page, int x, int y) override; + + /// + /// + /// + void render(const Content& text, int x, int y, int linehgiht, int spacing = 0) override; + + /// + /// + /// + void render(const Text& text, int x, int y, int lineheight, int spacing = 0)override; + + private: + + /// + /// + /// + struct TextureGlyph + { + float x, y, w, h; + }; + + /// + /// + /// + int getCharWidth(int c); + + /// + /// + /// + int getCharHeight(int c); + + /// + /// + /// + int getTextWidth(const Content& text, int spacing = 0); + + /// + /// + /// + int getTextHeight(const Content& text, int lineheight); + + /// + /// + /// + void getTextBox(const Content& text, int* w, int* h, int lineheight, int spacing = 0); + + /// + /// + /// + const TextureGlyph* findGlyph(Codepoint codepoint) const; + + + /// + /// + /// + std::map glyphs; + + }; + + } // namespace Fonts + } // namespace Graphics } // namespace JinEngine #endif \ No newline at end of file -- cgit v1.1-26-g67d0