LASi
Main Page
Namespaces
Classes
Files
File List
File Members
src
stringDimensions.h
Go to the documentation of this file.
1
23
class
StringDimensions
{
24
25
private
:
26
27
double
xadv
;
28
double
ymin
;
29
double
ymax
;
30
double
lineSpacingFactor
;
31
32
public
:
33
34
// Constructor:
35
StringDimensions
(
double
xAdv=0.0,
double
yMin=0.0,
double
yMax=0.0,
double
spacingFactor=1.2){
36
xadv
= xAdv;
37
ymin
= yMin;
38
ymax
= yMax;
39
lineSpacingFactor
= spacingFactor;
40
41
}
42
43
//
44
// Set methods: Accrue mins and maxs:
45
// On the Y-axis, just take the true min and max.
46
//
47
// On the X-axis, sum up all the individual x-advances
48
// in order to get the overall bounding box:
49
//
50
54
void
accrueXAdvance
(
const
double
xAdv){
xadv
+= xAdv; }
55
59
void
setYMin
(
const
double
yMin){
if
( yMin <
ymin
)
ymin
= yMin; }
63
void
setYMax
(
const
double
yMax){
if
( yMax >
ymax
)
ymax
= yMax; }
64
65
// Get methods:
66
const
double
getXAdvance
(){
return
xadv
; }
67
const
double
getYMin
(){
return
ymin
; }
68
const
double
getYMax
(){
return
ymax
; }
69
74
const
double
getLineSpacing
(){
return
(
ymax
-
ymin
)*
lineSpacingFactor
; }
75
76
};
77
Generated on Sat Jul 26 2014 14:26:35 for LASi by
1.8.1.2