[cairo] Cairo used in mono libgdiplus CVS
Daniel Morgan
danielmorgan at verizon.net
Tue Feb 17 16:48:55 PST 2004
You can browse mono cvs at (beware of word wrapping of the link):
http://cvs.hispalinux.es/cgi-bin/cvsweb/?hidenonreadable=1&f=u&logsort=date&
sortby=file&hideattic=1&cvsroot=mono
If that does not work,
1. go to this link
http://www.go-mono.com/
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 at cairographics.org
[mailto:cairo-admin at cairographics.org]On Behalf Of Dave Beckett
Sent: Monday, February 16, 2004 6:12 PM
To: cairo at 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
src/font.c:
/* Selects a font in Cairo without destroying it*/
cairo_status_t
cairo_select_font_nondestructive (cairo_t *cr,
cairo_font_t *font)
{
cr->gstate->font = font;
return CAIRO_STATUS_SUCCESS;
}
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
_utf8_to_glyphs
gdip_measure_string_widths
GdipDrawString
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
Dave
_______________________________________________
cairo mailing list
cairo at cairographics.org
http://cairographics.org/cgi-bin/mailman/listinfo/cairo
More information about the cairo
mailing list