[Mono-dev] patch for Mono.Cairo to rename Graphics to Context

Mike Kestner mkestner at novell.com
Tue Nov 29 11:35:50 EST 2005


On Mon, 2005-11-28 at 21:10 -0500, John Luke wrote:
> Hello,
> 
> Here is a patch that renames the Graphics class to Context, like all the
> other cairo bindings use.  It would be a breaking change, but I think it
> will be less confusing for developers. Please speak up if you disagree.
> 
> There is one other API change I think would be nice, but I dont think
> I'll have time to do it this week.  That is to change PointD, Color, etc
> to structs and rename PointD to Point.  Everything else should be able
> to be handled in an API compatible way.

Seems like a gratuitous change to me.  

We are already exposing Cairo.Graphics in the 2.7.1 release of Gtk#.
It's an unstable release, so I can change the symbol still, but the
change as posted would break 2.7.1 on newer mono releases.

If this change is going to be made, at the very least I would suggest
adding something like:

[Obsolete ("Replaced by Cairo.Context")]
public class Graphics : Context {}

That would at least give source compat, if not runtime compat. But I
don't personally think it's worth changing just to be consistent with
other language bindings.

-- 
Mike Kestner <mkestner at novell.com>




More information about the Mono-devel-list mailing list