Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/package/Font.pkg @ 2610

Last change on this file since 2610 was 2608, checked in by rgrieder, 16 years ago

Large cleanup in CEGUILua:

  • Removed the heavy 1.7MB bind files and added the small pkg files from the CEGUI source instead
  • Those pkg files get copied version incrementally (starting with 0.5.0) to the binary dir. That saves a lot of files when having 4 different versions.
  • Added support for CEGUI 0.6.0 and 0.6.2
  • Added library info files
  • CEGUILua 0.5.0 finally supports Lua 5.1 too That means all version support both Lua 5.0 and 5.1
  • Added unified diffs with the changes to the CEGUILua source
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1/***********************************************************************
2        TextFormatting
3***********************************************************************/
4enum TextFormatting
5{
6        LeftAligned,
7        RightAligned,
8        Centred,
9        Justified,
10        WordWrapLeftAligned,
11        WordWrapRightAligned,
12        WordWrapCentred,
13        WordWrapJustified
14};
15
16
17/***********************************************************************
18        Font
19***********************************************************************/
20class Font //: public PropertySet
21{
22        //////////////////////////////////////////////
23        // PropertySet
24        void setProperty(string name, string value);
25        string getProperty(string name) const;
26        string getPropertyDefault(string name) const;
27        string getPropertyHelp(string name) const;
28
29        bool isPropertyPresent(string name) const;
30        bool isPropertyDefault(string name) const;
31
32    tolua_outside PropertyIterator ceguiLua_getPropertyIterator @ getPropertyIterator() const;
33
34    static void setDefaultResourceGroup(string resourceGroup);
35    static string getDefaultResourceGroup();
36
37    void load ();
38
39        bool isCodepointAvailable(unsigned long cp) const;
40
41        void setNativeResolution(const Size& sz);
42        void notifyScreenResolution(const Size& sz);
43
44        float getTextExtent(string text, float xscale=1);
45        float getLineSpacing(float yscale=1) const;
46        float getFontHeight(float yscale=1) const;
47
48        unsigned long getCharAtPixel(string text, unsigned long start_char, float pixel, float xscale=1);
49        unsigned long getCharAtPixel(string text, float pixel, float xscale=1);
50
51        unsigned long getFormattedLineCount(string text, const Rect& format_area, TextFormatting fmt, float xscale=1);
52        float getFormattedTextExtent(string text, const Rect& format_area, TextFormatting fmt, float xscale=1);
53};
Note: See TracBrowser for help on using the repository browser.