~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to extern/bFTGL/include/FTExtrdGlyph.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef     __FTExtrdGlyph__
 
2
#define     __FTExtrdGlyph__
 
3
 
 
4
#include <ft2build.h>
 
5
#include FT_FREETYPE_H
 
6
#include FT_GLYPH_H
 
7
 
 
8
#include "FTGL.h"
 
9
#include "FTGlyph.h"
 
10
 
 
11
class FTVectoriser;
 
12
 
 
13
/**
 
14
 * FTExtrdGlyph is a specialisation of FTGlyph for creating tessellated
 
15
 * extruded polygon glyphs.
 
16
 * 
 
17
 * @see FTGlyphContainer
 
18
 * @see FTVectoriser
 
19
 *
 
20
 */
 
21
class FTGL_EXPORT FTExtrdGlyph : public FTGlyph
 
22
{
 
23
    public:
 
24
        /**
 
25
         * Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline.
 
26
         *
 
27
         * @param glyph The Freetype glyph to be processed
 
28
         * @param depth The distance along the z axis to extrude the glyph
 
29
         */
 
30
        FTExtrdGlyph( FT_GlyphSlot glyph, float depth);
 
31
 
 
32
        /**
 
33
         * Destructor
 
34
         */
 
35
        virtual ~FTExtrdGlyph();
 
36
 
 
37
        /**
 
38
         * Renders this glyph at the current pen position.
 
39
         *
 
40
         * @param pen   The current pen position.
 
41
         * @return      The advance distance for this glyph.
 
42
         */
 
43
        virtual float Render( const FTPoint& pen);
 
44
        
 
45
    private:
 
46
        /**
 
47
         * Calculate the normal vector to 2 points. This is 2D and ignores
 
48
         * the z component. The normal will be normalised
 
49
         *
 
50
         * @param a
 
51
         * @param b
 
52
         * @return
 
53
         */
 
54
        FTPoint GetNormal( const FTPoint &a, const FTPoint &b);
 
55
        
 
56
        
 
57
        /**
 
58
         * OpenGL display list
 
59
         */
 
60
        GLuint glList;
 
61
        
 
62
        /**
 
63
         * Distance to extrude the glyph
 
64
         */
 
65
        float depth;
 
66
    
 
67
};
 
68
 
 
69
 
 
70
#endif  //  __FTExtrdGlyph__
 
71