Rules give special behaviors to shapes. Rules can govern a single shape, like in the case of a callout shape, or multiple shapes, as in the case of connectors. Each drawing can have a list of rules associated with it.
Governs a connector shape.
typedef struct _FConnectorRule { ULONG ruid; // rule ID MSOSPID spidA; // SPID of shape A MSOSPID spidB; // SPID of shape B MSOSPID spidC; // SPID of connector shape ULONG cptiA; // Connection site Index of shape A ULONG cptiB; // Connection site Index of shape B } FConnectorRule;
Aligns shapes. The FAlignRule record is followed by the SPIDs of the proxy shapes.
// FAlignRule typedef struct _FAlignRule { ULONG ruid; // rule ID ULONG align; // alignment – see below ULONG cProxies; // number of shapes governed by rule } FAlignRule; // ALIGN == Shape alignment (Horz and vert can be or'ed together) #define alignHorz 0x000F // mask for horizontal component #define alignLeft 0x0001 // left edges #define alignCenter 0x0002 // horizontal center #define alignRight 0x0003 // right edges #define alignVert 0x00F0 // mask for vertical component #define alignTop 0x0010 // top edges #define alignMiddle 0x0020 // vertical center #define alignBottom 0x0030 // bottom edges #define alignRelative 0x0100 // Relative to the page
One Arc rule per elliptical arc shape.
// FARCRU -- Arc Rule typedef struct _FARCRU { ULONG ruid; // rule ID MSOSPID spid; // spid of arc shape } FARCRU;
One callout rule per callout shape.
// FCORU -- Callout Rule typedef struct _FCORU { ULONG ruid; // rule ID MSOSPID spid; // spid of callout shape } FCORU;