#
# Copyright (c) 2004-2005 by the cairo perl team (see the file README)
#
# Licensed under the LGPL, see LICENSE file for more information.
#
# $Id: cairo-perl.typemap 162 2008-10-05 19:59:42Z tsch $
#

TYPEMAP

# For backwards compatibility: The typemap shipped with perl 5.6.2 apparently
# don't know const char *.
const char * 	   	T_PV

cairo_bool_t		T_UV

cairo_font_extents_t *	T_CAIRO_FONT_EXTENTS
cairo_text_extents_t *	T_CAIRO_TEXT_EXTENTS
cairo_glyph_t *		T_CAIRO_GLYPH
cairo_path_t *		T_CAIRO_PATH

FT_Face			T_FT_FACE


INPUT

T_CAIRO_GLYPH
	$var = SvCairoGlyph ($arg);

T_CAIRO_PATH
	$var = SvCairoPath ($arg);

T_FT_FACE
	if (sv_isobject ($arg) && sv_derived_from ($arg, \"Font::FreeType::Face\")) {
		$var = ($type) SvIV ((SV *) SvRV ($arg));
	} else {
		croak(\"$var is not of type Font::FreeType::Face\");
	}

OUTPUT

T_CAIRO_FONT_EXTENTS
	$arg = newSVCairoFontExtents ($var);

T_CAIRO_TEXT_EXTENTS
	$arg = newSVCairoTextExtents ($var);

T_CAIRO_GLYPH
	$arg = newSVCairoGlyph ($var);

T_CAIRO_PATH
	$arg = newSVCairoPath ($var);
