Export (0) Print
Expand All
Expand Minimize

2.4.66 CrtLayout12

Office

The CrtLayout12 record specifies the layout information for attached label, when contained in the sequence of records that conforms to the ATTACHEDLABEL rule, or legend, when contained in the sequence of records that conforms to the LD rule.


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

frtHeader

...

...

dwCheckSum

A

B

reserved1

wXMode

wYMode

wWidthMode

wHeightMode

x

...

...

y

...

...

dx

...

...

dy

...

...

reserved2

frtHeader (12 bytes): An FrtHeader structure. The frtHeader.rt field MUST be 0x089D.

dwCheckSum (4 bytes): An unsigned integer that specifies the checksum of the values in the order as follows, if the checksum is incorrect, the layout information specified in this record MUST be ignored.

Checksum for type

Values

AttachedLabel

  1. x1 field of the Pos record in the sequence of records that contains this CrtLayout12 record and conforms to the ATTACHEDLABEL rule.

  2. y1 field of the Pos record in the in the sequence of records that contains this CrtLayout12 record and conforms to the ATTACHEDLABEL rule.

  3. An unsigned integer that specifies whether the attached label is at its default position. MUST be 1 if the dlp field of the Text record in the in the sequence of records that contains this CrtLayout12 record and conforms to the ATTACHEDLABEL rule is equal to 0xA. Otherwise, MUST be zero.

Legend

  1. x1 field of the Pos record in the in the sequence of records that contains this CrtLayout12 record and conforms to the LD rule.

  2. y1 field of the Pos record in the in the sequence of records that contains this CrtLayout12 record and conforms to the LD rule.

  3. Width of the legend in pixels.

  4. Height of the legend in pixels.

  5. The fAutoPosX field of Legend record.

  6. The fAutoPosY field of Legend record.

  7. The fAutoSize of the Frame record in the in the sequence of records that contains this CrtLayout12 record and conforms to the LD rule.

The checksum is calculated using the following algorithm:

FUNCTION SimpleCheckSum values

SET dwChecksum to 0x0000

FOR each value in values

SET dwChecksum TO (dwChecksum XOR value)

RETURN dwChecksum

The width and height of legend in pixels are calculated with the following steps:

  1. Get chart area width in pixels

    chart area width in pixels = (dx field of Chart record - 8) * DPI of the display device / 72

    If the frt field of the Frame record following the Chart record is 0x0004 and the chart is not embedded, add the shadow size:

    chart area width in pixels -= 2 * line width of the display device in pixels

  2. Get chart area height in pixels

    chart area height in pixels = (dy field of Chart record - 8) * DPI of the display device / 72

    If the frt field of the Frame record following the Chart record is 0x0004 and the chart is not embedded, add the shadow size:

    chart area height in pixels -= 2 * line height of the display device in pixels

  3. Compute legend size in pixels

    legend width in pixels = dx field of Legend / 4000 * chart area width in pixels

    legend height in pixels = dy field of Legend / 4000 * chart area height in pixels

A - unused (1 bit): Undefined and MUST be ignored.

B - autolayouttype (4 bits): An unsigned integer that specifies the automatic layout type of the legend. MUST be ignored when this record is in the sequence of records that conforms to the ATTACHEDLABEL rule. MUST be a value from the following table:

Value

Meaning

0x0

Align to the bottom

0x1

Align to top right corner

0x2

Align to the top

0x3

Align to the right

0x4

Align to the left

reserved1 (11 bits): MUST be zero, and MUST be ignored.

wXMode (2 bytes): A CrtLayout12Mode structure that specifies the meaning of x.

wYMode (2 bytes): A CrtLayout12Mode structure that specifies the meaning of y.

wWidthMode (2 bytes): A CrtLayout12Mode structure that specifies the meaning of dx.

wHeightMode (2 bytes): A CrtLayout12Mode structure that specifies the meaning of dy.

x (8 bytes): An Xnum (section 2.5.342) value that specifies a horizontal offset. The meaning is determined by wXMode.

y (8 bytes): An Xnum value that specifies a vertical offset. The meaning is determined by wYMode.

dx (8 bytes): An Xnum value that specifies a width or an horizontal offset. The meaning is determined by wWidthMode.

dy (8 bytes): An Xnum value that specifies a height or an vertical offset. The meaning is determined by wHeightMode.

reserved2 (2 bytes): MUST be zero, and MUST be ignored.

Show:
© 2015 Microsoft