Circle Bug 
Author Message
 Circle Bug

I am attempting to write a procedure that compensates for the bug described
in MSDN Q215336. My goal is to use the Circle method (for speed) were the
problem doesn't exist and switch to the Line method (much slower) were the
problem does exist. Problem is, I can not figure out how to "calculate" at
what values of radius and angles the probem occurs. Any help?

On NT4, I see errors occuring at a radius as little as 2000 twips.

http://www.*-*-*.com/ ;EN-US;Q215336

David



Tue, 28 Sep 2004 00:37:46 GMT  
 Circle Bug

Quote:

> I am attempting to write a procedure that compensates for the bug described
> in MSDN Q215336. My goal is to use the Circle method (for speed) were the
> problem doesn't exist and switch to the Line method (much slower) were the
> problem does exist. Problem is, I can not figure out how to "calculate" at
> what values of radius and angles the probem occurs. Any help?

> On NT4, I see errors occuring at a radius as little as 2000 twips.

> http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q215336

Circle rarely seems to do quite what I want, so I usually resort
to using Line anyway:

 URL:http://groups.google.com/groups?selm=u73g1uge5k0s2d%40corp.supernews.com

--
Joe Foster <mailto:jlfoster%40znet.com>  DC8s in Spaace: <http://www.xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Fri, 01 Oct 2004 14:38:41 GMT  
 Circle Bug

Quote:

> I am attempting to write a procedure that compensates for the bug described
> in MSDN Q215336. My goal is to use the Circle method (for speed) were the
> problem doesn't exist and switch to the Line method (much slower) were the
> problem does exist. Problem is, I can not figure out how to "calculate" at
> what values of radius and angles the probem occurs. Any help?

> On NT4, I see errors occuring at a radius as little as 2000 twips.

> http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q215336

Here's the code I've been using to reproduce the bug.  This shouldn't
be too terribly sensitive to the form's ScaleMode, but who knows...

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, _
  X As Single, Y As Single)

  Const Aspect = 1#

  Dim CX As Double: CX = ScaleLeft - 1 ' damn division by zero errors...
  Dim CY As Double: CY = ScaleTop + ScaleHeight
  Dim R As Double: R = Sqr((CX - X) * (CX - X) + (CY - Y) * (CY - Y))
  Dim A1 As Double: A1 = Atn(Abs((CY - Y) / (CX - X))) - 0.005
  Dim A2 As Double: A2 = Atn(Abs((CY - Y) / (CX - X))) + 0.005

  Debug.Print R; A1; A2

  If A1 < 0 Then A1 = 0 ' prevent circle's "documented" wackiness

  ' the red arc should not stray outside the bounding box, but oh well...
  Circle (CX, CY), R, RGB(255, 0, 0), A1, A2, Aspect
  Line (CX + R * Cos(A1) / Aspect, CY - R * Sin(A1)) _
      -(CX + R * Cos(A2) / Aspect, CY - R * Sin(A2)), , B

End Sub

--
Joe Foster <mailto:jlfoster%40znet.com>  Wanna buy a Bridge? <http://xenu.net/>
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sat, 02 Oct 2004 05:49:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. IDE BUGs, BUGs, BUGs....

2. BUGS BUGS BUGS!

3. Project98 OLE & VB: bugs, bugs, bugs

4. Can I draw a circle?

5. Circle?

6. Queryresult to diagram/circles

7. How to jump out of this circle?

8. Create line or circle on user Forms

9. How draw circle in UserForm in Word?

10. Line and circles with VB.net

11. drawing lines and circles

12. shapes (circle)

 

 
Powered by phpBB® Forum Software