Article View: comp.sys.ibm.pc.programmer
Article #549Drawing circles with MSC 5.00
From: Fridrik Skulason
Date: Tue, 29 May 1990 11:07
Date: Tue, 29 May 1990 11:07
53 lines
2162 bytes
2162 bytes
I have noticed a minor problem when drawing circles in MSC 5.00, namely that
the circle sometimes seems be one pixel too large.
Take the following program for example:
#include <stdio.h>
#include <graph.h>
main()
{
_setvideomode(_ERESCOLOR);
_moveto(50,90);_lineto(80,90);
_ellipse(_GBORDER,61,90,69,95); /* upper limit of circle = 90 */
getch();
_setvideomode(_TEXTC80);
}
It is supposed to produce something like this:
line 90 *******************************
** **
* *
* *
** **
***
Instead I get something like this:
***
line 90 *******************************
* *
* *
** **
***
where the top of the circle seems to be one pixel too high. This effect
only happens in certain cases, which seems to indicate a minor bug in the
library. My questions:
I only have MSC 5.00 - does this effect also appear in the latest versions ?
I could solve this by using Turbo C, (which should have been used
to start with), but then I would have to rewrite a considerable part of the
application. Does anyone know of another C compiler with MSC-like
graphics functions, without this problem ?
-frisk
--
Fridrik Skulason University of Iceland |
Technical Editor of the Virus Bulletin (UK) | Reserved for future expansion
E-Mail: frisk@rhi.hi.is Fax: 354-1-28801 |
Technical Details
Message-ID:
<1738@krafla.rhi.hi.is>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!isgate!krafla!friskShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!isgate!krafla!frisk From: frisk@rhi.hi.is (Fridrik Skulason) Newsgroups: comp.sys.ibm.pc.programmer Subject: Drawing circles with MSC 5.00 Message-ID: <1738@krafla.rhi.hi.is> Date: 29 May 90 11:07:36 GMT Reply-To: frisk@rhi.hi.is (Fridrik Skulason) Organization: University of Iceland (RHI) Lines: 53