1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
/*
* @(#)GlyphPositionAdjustments.h 1.8 00/03/15
*
* (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved
*
*/
#ifndef __GLYPHPOSITIONADJUSTMENTS_H
#define __GLYPHPOSITIONADJUSTMENTS_H
#include "LETypes.h"
#include "OpenTypeTables.h"
U_NAMESPACE_BEGIN
class GlyphPositionAdjustment
{
public:
GlyphPositionAdjustment();
GlyphPositionAdjustment(float xPlace, float yPlace, float xAdv, float yAdv);
~GlyphPositionAdjustment();
float getXPlacement();
float getYPlacement();
float getXAdvance();
float getYAdvance();
void setXPlacement(float newXPlacement);
void setYPlacement(float newYPlacement);
void setXAdvance(float newXAdvance);
void setYAdvance(float newYAdvance);
void adjustXPlacement(float xAdjustment);
void adjustYPlacement(float yAdjustment);
void adjustXAdvance(float xAdjustment);
void adjustYAdvance(float yAdjustment);
private:
float xPlacement;
float yPlacement;
float xAdvance;
float yAdvance;
};
inline GlyphPositionAdjustment::GlyphPositionAdjustment()
: xPlacement(0), yPlacement(0), xAdvance(0), yAdvance(0)
{
// nothing else to do!
}
inline GlyphPositionAdjustment::GlyphPositionAdjustment(float xPlace, float yPlace, float xAdv, float yAdv)
: xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv)
{
// nothing else to do!
}
inline GlyphPositionAdjustment::~GlyphPositionAdjustment()
{
// nothing to do!
}
inline float GlyphPositionAdjustment::getXPlacement()
{
return xPlacement;
}
inline float GlyphPositionAdjustment::getYPlacement()
{
return yPlacement;
}
inline float GlyphPositionAdjustment::getXAdvance()
{
return xAdvance;
}
inline float GlyphPositionAdjustment::getYAdvance()
{
return yAdvance;
}
inline void GlyphPositionAdjustment::setXPlacement(float newXPlacement)
{
xPlacement = newXPlacement;
}
inline void GlyphPositionAdjustment::setYPlacement(float newYPlacement)
{
yPlacement = newYPlacement;
}
inline void GlyphPositionAdjustment::setXAdvance(float newXAdvance)
{
xAdvance = newXAdvance;
}
inline void GlyphPositionAdjustment::setYAdvance(float newYAdvance)
{
yAdvance = newYAdvance;
}
inline void GlyphPositionAdjustment::adjustXPlacement(float xAdjustment)
{
xPlacement += xAdjustment;
}
inline void GlyphPositionAdjustment::adjustYPlacement(float yAdjustment)
{
yPlacement += yAdjustment;
}
inline void GlyphPositionAdjustment::adjustXAdvance(float xAdjustment)
{
xAdvance += xAdjustment;
}
inline void GlyphPositionAdjustment::adjustYAdvance(float yAdjustment)
{
yAdvance += yAdjustment;
}
U_NAMESPACE_END
#endif
|