BUG: Pie() and Arc() Functions Fail with a Wide Pen

Last reviewed: January 5, 1995
Article ID: Q111337
The information in this article applies to:
  • Microsoft Windows Software Development Kit (SDK) for Windows versions 3.0 and 3.1

SYMPTOMS

When creating a wide (multiple pixel) pen and drawing a reasonably large object, the drawing function returns 0 (zero) or does not draw anything. Choosing a thin (single pixel) pen or choosing a pen smaller than X pixels corrects the problem.

CAUSE

GDI builds a polygon that basically puts a circle on every point along the pen's path and calls Polygon() to fill it. If the point data or the working storage of Polygon() exceeds 64K, the call is failed.

STATUS

Microsoft has confirmed this to be a bug in Windows version 3.0 and 3.1. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The following are examples that reproduce the problems in Windows version 3.1.

Pie() Function

When selecting a bold pen [second parameter of CreatePen() is greater than 7] and calling Pie() as follows, nothing is drawn; however, the return value of Pie() indicates that it was drawn:

   hPen=CreatePen(PS_SOLID,9,0L);
   SelectObject(hDC,hPen);
   Pie(hDC, 96, 11, 839, 754, 440, 12, 479, 11);

Arc() Function

The Arc() function returns an error value when called as follows, even though the width and height are both within the documented limits of 32767:

   Arc( hDC, -11047, -3493, 806, 8360, 311, 64, 356, 170 );
                x1      y1   x2    y2   X3  Y3   X4   Y4


Additional reference words: buglist3.00 buglist3.10 3.00 3.10
KBCategory: kbprg kbbuglist
KBSubcategory: GdiDrw


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 5, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.