mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-25 19:31:04 +00:00
2003-02-26 Charles Iliya Krempeaux <charles@reptile.ca>
* configure.in : Added support for Rsvg.NET -- librsvg .NET bindings. (Made a check for the library. And made it so "rsvg/Makefile" would be generated. Also made it so it will display if rsvg-sharp.dll will be generated or not.) * makefile : Added support for Rsvg.NET -- librsvg .NET bindings. (Added an entry for Rsvg.NET.) * sources/gtk-sharp.sources : Added an entry for Rsvg.NET -- librsvg .NET bindings. * rsvg/ : Created "rsvg/" directory. (To hold stuff for Rsvg.NET.) * rsvg/Tool.cs : Created Rsvg.Tool class to hold various procedures (which were not automatically wrapped). * rsvg/Makefile.in : Created "rsvg/Makefile.in". * api/Makefile.in : Added and entry for Rsvg.NET. svn path=/trunk/gtk-sharp/; revision=12020
This commit is contained in:
parent
4a6b18ee0f
commit
d5ec2ba7cb
19
ChangeLog
19
ChangeLog
|
@ -1,3 +1,22 @@
|
||||||
|
2003-02-26 Charles Iliya Krempeaux <charles@reptile.ca>
|
||||||
|
|
||||||
|
* configure.in : Added support for Rsvg.NET -- librsvg
|
||||||
|
.NET bindings. (Made a check for the library. And
|
||||||
|
made it so "rsvg/Makefile" would be generated. Also
|
||||||
|
made it so it will display if rsvg-sharp.dll will
|
||||||
|
be generated or not.)
|
||||||
|
* makefile : Added support for Rsvg.NET -- librsvg
|
||||||
|
.NET bindings. (Added an entry for Rsvg.NET.)
|
||||||
|
* sources/gtk-sharp.sources : Added an entry for
|
||||||
|
Rsvg.NET -- librsvg .NET bindings.
|
||||||
|
* rsvg/ : Created "rsvg/" directory. (To hold stuff
|
||||||
|
for Rsvg.NET.)
|
||||||
|
* rsvg/Tool.cs : Created Rsvg.Tool class to hold
|
||||||
|
various procedures (which were not automatically
|
||||||
|
wrapped).
|
||||||
|
* rsvg/Makefile.in : Created "rsvg/Makefile.in".
|
||||||
|
* api/Makefile.in : Added and entry for Rsvg.NET.
|
||||||
|
|
||||||
2003-02-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
2003-02-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||||
|
|
||||||
* generator/Parser.cs: use XmlDocument.Load (Stream). The one using
|
* generator/Parser.cs: use XmlDocument.Load (Stream). The one using
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
*.dll
|
*.dll
|
||||||
*.exe
|
*.exe
|
||||||
*.xml
|
|
||||||
generated
|
generated
|
||||||
generated-stamp
|
generated-stamp
|
||||||
Makefile
|
Makefile
|
||||||
|
|
|
@ -10,7 +10,9 @@ APIS = \
|
||||||
gnome-api.xml \
|
gnome-api.xml \
|
||||||
gda-api.xml \
|
gda-api.xml \
|
||||||
gst-api.xml \
|
gst-api.xml \
|
||||||
gnomedb-api.xml
|
gnomedb-api.xml \
|
||||||
|
rsvg-api.xml \
|
||||||
|
|
||||||
|
|
||||||
RUNTIME=mono
|
RUNTIME=mono
|
||||||
|
|
||||||
|
|
181
api/rsvg-api.xml
Normal file
181
api/rsvg-api.xml
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<api>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
This file was automatically generated.
|
||||||
|
Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
|
||||||
|
|
||||||
|
-->
|
||||||
|
<namespace name="Rsvg" library="rsvg-2">
|
||||||
|
<enum name="DefType" cname="RsvgDefType" type="enum">
|
||||||
|
<member cname="RSVG_DEF_LINGRAD" name="Lingrad"/>
|
||||||
|
<member cname="RSVG_DEF_RADGRAD" name="Radgrad"/>
|
||||||
|
</enum>
|
||||||
|
<enum name="Error" cname="RsvgError" type="enum">
|
||||||
|
<member cname="RSVG_ERROR_FAILED" name="Failed"/>
|
||||||
|
</enum>
|
||||||
|
<callback name="SizeFunc" cname="RsvgSizeFunc">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="gint*" name="width"/>
|
||||||
|
<parameter type="gint*" name="height"/>
|
||||||
|
<parameter type="gpointer" name="user_data"/>
|
||||||
|
</parameters>
|
||||||
|
</callback>
|
||||||
|
<struct name="BpathDef" cname="RsvgBpathDef">
|
||||||
|
<field cname="ref_count" type="int"/>
|
||||||
|
<field cname="bpath" type="ArtBpath*"/>
|
||||||
|
<field cname="n_bpath" type="int"/>
|
||||||
|
<field cname="n_bpath_max" type="int"/>
|
||||||
|
<field cname="moveto_idx" type="int"/>
|
||||||
|
<method name="ArtFinish" cname="rsvg_bpath_def_art_finish">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="Closepath" cname="rsvg_bpath_def_closepath">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="Curveto" cname="rsvg_bpath_def_curveto">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="double" name="x1"/>
|
||||||
|
<parameter type="double" name="y1"/>
|
||||||
|
<parameter type="double" name="x2"/>
|
||||||
|
<parameter type="double" name="y2"/>
|
||||||
|
<parameter type="double" name="x3"/>
|
||||||
|
<parameter type="double" name="y3"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Free" cname="rsvg_bpath_def_free">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="Lineto" cname="rsvg_bpath_def_lineto">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="double" name="x"/>
|
||||||
|
<parameter type="double" name="y"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Moveto" cname="rsvg_bpath_def_moveto">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="double" name="x"/>
|
||||||
|
<parameter type="double" name="y"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor cname="rsvg_bpath_def_new"/>
|
||||||
|
<constructor cname="rsvg_bpath_def_new_from">
|
||||||
|
<parameters>
|
||||||
|
<parameter type="ArtBpath*" name="bpath"/>
|
||||||
|
</parameters>
|
||||||
|
</constructor>
|
||||||
|
<method name="Ref" cname="rsvg_bpath_def_ref">
|
||||||
|
<return-type type="RsvgBpathDef*"/>
|
||||||
|
</method>
|
||||||
|
</struct>
|
||||||
|
<struct name="DefVal" cname="RsvgDefVal">
|
||||||
|
<field cname="type" type="RsvgDefType"/>
|
||||||
|
<callback cname="free">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="RsvgDefVal*" name="self"/>
|
||||||
|
</parameters>
|
||||||
|
</callback>
|
||||||
|
</struct>
|
||||||
|
<struct name="Defs" cname="RsvgDefs" opaque="true">
|
||||||
|
<method name="Free" cname="rsvg_defs_free">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="Lookup" cname="rsvg_defs_lookup">
|
||||||
|
<return-type type="RsvgDefVal*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="const-char*" name="name"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<constructor cname="rsvg_defs_new"/>
|
||||||
|
<method name="Set" cname="rsvg_defs_set">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="const-char*" name="name"/>
|
||||||
|
<parameter type="RsvgDefVal*" name="val"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
</struct>
|
||||||
|
<struct name="GradientStop" cname="RsvgGradientStop">
|
||||||
|
<field cname="offset" type="double"/>
|
||||||
|
<field cname="rgba" type="guint32"/>
|
||||||
|
</struct>
|
||||||
|
<struct name="GradientStops" cname="RsvgGradientStops">
|
||||||
|
<field cname="n_stop" type="int"/>
|
||||||
|
<field cname="stop" type="RsvgGradientStop*"/>
|
||||||
|
</struct>
|
||||||
|
<struct name="Handle" cname="RsvgHandle" opaque="true">
|
||||||
|
<method name="Close" cname="rsvg_handle_close">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="GError**" name="error"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Free" cname="rsvg_handle_free">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="GetPixbuf" cname="rsvg_handle_get_pixbuf">
|
||||||
|
<return-type type="GdkPixbuf*"/>
|
||||||
|
</method>
|
||||||
|
<constructor cname="rsvg_handle_new"/>
|
||||||
|
<method name="SetSizeCallback" cname="rsvg_handle_set_size_callback">
|
||||||
|
<return-type type="void"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="RsvgSizeFunc" name="size_func"/>
|
||||||
|
<parameter type="gpointer" name="user_data"/>
|
||||||
|
<parameter type="GDestroyNotify" name="user_data_destroy"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Write" cname="rsvg_handle_write">
|
||||||
|
<return-type type="gboolean"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="const-guchar*" name="buf"/>
|
||||||
|
<parameter type="gsize" name="count"/>
|
||||||
|
<parameter type="GError**" name="error"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
</struct>
|
||||||
|
<struct name="LinearGradient" cname="RsvgLinearGradient">
|
||||||
|
<field cname="super" type="RsvgDefVal"/>
|
||||||
|
<field cname="affine" array_len="6" type="double"/>
|
||||||
|
<field cname="x1" type="double"/>
|
||||||
|
<field cname="y1" type="double"/>
|
||||||
|
<field cname="x2" type="double"/>
|
||||||
|
<field cname="y2" type="double"/>
|
||||||
|
<field cname="spread" type="ArtGradientSpread"/>
|
||||||
|
<field cname="stops" type="RsvgGradientStops*"/>
|
||||||
|
</struct>
|
||||||
|
<struct name="PSCtx" cname="RsvgPSCtx">
|
||||||
|
<field cname="dummy" type="int"/>
|
||||||
|
</struct>
|
||||||
|
<struct name="PaintServer" cname="RsvgPaintServer" opaque="true">
|
||||||
|
<method name="Parse" cname="rsvg_paint_server_parse" shared="true">
|
||||||
|
<return-type type="RsvgPaintServer*"/>
|
||||||
|
<parameters>
|
||||||
|
<parameter type="const-RsvgDefs*" name="defs"/>
|
||||||
|
<parameter type="const-char*" name="str"/>
|
||||||
|
</parameters>
|
||||||
|
</method>
|
||||||
|
<method name="Ref" cname="rsvg_paint_server_ref">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
<method name="Unref" cname="rsvg_paint_server_unref">
|
||||||
|
<return-type type="void"/>
|
||||||
|
</method>
|
||||||
|
</struct>
|
||||||
|
<struct name="RadialGradient" cname="RsvgRadialGradient">
|
||||||
|
<field cname="super" type="RsvgDefVal"/>
|
||||||
|
<field cname="affine" array_len="6" type="double"/>
|
||||||
|
<field cname="cx" type="double"/>
|
||||||
|
<field cname="cy" type="double"/>
|
||||||
|
<field cname="r" type="double"/>
|
||||||
|
<field cname="fx" type="double"/>
|
||||||
|
<field cname="fy" type="double"/>
|
||||||
|
<field cname="stops" type="RsvgGradientStops*"/>
|
||||||
|
</struct>
|
||||||
|
</namespace>
|
||||||
|
</api>
|
11
configure.in
11
configure.in
|
@ -88,6 +88,14 @@ if test "x$enable_gda" = "xyes"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
RSVG_REQUIRED_VERSION=2.0.1
|
||||||
|
PKG_CHECK_MODULES(RSVG_DEPENDENCIES, librsvg-2.0 >= $RSVG_REQUIRED_VERSION, enable_rsvg=yes, enable_rsvg=no)
|
||||||
|
if test "x$enable_rsvg" = "xyes"; then
|
||||||
|
BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS $RSVG_DEPENDENCIES_CFLAGS"
|
||||||
|
BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS $RSVG_DEPENDENCIES_LIBS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
|
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
|
||||||
AC_SUBST(BASE_DEPENDENCIES_LIBS)
|
AC_SUBST(BASE_DEPENDENCIES_LIBS)
|
||||||
|
|
||||||
|
@ -95,6 +103,7 @@ AM_CONDITIONAL(ENABLE_GNOME, test "x$enable_gnome" = "xyes")
|
||||||
AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes")
|
AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes")
|
||||||
AM_CONDITIONAL(ENABLE_GDA, test "x$enable_gda" = "xyes")
|
AM_CONDITIONAL(ENABLE_GDA, test "x$enable_gda" = "xyes")
|
||||||
AM_CONDITIONAL(ENABLE_GNOMEDB, test "x$enable_gnomedb" = "xyes")
|
AM_CONDITIONAL(ENABLE_GNOMEDB, test "x$enable_gnomedb" = "xyes")
|
||||||
|
AM_CONDITIONAL(ENABLE_RSVG, test "x$enable_rsvg" = "xyes")
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
|
|
||||||
|
@ -118,6 +127,7 @@ gconf/GConf/Makefile
|
||||||
gconf/GConf.PropertyEditors/Makefile
|
gconf/GConf.PropertyEditors/Makefile
|
||||||
gconf/tools/Makefile
|
gconf/tools/Makefile
|
||||||
gst/Makefile
|
gst/Makefile
|
||||||
|
rsvg/Makefile
|
||||||
sample/Makefile
|
sample/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
|
@ -132,6 +142,7 @@ echo " * gnome-sharp.dll: $enable_gnome"
|
||||||
echo " * glade-sharp.dll: $enable_glade"
|
echo " * glade-sharp.dll: $enable_glade"
|
||||||
echo " * gda-sharp.dll: $enable_gda"
|
echo " * gda-sharp.dll: $enable_gda"
|
||||||
echo " * gnomedb-sharp.dll: $enable_gnomedb"
|
echo " * gnomedb-sharp.dll: $enable_gnomedb"
|
||||||
|
echo " * rsvg-sharp.dll: $enable_rsvg "
|
||||||
echo ""
|
echo ""
|
||||||
echo " NOTE: if any of the above say 'no' you may install the"
|
echo " NOTE: if any of the above say 'no' you may install the"
|
||||||
echo " corresponding development packages for them, rerun"
|
echo " corresponding development packages for them, rerun"
|
||||||
|
|
2
makefile
2
makefile
|
@ -1,6 +1,6 @@
|
||||||
NATIVE_DIRS = glue parser
|
NATIVE_DIRS = glue parser
|
||||||
|
|
||||||
DIRS=generator api glib pango atk gdk gtk glade art gnome gda gnomedb gconf sample
|
DIRS=generator api glib pango atk gdk gtk glade art gnome gda gnomedb gconf rsvg sample
|
||||||
ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
|
ROOT=/cygdrive/$(subst \,/,$(subst :\,/,$(SYSTEMROOT)))
|
||||||
CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe
|
CSC=$(ROOT)/microsoft.net/framework/v1.0.3705/csc.exe
|
||||||
MCS=mcs
|
MCS=mcs
|
||||||
|
|
4
rsvg/.cvsignore
Executable file
4
rsvg/.cvsignore
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
*.dll
|
||||||
|
generated
|
||||||
|
Makefile
|
||||||
|
|
36
rsvg/Makefile.in
Normal file
36
rsvg/Makefile.in
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
COMPILER=mcs
|
||||||
|
OUTPUT=rsvg-sharp.dll
|
||||||
|
|
||||||
|
@ENABLE_RSVG_TRUE@ all: linux
|
||||||
|
@ENABLE_RSVG_FALSE@ all:
|
||||||
|
|
||||||
|
linux: $(OUTPUT)
|
||||||
|
|
||||||
|
$(OUTPUT): *.cs generated/*.cs
|
||||||
|
$(COMPILER) \
|
||||||
|
--unsafe\
|
||||||
|
--target library \
|
||||||
|
-L ../glib \
|
||||||
|
-L ../gdk \
|
||||||
|
-L ../gtk \
|
||||||
|
-L ../art \
|
||||||
|
-r glib-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll -r art-sharp.dll \
|
||||||
|
-o $(OUTPUT) \
|
||||||
|
--recurse '*.cs'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
clean: clean-dll clean-generated
|
||||||
|
|
||||||
|
clean-dll:
|
||||||
|
rm -f *.dll
|
||||||
|
|
||||||
|
clean-generated:
|
||||||
|
rm -rf generated
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
install: all
|
||||||
|
@ENABLE_RSVG_TRUE@ ../mkinstalldirs $(DESTDIR)@prefix@/lib && \
|
||||||
|
@ENABLE_RSVG_TRUE@ cp $(OUTPUT) $(DESTDIR)@prefix@/lib
|
||||||
|
|
145
rsvg/Tool.cs
Normal file
145
rsvg/Tool.cs
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
//
|
||||||
|
// rsvg/Tool.cs - Rsvg Tool class
|
||||||
|
//
|
||||||
|
// Author: Charles Iliya Krempeaux <charles@reptile.ca>
|
||||||
|
//
|
||||||
|
// Copyright (C) 2003 Reptile Consulting & Services Ltd.
|
||||||
|
// Copyright (C) 2003 Charles Iliya Krempeaux.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// O B J E C T S ////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace Rsvg {
|
||||||
|
|
||||||
|
class Tool
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// D L L I M P O R T S ////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
[System.Runtime.InteropServices.DllImport("rsvg-2")]
|
||||||
|
static extern System.IntPtr rsvg_pixbuf_from_file( string file_name
|
||||||
|
, out System.IntPtr error
|
||||||
|
);
|
||||||
|
|
||||||
|
[System.Runtime.InteropServices.DllImport("rsvg-2")]
|
||||||
|
static extern
|
||||||
|
System.IntPtr
|
||||||
|
rsvg_pixbuf_from_file_at_zoom( string file_name
|
||||||
|
, double x_zoom
|
||||||
|
, double y_zoom
|
||||||
|
, out System.IntPtr error
|
||||||
|
);
|
||||||
|
|
||||||
|
[System.Runtime.InteropServices.DllImport("rsvg-2")]
|
||||||
|
static extern
|
||||||
|
System.IntPtr
|
||||||
|
rsvg_pixbuf_from_file_at_size( string file_name
|
||||||
|
, int width
|
||||||
|
, int height
|
||||||
|
, out System.IntPtr error
|
||||||
|
);
|
||||||
|
|
||||||
|
[System.Runtime.InteropServices.DllImport("rsvg-2")]
|
||||||
|
static extern
|
||||||
|
System.IntPtr
|
||||||
|
rsvg_pixbuf_from_file_at_max_size( string file_name
|
||||||
|
, int max_width
|
||||||
|
, int max_height
|
||||||
|
, out System.IntPtr error
|
||||||
|
);
|
||||||
|
|
||||||
|
[System.Runtime.InteropServices.DllImport("rsvg-2")]
|
||||||
|
static extern
|
||||||
|
System.IntPtr
|
||||||
|
rsvg_pixbuf_from_file_at_zoom_with_max( string file_name
|
||||||
|
, double x_zoom
|
||||||
|
, double y_zoom
|
||||||
|
, int max_width
|
||||||
|
, int max_height
|
||||||
|
, out System.IntPtr error
|
||||||
|
);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////// D L L I M P O R T S //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// P R O C E D U R E S //////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
public static Gdk.Pixbuf PixbufFromFile(string file_name)
|
||||||
|
{
|
||||||
|
System.IntPtr error = System.IntPtr.Zero;
|
||||||
|
|
||||||
|
System.IntPtr raw_pixbuf = rsvg_pixbuf_from_file(file_name, out error);
|
||||||
|
|
||||||
|
if (System.IntPtr.Zero != error) {
|
||||||
|
throw new GLib.GException ( error );
|
||||||
|
} else {
|
||||||
|
return new Gdk.Pixbuf( raw_pixbuf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Gdk.Pixbuf PixbufFromFileAtZoom(string file_name, double x_zoom, double y_zoom)
|
||||||
|
{
|
||||||
|
System.IntPtr error = System.IntPtr.Zero;
|
||||||
|
|
||||||
|
System.IntPtr raw_pixbuf = rsvg_pixbuf_from_file_at_zoom(file_name, x_zoom, y_zoom, out error);
|
||||||
|
|
||||||
|
if (System.IntPtr.Zero != error) {
|
||||||
|
throw new GLib.GException( error );;
|
||||||
|
} else {
|
||||||
|
return new Gdk.Pixbuf( raw_pixbuf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Gdk.Pixbuf PixbufFromFileAtSize(string file_name, int width, int height)
|
||||||
|
{
|
||||||
|
System.IntPtr error = System.IntPtr.Zero;
|
||||||
|
|
||||||
|
System.IntPtr raw_pixbuf = rsvg_pixbuf_from_file_at_size(file_name, width, height, out error);
|
||||||
|
|
||||||
|
if (System.IntPtr.Zero != error) {
|
||||||
|
throw new GLib.GException( error );;
|
||||||
|
} else {
|
||||||
|
return new Gdk.Pixbuf( raw_pixbuf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Gdk.Pixbuf PixbufFromFileAtMaxSize(string file_name, int max_width, int max_height)
|
||||||
|
{
|
||||||
|
System.IntPtr error = System.IntPtr.Zero;
|
||||||
|
|
||||||
|
System.IntPtr raw_pixbuf = rsvg_pixbuf_from_file_at_max_size(file_name, max_width, max_height, out error);
|
||||||
|
|
||||||
|
if (System.IntPtr.Zero != error) {
|
||||||
|
throw new GLib.GException( error );;
|
||||||
|
} else {
|
||||||
|
return new Gdk.Pixbuf( raw_pixbuf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Gdk.Pixbuf PixbufFromFileAtZoomWithMaxSize(string file_name, double x_zoom, double y_zoom, int max_width, int max_height)
|
||||||
|
{
|
||||||
|
System.IntPtr error = System.IntPtr.Zero;
|
||||||
|
|
||||||
|
System.IntPtr raw_pixbuf = rsvg_pixbuf_from_file_at_zoom_with_max(file_name, x_zoom, y_zoom, max_width, max_height, out error);
|
||||||
|
|
||||||
|
if (System.IntPtr.Zero != error) {
|
||||||
|
throw new GLib.GException( error );;
|
||||||
|
} else {
|
||||||
|
return new Gdk.Pixbuf( raw_pixbuf );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////// P R O C E D U R E S //
|
||||||
|
|
||||||
|
|
||||||
|
} // class Tool
|
||||||
|
|
||||||
|
} // namespace Rsvg
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////// O B J E C T S //
|
||||||
|
|
||||||
|
|
|
@ -12,3 +12,4 @@ libart_lgpl-2.3.10 Art art_lgpl
|
||||||
libgda-0.10.0/libgda Gda gda-2
|
libgda-0.10.0/libgda Gda gda-2
|
||||||
libgnomedb-0.10.0/libgnomedb GnomeDb gnomedb-2
|
libgnomedb-0.10.0/libgnomedb GnomeDb gnomedb-2
|
||||||
gstreamer-0.4.2/gst Gst gstreamer
|
gstreamer-0.4.2/gst Gst gstreamer
|
||||||
|
librsvg-2.0.1 Rsvg rsvg-2
|
||||||
|
|
Loading…
Reference in a new issue