[Xr] What happended to the idea of getting rid of the xrs argument?

Paul Sladen xr at paul.sladen.org
Mon Jun 9 10:45:19 PDT 2003


On Thu, 5 Jun 2003, Bill Spitzak wrote:
> What I meant is if there is an XrFoo(xrs,...) call, people have suggested 
> that this is object-oriented [...]

The more I think about this, the more I come around to wanting:

  XrRect( 2.0, 2.0, 42.0, 42.0 );
  XrFill();

as the *published interface*, manipulating the preset context--it has to be
this simple to get cross-platform acceptance.  Then, I believe there should
an additional interface:

  XrsRect( xrs, 2.0, 2.0, 42.0, 42.0 );
  XrsFill( xrs );

whereby the OO-interfaces can be more easily implemented and people needing
multiple contexts for efficiency go explicitly pass the context.

Two birds with one stone and no learning overhead for the developer?  [0]

	-Paul

[0] if you are worrying, just think of the variations on the base functions
in OpenGL--eg: the parameters as floats/doubles/integers/vector-arrays:

  glColor3b, glColor3d, glColor3f, glColor3i, glColor3s, glColor3ub,
  glColor3ui, glColor3us, glColor4b, glColor4d, glColor4f, glColor4i,
  glColor4s, glColor4ub, glColor4ui, glColor4us, glColor3bv, glColor3dv,
  glColor3fv, glColor3iv, glColor3sv, glColor3ubv, glColor3uiv, glColor3usv,
  glColor4bv, glColor4dv, glColor4fv, glColor4iv, glColor4sv, glColor4ubv,
  glColor4uiv, glColor4usv.

...and yet, you only have to *remember* "glColor()"!
-- 
War is inconsistent with Truth.  Nottingham, GB







More information about the cairo mailing list