~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/layout/ValueRecords.h

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * @(#)ValueRecords.h   1.6 00/03/15
3
 
 *
4
 
 * (C) Copyright IBM Corp. 1998, 1999, 2000, 2001 - All Rights Reserved
5
 
 *
6
 
 */
7
 
 
8
 
#ifndef __VALUERECORDS_H
9
 
#define __VALUERECORDS_H
10
 
 
11
 
#include "LETypes.h"
12
 
#include "LEFontInstance.h"
13
 
#include "OpenTypeTables.h"
14
 
#include "GlyphIterator.h"
15
 
#include "GlyphPositionAdjustments.h"
16
 
 
17
 
U_NAMESPACE_BEGIN
18
 
 
19
 
typedef le_uint16 ValueFormat;
20
 
typedef le_int16 ValueRecordField;
21
 
 
22
 
struct ValueRecord
23
 
{
24
 
    le_int16   values[ANY_NUMBER];
25
 
 
26
 
    le_int16   getFieldValue(ValueFormat valueFormat, ValueRecordField field) const;
27
 
    le_int16   getFieldValue(le_int16 index, ValueFormat valueFormat, ValueRecordField field) const;
28
 
    void    adjustPosition(ValueFormat valueFormat, const char *base, GlyphPositionAdjustment &positionAdjustment,
29
 
                const LEFontInstance *fontInstance) const;
30
 
    void    adjustPosition(le_int16 index, ValueFormat valueFormat, const char *base, GlyphPositionAdjustment &positionAdjustment,
31
 
                const LEFontInstance *fontInstance) const;
32
 
 
33
 
    static le_int16    getSize(ValueFormat valueFormat);
34
 
 
35
 
private:
36
 
    static le_int16    getFieldCount(ValueFormat valueFormat);
37
 
    static le_int16    getFieldIndex(ValueFormat valueFormat, ValueRecordField field);
38
 
};
39
 
 
40
 
enum ValueRecordFields
41
 
{
42
 
    vrfXPlacement   = 0,
43
 
    vrfYPlacement   = 1,
44
 
    vrfXAdvance     = 2,
45
 
    vrfYAdvance     = 3,
46
 
    vrfXPlaDevice   = 4,
47
 
    vrfYPlaDevice   = 5,
48
 
    vrfXAdvDevice   = 6,
49
 
    vrfYAdvDevice   = 7
50
 
};
51
 
 
52
 
enum ValueFormatBits
53
 
{
54
 
    vfbXPlacement   = 0x0001,
55
 
    vfbYPlacement   = 0x0002,
56
 
    vfbXAdvance     = 0x0004,
57
 
    vfbYAdvance     = 0x0008,
58
 
    vfbXPlaDevice   = 0x0010,
59
 
    vfbYPlaDevice   = 0x0020,
60
 
    vfbXAdvDevice   = 0x0040,
61
 
    vfbYAdvDevice   = 0x0080,
62
 
    vfbReserved     = 0xFF00,
63
 
    vfbAnyDevice    = vfbXPlaDevice + vfbYPlaDevice + vfbXAdvDevice + vfbYAdvDevice
64
 
};
65
 
 
66
 
U_NAMESPACE_END
67
 
#endif
68
 
 
69