Name
GetPathExtents -- compute path's extents (V5.0)
Synopsis
void GetPathExtents(struct PathExtentsCtrl *ctrl);
Function
This function has to compute the extents of the specified path if drawn using the specified style. Hollywood needs this information to determine the size of the bitmap it allocates and passes to DrawPath(). Hollywood passes a struct PathExtentsCtrl pointer which contains all information to this function. struct PathExtentsCtrl looks like this:

 
struct PathExtentsCtrl
{
    void *Path;                 // [in]
    struct PathStyle *Style;    // [in]
    int Fill;                   // [in]
    int Thickness;              // [in]
    double TX;                  // [in]
    double TY;                  // [in]
    double X1;                  // [out]
    double Y1;                  // [out]
    double X2;                  // [out]
    double Y2;                  // [out]
    struct hwMatrix2D *Matrix;  // [in]  -- V6.0
};

Here's a description of each structure member's function:

Path:
The path's whose extents are to be calculated. This is a pointer to a disparate array consisting of a variable number of path commands and their arguments. See DrawPath for details.

Style:
This will be set to a pointer to a struct PathStyle containing information about the line style that shall be used when drawing this path. See DrawPath for details.

Fill:
This member specifies whether Hollywood wants the extents of filled shapes or just the stroke outlines. If this is True, you have to determine the extents of filled shapes.

Thickness:
This member contains the line thickness for the path.

TX:
If this does not equal 0, Hollywood wants you to translate the path by this many pixels on the x-axis before determining the extents.

TY:
If this does not equal 0, Hollywood wants you to translate the path by this many pixels on the y-axis before determining the extents.

X1:
Your implementation must set this member to the start x position of the path.

Y1:
Your implementation must set this member to the start y position of the path.

X2:
Your implementation must set this member to the end x position of the path.

Y2:
Your implementation must set this member to the end y position of the path.

Matrix:
This member must only be handled if the HWEXT_VECTOR_EXACTFIT extension bit has been set. In that case, this member contains a 2D transformation matrix that should be applied to this path before computing the path extents. If there is no transformation, you'll get a pointer to an identity matrix consisting of (1,0,0,1). (V6.0)

Inputs
ctrl
pointer to a struct PathExtentsCtrl which contains information about the path and receives details about its extents

Show TOC