Output(OS_RECTANGLE)

  WORD Output(lpDestDev, OS_RECTANGLE, 2, lpPoints, lpPPen, lpPBrush, lpDrawMode, lpClipRect)    
  LPPDEVICE lpDestDev;    
  LPPOINT lpPoints;    
  LPPPEN lpPPen;    
  LPPBRUSH lpPBrush;    
  LPDRAWMODE lpDrawMode;    
  LPRECT lpClipRect;    

The OS_RECTANGLE style specifies that the Output function draws a rectangle and fills it using a specified brush. GDI calls this function when an application calls the Rectangle function (GDI.27).

The graphics driver must support the OS_RECTANGLE style if the PC_RECTANGLE value is set in the dpPolygonals member of the GDIINFO structure.

Parameters

lpDestDev

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

lpPoints

Points to an array of two POINT structures representing the corners of the rectangle.

lpPPen

Points to a PPEN structure that specifies the physical pen to draw the border of the rectangle.

lpPBrush

Points to a PBRUSH structure that specifies the physical brush to fill the rectangle.

lpDrawMode

Points to a DRAWMODE structure containing the drawing information to draw and fill the rectangle.

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

The Output function fills the interior of the rectangle first, then draws the border. Before filling and drawing, Output must subtract one from the bottom and right coordinates. GDI requires that rectangles are drawn so that the border lies one pixel within the specified right and bottom edges.

See Also

Output(OS_ALTPOLYGON), Output(OS_WINDPOLYGON)