Re: [cc65] Graphics library

Date view Thread view Subject view

From: Maciej Witkowiak (
Date: 2001-08-14 01:05:03

On Mon, Aug 13, 2001 at 03:58:15PM +0200, Ullrich von Bassewitz wrote:
> There is currently no library to port. But your input would be valuable for
> the design of the API. My current idea is to use something similar to the old
> borland graphics interface for DOS:
> ....and maybe some more routines like ellipse, arc, settextstyle and so on.

See <geos/ggraph.h> for inspiration :). You have addressed everything needed,
but I there is one nice thing in GEOS gfx routines: GraphicsString routine
which executes a string of graphics commands. It was very useful for fast
coding in asm, I don't know how it would be in C. Consider following example:

#include <geos.h>
const graphicStr myString = {

It works like turtle-gfx from LOGO (who remembers that :), this one simply
clears the screen. Those macros are translated into bytes and words of
coordinates and commands. To setup the screen only one pointer load and
function call is needed. Of course the overhead goes to the library then, but
handling of such command string can be done quite easy and efficient.

> Which colors are supported depends on the machine and the graphics mode. The
> getmax..() functions are used to query the mode settings at runtime.

Color stuff is somewhat confusing - there should be some interface to set
color pallete for given mode.


To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.

Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:41 CET