The alignment functions make it easy to align objects on the screen. |
|
AlignInsideEdges(); Align Inside Edges of a selection list |
|
AlignSelList_Bottom(); Align Selection List Bottom |
|
AlignSelList_Center(); Align Selection List Center |
|
AlignSelList_Left(); Align Selection List Left |
|
AlignSelList_Right(); Align Selection List Right |
|
AlignSelList_Top(); Align Selection List Top |
|
CenterOnPage(); Center objects in selection list |
|
JoinHoriz(); Join movable objects in the selection list horizontally |
|
JoinToFirst(); Join movable objects in the selection list to first | |
JoinVert(); Join movable objects in the selection list vertically | |
MakeSameSize(); Make all items in the selection list the same size as the first item. | |
SizeToPicture(); Resize and relocate all items in the selection list | |
This function aligns the right edge of all moveable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list (pSelList). |
||
Syntax: |
INT16 PUBLIC AlignInsideEdges ( |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
alignH: 0/1 |
||
0= |
don't align horizontally |
|
1= |
align horizontally |
|
alignV: 0/1 |
||
0= |
don't align vertically |
|
1= |
align vertically |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 hAlign = 1; |
|
Also See: |
AlignSelList_Bottom(), AlignSelList_Center, AlignSelList_Left(), AlignSelList_Right(), AlignSelList_Top |
This function aligns the bottom edges of all moveable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list (identified by pSelList) to the bottom-most edge of either the first selected objects (the first thing in the selection list) or to the bottom-most item in the list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
alignToFirst: 0/1 |
||
0= |
align to the bottom-most object |
|
1= |
align the list to the first object |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 TopAlign = 1; |
|
Also See: |
AlignSelList_Center(), AlignSelList_Left(), AlignSelList_Right(), AlignSelList_Top |
This function aligns the center of all moveable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list. The objects are centered based on the first object in the selection list. The horiz and vert parameters can be used to align object horizontally and/or vertically. |
||
Syntax: |
INT16 PUBLIC AlignSelList_Center ( |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
horiz: 0/1 |
||
0= |
don't align horizontally |
|
1= |
Align horizontally |
|
vert: 0/1 |
||
0= |
don't align vertically |
|
1= |
align vertically |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 hAlign = 1; |
|
Also See: |
AlignSelList_Bottom(), AlignSelList_Left(), AlignSelList_Right(), AlignSelList_Top |
This function aligns the left edges of all movable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list (pSelList). Objects are aligned to the left-most edge of either the first selected object (the first thing in the selection list) or to the left-most item in the list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
alignToFirst: 0/1 |
||
0= |
align to the left-most object |
|
1= |
align the list to the first object |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 AFirst = 1; |
|
Also See: |
AlignSelList_Bottom(), AlignSelList_Center(), AlignSelList_Right(), AlignSelList_Top |
This function aligns the right edges of all movable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list (pSelList). Objects are aligned to the right-most edge of either the first selected object (the first thing in the selection list) or to the right-most item in the list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
alignToFirst: 0/1 |
||
0= |
align to the right-most object |
|
1= |
align the list to the first object |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 AFirst = 1; |
|
Also See: |
AlignSelList_Bottom(), AlignSelList_Center(), AlignSelList_Left(), AlignSelList_Top |
This function aligns the top edges of all movable objects (e.g., graph title, subtitle, footnote, etc.) in the selection list (pSelList). Objects are aligned to the top-most edge of either the first selected object (the first thing in the selection list) or to the top-most item in the list. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
alignToFirst: 0/1 |
||
0= |
align to the top-most object |
|
1= |
align the list to the first object |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
Notes: |
This and other alignment functions align the edges of the bounding box in which the selected, moveable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, aligned objects may overlap. |
|
Example: |
INT16 AFirst = 1; |
|
Also See: |
AlignSelList_Bottom(), AlignSelList_Center(), AlignSelList_Left(), AlignSelList_Right() |
|
This function calculates new boundaries and centers all objects in the selection list identified by pSelList. The centerH and centerV flags allow you to specify horizontal centering, vertical centering, or both. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to a graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
centerH: 0/1 |
||
0= |
do not center horizontally |
|
1= |
center horizontally |
|
centerV: 0/1 |
||
0= |
do not center vertically |
|
1= |
center vertically |
|
Return: |
INT16 |
|
Zero = Centering successful |
||
E00_RANGE_ERROR = Centering Unsuccessful |
||
Notes: |
This function centers the bounding box in which the selected, movable objects reside. This bounding box is specified by the A_LOCATE_... attributes. Depending on the size/location of the box, objects may not appear to be centered. |
|
Example: |
INT16 hAlign = 0; |
|
This function joins movable objects in the selection list (pSelItem) horizontally. If stretchVert is set (1), selected items are moved vertically to attach to the first item in the list. If stretchVert is not set (0), selected items are simply aligned horizontally with the first item/object in the list. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnv() |
||
pGraph: Pointer to a graph object created by AllocGraphPtr() |
|||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|||
stretchVert: 0/1 |
|||
0= |
don't move vertically |
||
1= |
move vertically to attach objects |
||
Return: |
INT16 |
||
E00_OK = |
Alignment successful |
||
E00_RANGE_ERROR = |
Alignment not successful |
||
Example: |
JoinHoriz(gpDrawEnv,gpGraph,gpList,nSV); UpdateWindow(hWnd); } break; |
||
Notes: |
Selected objects must fit inside the chart frame horizontally in order to be joined. Otherwise, the location of selected objects is not changed. |
||
Also See: |
JoinToFirst(), JoinVert() |
This function snaps selected objects to the closest side of the first item in the list (pSelList). |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list allocated by Select_AllocList().See the SelListRec in Appendix A. |
||
Return: |
INT16 |
|
E00_OK = |
Alignment successful |
|
E00_RANGE_ERROR = |
Alignment not successful |
|
Example: |
/* Add to selection list and draw handles */ |
|
Notes: |
JoinToFirst() is an intuitive routine that attempts to snap selected objects (Graph objects and annotations) to the closest side of the first selected object. Example: If you select the graph frame, the legend frame, and the main title and call JoinToFirst(), the legend might snap to the right side of the graph (if that is closest) and the title might snap to the top of the graph (again, if it is the closest side). |
|
Also See: |
JoinVert()
This function joins moveable objects in the selection list (identified by pSelItem) next to the first selected item in a vertical direction. If stretchHoriz is set (1), selected items are moved horizontally to attach to the first item in the list. If stretchHoriz is not set (0), selected items are simply aligned vertically with the first item/object in the list. |
|||
Syntax: |
INT16 PUBLIC |
||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnv() |
||
pGraph: Pointer to a graph object created by AllocGraphPtr() |
|||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
|||
stretchHoriz: 0/1 |
|||
0= |
don't change horizontal placement |
||
1= |
move horizontally to attach objects |
||
Return: |
INT16 |
||
E00_OK = |
Alignment successful |
||
E00_RANGE_ERROR = |
Alignment not successful |
||
Example: |
/* Add to selection list and draw handles */ |
||
Notes: |
Selected objects must fit inside the chart frame vertically in order to be joined. Otherwise, the location of selected objects is not changed. |
||
Also See: |
JoinHoriz(), JoinToFirst() |
This function makes all items in the selection list (identified by pSelList) the same size as the first one in the horizontal, vertical or both directions. |
||
Syntax: |
INT16 PUBLIC |
|
Input: |
pDE: Pointer to a graph environment created by AllocGraphEnv() |
|
pGraph: Pointer to a graph object created by AllocGraphPtr() |
||
pSelList: Pointer to a selection list .allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||
horiz: 0/1 |
||
0= |
don't use first item in horizontal direction |
|
1= |
use first item in horizontal direction |
|
vert: 0/1 |
||
0= |
don't use first item in vertical direction |
|
1= |
use first item in vertical direction |
|
Return: |
INT16 |
|
E00_OK = Alignment successful |
||
E00_RANGE_ERROR = Alignment not successful |
||
This function resizes and relocates all items in the selection list (pSelList). It determines the current center of each object and the boundary of the picture (in destination coordinates), calculates the virtual height and width of the picture, constructs new boundaries for the object, and moves the object. It designed for use with annotation objects. |
||||
Syntax: |
INT16 PUBLIC |
|||
Input: |
pDE: Pointer to a draw environment created by AllocDrawEnvPtr() |
|||
pGraph: Pointer to the graph object created by AllocGraphPtr() |
||||
pSelList: Pointer to a selection list allocated by Select_AllocList(). See the SelListRec in Appendix A. |
||||
Return: |
INT16: |
|||
Possible Values |
Description |
|||
E00_OK = |
Alignment successful |
|||
E00_RANGE_ERROR = |
Alignment not successful |
|||
Example: |
void CGraph::SizeToPicture( CDrawEnv& de ) |