2000-11-28 20:56:52 +00:00
|
|
|
/*
|
|
|
|
* @(#)GlyphPositionAdjustments.h 1.8 00/03/15
|
|
|
|
*
|
|
|
|
* (C) Copyright IBM Corp. 1998, 1999, 2000 - All Rights Reserved
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GLYPHPOSITIONADJUSTMENTS_H
|
|
|
|
#define __GLYPHPOSITIONADJUSTMENTS_H
|
|
|
|
|
2003-01-13 23:15:11 +00:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* \internal
|
|
|
|
*/
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
#include "LETypes.h"
|
|
|
|
#include "OpenTypeTables.h"
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_BEGIN
|
2000-11-28 20:56:52 +00:00
|
|
|
|
2002-10-04 19:27:01 +00:00
|
|
|
class GlyphPositionAdjustment : public UMemory {
|
2000-11-28 20:56:52 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
GlyphPositionAdjustment();
|
2002-06-10 23:40:33 +00:00
|
|
|
GlyphPositionAdjustment(float xPlace, float yPlace, float xAdv, float yAdv, le_int32 baseOff = -1);
|
2000-11-28 20:56:52 +00:00
|
|
|
~GlyphPositionAdjustment();
|
|
|
|
|
2002-06-10 23:40:33 +00:00
|
|
|
float getXPlacement();
|
|
|
|
float getYPlacement();
|
|
|
|
float getXAdvance();
|
|
|
|
float getYAdvance();
|
2000-11-28 20:56:52 +00:00
|
|
|
|
2002-06-10 23:40:33 +00:00
|
|
|
le_int32 getBaseOffset();
|
|
|
|
|
|
|
|
void setXPlacement(float newXPlacement);
|
|
|
|
void setYPlacement(float newYPlacement);
|
|
|
|
void setXAdvance(float newXAdvance);
|
|
|
|
void setYAdvance(float newYAdvance);
|
|
|
|
|
|
|
|
void setBaseOffset(le_int32 newBaseOffset);
|
2000-11-28 20:56:52 +00:00
|
|
|
|
|
|
|
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;
|
2002-06-10 23:40:33 +00:00
|
|
|
|
|
|
|
le_int32 baseOffset;
|
2002-06-29 00:04:16 +00:00
|
|
|
|
2002-10-04 19:27:01 +00:00
|
|
|
// allow copying of this class because all of its fields are simple types
|
2000-11-28 20:56:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
inline GlyphPositionAdjustment::GlyphPositionAdjustment()
|
2002-06-10 23:40:33 +00:00
|
|
|
: xPlacement(0), yPlacement(0), xAdvance(0), yAdvance(0), baseOffset(-1)
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
|
|
|
// nothing else to do!
|
|
|
|
}
|
|
|
|
|
2002-06-10 23:40:33 +00:00
|
|
|
inline GlyphPositionAdjustment::GlyphPositionAdjustment(float xPlace, float yPlace, float xAdv, float yAdv, le_int32 baseOff)
|
|
|
|
: xPlacement(xPlace), yPlacement(yPlace), xAdvance(xAdv), yAdvance(yAdv), baseOffset(baseOff)
|
2000-11-28 20:56:52 +00:00
|
|
|
{
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
|
2002-06-10 23:40:33 +00:00
|
|
|
inline le_int32 GlyphPositionAdjustment::getBaseOffset()
|
|
|
|
{
|
|
|
|
return baseOffset;
|
|
|
|
}
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2002-06-10 23:40:33 +00:00
|
|
|
inline void GlyphPositionAdjustment::setBaseOffset(le_int32 newBaseOffset)
|
|
|
|
{
|
|
|
|
baseOffset = newBaseOffset;
|
|
|
|
}
|
|
|
|
|
2000-11-28 20:56:52 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2001-10-16 00:39:01 +00:00
|
|
|
U_NAMESPACE_END
|
2000-11-28 20:56:52 +00:00
|
|
|
#endif
|