[comp.sys.amiga] New IBMs? Amiga runs ellipses....

dale@amiga.UUCP (Dale Luck) (05/09/87)

In some article a long time ago, jesup wrote:
>
>In article <160005@wsucshp.UUCP> kinner@wsucshp.UUCP (Bill Kinnersley ) writes:
>[Someone wrote this, I don't know who.  REJ]
>>     I can envision at a future time somebody allocating a background
>>     bitmap, rendering (and filling) the ellipse in the background by the 
>>     most efficient method available, then blitting (ClipBlitTransparent?)
>>     the resultant ellipse into the target area.  I would assume that the
>>     result would be faster than the writepixel-per-dot than is now done?
>
>        This is already possible, in two different ways:
>1.  Use AreaEllipse and a TmpRas to do a filled Ellipse using current
>  drawing modes.  Internally, this writes an ellipse into the TmpRas (I
>  presume using DrawEllipse, and thus WritePixel.  Not too bad, though,
>  because no clipping need be done.  Then it blits the AreaPtrn into the
>  destination using the area fill mode of the blitter.  Note that the
>  drawing modes DO apply, so you can do things like COMPLEMENT, etc.
>  Minor bug: AreaEllipse won't draw an outline in the AOlPen
>

The area ellipse routines do precisely this. They draw a 1 bit bitplane
ellipse in TmpRas, right along with the other polygons, using one
dot mode. The blitter is used to fill it. and then BltPattern is called.
The Ellipse routine in 1.2 is a first pass at a general ellipse routine.
It handles many boundary cases and all the drawing modes.
There is lots of room for tuning there. Maybe 1.3.

As far as just drawing an ellipse, this technique may have a different
cost tradeoff since you need to clear the TmpRas before using it. You
also them make all those ellipse drawer allocate a TmpRas.

---
Duck, no longer an employee of Commodore, so I'm certainly not officially
      representing them.
      However I'm still an amigan.