GetFigureAddr
Gets figure starting address
void *GetFigureType(
const FIG_HEADER *figure,
const int no
)
Parameters
*figure
|
Figure data structure address
|
no
|
Figure number
|
Return Value
Starting address of the specified figure data structure
NULL (on errors)
Description
Gets the starting address of the figure of the specified figure number.
If the specified figure number does not exist, NULL is returned.
The following are the figure types to be returned.
FIG_POINT
|
Point
|
FIG_LINE
|
Straight line
|
FIG_LINEW
|
Wide straight line
|
FIG_BOX
|
Rectangle
|
FIG_ELLIPSE
|
Ellipse
|
FIG_CIRCLE
|
Circle
|
FIG_CIRCLEW
|
Wide circle
|
FIG_ARC
|
Arc
|
FIG_ARCW
|
Wide arc
|
FIG_POLYGON
|
Polygon
|
ftype = GetFigureType(figure, i);
switch (ftype->type) {
case T_POINT: // Point
{
FIG_POINT *fpoint = (FIG_POINT *)GetFigureAddr(figure, i);
// Processing in case of point
}
break;
case T_LINE: // Straight line
{
FIG_LINE *fline = (FIG_LINE *)GetFigureAddr(figure, i);
// Processing in case of straight line
}
break;
:
:
:
Notes