🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #65

drawArc

#65
From: user
Date: Wed, 23 Mar 2005 04:08
23 lines
1723 bytes
Hi everyone,

I am having a very strange problem with the method, drawArc.
The problem is that it does not produce a symmetrical ( and )
when they are supposed. Here is code to illustrate the problem.

    int px1=40,px2=7,py=40,wid=40,hit=24,
        bgnAng1=155,arcAng1=50,bgnAng2=25,arcAng2=-50;
    g.drawArc(px1,py,wid,hit,bgnAng1,arcAng1);
    g.drawArc(px2,py,wid,hit,bgnAng2,arcAng2);

As you draw them, you will see that there is 1 or 2 pixels
difference in their bottom/top (ie y) pixel addresses.

I suspect that some trancation in the points calculation
for ( and ) internally (ie within drawArc) is causing, but
at the same time, I am surprised to see such difference when
considering that such calculation must be done in double
precision internally...

Any idea?

Thank you very much.
Technical Details
Message-ID: <4240eb6f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1089d0,f607d48be60d3c54,start
X-Google-Attributes: gid1089d0,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 22 Mar 2005 23:08:23 -0500
From:  user@domain.invalid
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: drawArc
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.192.157.16
Message-ID: <4240eb6f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1111550831 69.192.157.16 (22 Mar 2005 20:07:11 -0800)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail