]>
git.saurik.com Git - apple/icu.git/blob - icuSources/layout/GlyphPositionAdjustments.h
3 * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved
7 #ifndef __GLYPHPOSITIONADJUSTMENTS_H
8 #define __GLYPHPOSITIONADJUSTMENTS_H
16 #include "OpenTypeTables.h"
20 class GlyphPositionAdjustment
: public UMemory
{
23 GlyphPositionAdjustment();
24 GlyphPositionAdjustment(float xPlace
, float yPlace
, float xAdv
, float yAdv
, le_int32 baseOff
= -1);
25 ~GlyphPositionAdjustment();
27 float getXPlacement();
28 float getYPlacement();
32 le_int32
getBaseOffset();
34 void setXPlacement(float newXPlacement
);
35 void setYPlacement(float newYPlacement
);
36 void setXAdvance(float newXAdvance
);
37 void setYAdvance(float newYAdvance
);
39 void setBaseOffset(le_int32 newBaseOffset
);
41 void adjustXPlacement(float xAdjustment
);
42 void adjustYPlacement(float yAdjustment
);
43 void adjustXAdvance(float xAdjustment
);
44 void adjustYAdvance(float yAdjustment
);
54 // allow copying of this class because all of its fields are simple types
57 inline GlyphPositionAdjustment::GlyphPositionAdjustment()
58 : xPlacement(0), yPlacement(0), xAdvance(0), yAdvance(0), baseOffset(-1)
60 // nothing else to do!
63 inline GlyphPositionAdjustment::GlyphPositionAdjustment(float xPlace
, float yPlace
, float xAdv
, float yAdv
, le_int32 baseOff
)
64 : xPlacement(xPlace
), yPlacement(yPlace
), xAdvance(xAdv
), yAdvance(yAdv
), baseOffset(baseOff
)
66 // nothing else to do!
69 inline GlyphPositionAdjustment::~GlyphPositionAdjustment()
74 inline float GlyphPositionAdjustment::getXPlacement()
79 inline float GlyphPositionAdjustment::getYPlacement()
84 inline float GlyphPositionAdjustment::getXAdvance()
89 inline float GlyphPositionAdjustment::getYAdvance()
94 inline le_int32
GlyphPositionAdjustment::getBaseOffset()
99 inline void GlyphPositionAdjustment::setXPlacement(float newXPlacement
)
101 xPlacement
= newXPlacement
;
104 inline void GlyphPositionAdjustment::setYPlacement(float newYPlacement
)
106 yPlacement
= newYPlacement
;
109 inline void GlyphPositionAdjustment::setXAdvance(float newXAdvance
)
111 xAdvance
= newXAdvance
;
114 inline void GlyphPositionAdjustment::setYAdvance(float newYAdvance
)
116 yAdvance
= newYAdvance
;
119 inline void GlyphPositionAdjustment::setBaseOffset(le_int32 newBaseOffset
)
121 baseOffset
= newBaseOffset
;
124 inline void GlyphPositionAdjustment::adjustXPlacement(float xAdjustment
)
126 xPlacement
+= xAdjustment
;
129 inline void GlyphPositionAdjustment::adjustYPlacement(float yAdjustment
)
131 yPlacement
+= yAdjustment
;
134 inline void GlyphPositionAdjustment::adjustXAdvance(float xAdjustment
)
136 xAdvance
+= xAdjustment
;
139 inline void GlyphPositionAdjustment::adjustYAdvance(float yAdjustment
)
141 yAdvance
+= yAdjustment
;