http://www.sim.no
http://www.coin3d.org
Main Page
Related Pages
Modules
Classes
Files
File List
include
Inventor
misc
SoGlyph.h
1
#ifndef COIN_SOGLYPH_H
2
#define COIN_SOGLYPH_H
3
4
/**************************************************************************\
5
*
6
* This file is part of the Coin 3D visualization library.
7
* Copyright (C) 1998-2007 by Systems in Motion. All rights reserved.
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* ("GPL") version 2 as published by the Free Software Foundation.
12
* See the file LICENSE.GPL at the root directory of this source
13
* distribution for additional information about the GNU GPL.
14
*
15
* For using Coin with software that can not be combined with the GNU
16
* GPL, and for taking advantage of the additional benefits of our
17
* support services, please contact Systems in Motion about acquiring
18
* a Coin Professional Edition License.
19
*
20
* See http://www.coin3d.org/ for more information.
21
*
22
* Systems in Motion, Postboks 1283, Pirsenteret, 7462 Trondheim, NORWAY.
23
* http://www.sim.no/ sales@sim.no coin-support@coin3d.org
24
*
25
\**************************************************************************/
26
27
#include <Inventor/SbBasic.h>
28
#include <Inventor/SbBox2f.h>
29
#include <Inventor/SbVec2s.h>
30
#include <Inventor/misc/SoState.h>
31
32
class
SbName
;
33
class
SoGlyphP;
34
35
class
COIN_DLL_API
SoGlyph
{
36
public
:
37
38
enum
Fonttype {
39
FONT2D = 1,
40
FONT3D = 2
41
};
42
43
void
unref(
void
)
const
;
44
45
static
const
SoGlyph
* getGlyph(
const
char
character,
const
SbName
& font);
46
47
const
SbVec2f
* getCoords(
void
)
const
;
48
const
int
* getFaceIndices(
void
)
const
;
49
const
int
* getEdgeIndices(
void
)
const
;
50
const
int
* getNextCWEdge(
const
int
edgeidx)
const
;
51
const
int
* getNextCCWEdge(
const
int
edgeidx)
const
;
52
53
float
getWidth(
void
)
const
;
54
const
SbBox2f
& getBoundingBox(
void
)
const
;
55
56
static
const
SoGlyph
* getGlyph(
SoState
* state,
57
const
unsigned
int
character,
58
const
SbVec2s
& size,
59
const
float
angle);
60
SbVec2s
getAdvance(
void
)
const
;
61
SbVec2s
getKerning(
const
SoGlyph
& rightglyph)
const
;
62
unsigned
char
* getBitmap(
SbVec2s
& size,
SbVec2s
& pos,
const
SbBool antialiased)
const
;
63
64
protected
:
65
SoGlyph
(
void
);
66
~
SoGlyph
();
67
68
void
setCoords(
SbVec2f
* coords,
int
numcoords = -1);
69
void
setFaceIndices(
int
* indices,
int
numindices = -1);
70
void
setEdgeIndices(
int
* indices,
int
numindices = -1);
71
72
private
:
73
void
setFontType(Fonttype type)
const
;
74
static
void
unrefGlyph(
SoGlyph
* glyph);
75
76
friend
class
SoGlyphP;
77
SoGlyphP * pimpl;
78
};
79
80
#endif // !COIN_SOGLYPH_H
Copyright © 1998-2007 by
Systems in Motion AS
. All rights reserved.
Generated on Wed Jul 18 2012 for Coin by
Doxygen.
1.8.1.1