Output(OS_POLYLINE)

  WORD Output(lpDestDev, OS_POLYLINE, wCount, lpPoints, lpPPen, NULL, lpDrawMode, lpClipRect)    
  LPPDEVICE lpDestDev;    
  WORD wCount;    
  LPPOINT lpPoints;    
  LPPPEN lpPPen;    
  LPDRAWMODE lpDrawMode;    
  LPRECT lpClipRect;    

The OS_POLYLINE style specifies that the Output function draws a set of line segments. Although the line segment may create a closed figure, Output never fills the figure. GDI calls this function when an application calls functions such as the Polyline function (GDI.37).

Every graphics driver (for Windows version 2.0 and later) must support the OS_POLYLINE style.

Parameters

lpDestDev

Points to a PDEVICE or PBITMAP structure specifying the destination device or bitmap.

wCount

Specifies the number of POINT structures in the array pointed to by the lpPoints parameter. The wCount parameter must be at least two.

lpPoints

Points to an array of POINT structures specifying the endpoints of the lines segments. The array has wCount elements.

lpPPen

Points to a PPEN structure specifying the physical pen to draw lines.

lpDrawMode

Points to a DRAWMODE structure containing information when drawing, such as binary raster operation, background mode, and foreground and background color.

lpClipRect

Points to a RECT structure containing coordinates for the clipping rectangle. If the lpClipRect parameter is NULL, the clipping rectangle is the entire display surface.

Return Value

The return value is 1 if the function draws the figure. Otherwise, it is zero if the function encounters an unrecoverable error. The return value is -1 if the function cannot draw the specified figure and wants GDI to simulate it.

Comments

Output draws each line segment from its starting point up to, but not including, its end point. If more than one line segment is drawn, each new segment starts at the end point of the previous segment.

Since Output does not use a physical brush to draw the lines, the lpPBrush parameter is usually NULL.

See Also

Output(OS_ALTPOLYGON), Output(OS_WINDPOLYGON)