[Mono-list] RE: [cairo] Cairo used in mono libgdiplus CVS

Daniel Morgan danielmorgan@verizon.net
Tue, 17 Feb 2004 19:48:55 -0500

You can browse mono cvs at (beware of word wrapping of the link):


If that does not work,

1. go to this link


2. Look for link "browse the source tree", and click it.

3. look for the cvs modules mono, mcs, and libgdiplus

-----Original Message-----
From: cairo-admin@cairographics.org
[mailto:cairo-admin@cairographics.org]On Behalf Of Dave Beckett
Sent: Monday, February 16, 2004 6:12 PM
To: cairo@cairographics.org
Cc: Jordi Mas i Hernandez
Subject: [cairo] Cairo used in mono libgdiplus CVS

I was looking to see what the Mono libgdiplus in CVS used of the cairo
library and found some distinctly unportable code in src/gdip.h -
#include <cairoint.h>
which won't (shouldn't) be packaged by any cairo packager.

I picked Jordi to CC: on the mono side of things, I'm not sure who's the
best to email.  I appreciate this code is very new and in CVS, unstable.

So I found in the CVS libgdiplus, src/gdip.h:

// NOTE: This file includes some internal cairo definitions to
// avoid to define them again you should have it in your include path
// it is part of the standard cairo development package
#include <cairoint.h>

/* Cairo internal extructures and defines*/
#define DOUBLE_TO_26_6(d) ((FT_F26Dot6)((d) * 64.0))
#define DOUBLE_FROM_26_6(t) ((double)(t) / 64.0)
#define DOUBLE_TO_16_16(d) ((FT_Fixed)((d) * 65536.0))
#define DOUBLE_FROM_16_16(t) ((double)(t) / 65536.0)


and libgdiplus needs, at the least, cairo_matrix, cairo_font
and cairo_ft_font_t.

These internals seem to be used for fonts, for example in

/* Selects a font in Cairo without destroying it*/
cairo_select_font_nondestructive (cairo_t *cr,
			cairo_font_t *font)
    cr->gstate->font = font;

and also (earlier in the file) in gdip_font_create which is rather long
to paste but uses a field inside a cairo internal structure and some
of the defines above.

There is also use in src/graphics.c functions
of fields face, face.matrix, base fields of cairo_font/ft_font.

This code probably should be pulled apart and the cairo/libgdiplus
parts separated.  There doesn't seem to be any web-based CVS for mono
that you can browse at.  So start at http://www.go-mono.com/ccvs.html
and cvs -z3 co libgdiplus


cairo mailing list