no more submodule

This commit is contained in:
2024-09-15 22:40:48 +02:00
parent df3b8a3135
commit 0234b33671
5804 changed files with 943618 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
//
// Mono.Cairo.Antialias.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Antialias
{
Default,
None,
Gray,
Subpixel,
}
}

View File

@@ -0,0 +1,53 @@
//
// Cairo.cs - a simplistic binding of the Cairo API to C#.
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// John Luke (john.luke@gmail.com)
// Alp Toker (alp@atoker.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
// Copyright (C) 2005 John Luke
// Copyright (C) 2006 Alp Toker
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
public static class CairoAPI {
static public int Version {
get {
return Cairo.NativeMethods.cairo_version ();
}
}
static public string VersionString {
get {
IntPtr x = Cairo.NativeMethods.cairo_version_string ();
return Marshal.PtrToStringAnsi (x);
}
}
}
}

View File

@@ -0,0 +1,82 @@
//
// CairoDebug.cs
//
// Author:
// Michael Hutchinson (mhutch@xamarin.com)
//
// Copyright (C) 2013 Xamarin Inc. (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
static class CairoDebug
{
static System.Collections.Generic.Dictionary<IntPtr,string> traces;
public static readonly bool Enabled;
static CairoDebug ()
{
var dbg = Environment.GetEnvironmentVariable ("MONO_CAIRO_DEBUG_DISPOSE");
if (dbg == null)
return;
Enabled = true;
traces = new System.Collections.Generic.Dictionary<IntPtr,string> ();
}
public static void OnAllocated (IntPtr obj)
{
if (!Enabled)
throw new InvalidOperationException ();
traces[obj] = Environment.StackTrace;
}
public static void OnDisposed<T> (IntPtr obj, bool disposing)
{
if (disposing && !Enabled)
throw new InvalidOperationException ();
if (Environment.HasShutdownStarted)
return;
if (!disposing) {
Console.Error.WriteLine ("{0} is leaking, programmer is missing a call to Dispose", typeof(T).FullName);
if (Enabled) {
string val;
if (traces.TryGetValue (obj, out val)) {
Console.Error.WriteLine ("Allocated from:");
Console.Error.WriteLine (val);
}
} else {
Console.Error.WriteLine ("Set MONO_CAIRO_DEBUG_DISPOSE to track allocation traces");
}
}
if (Enabled)
traces.Remove (obj);
}
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<api>
<namespace name="Cairo">
<enum cname="cairo_content_t" name="Content" type="enum" />
</namespace>
<symbol type="ownable" cname="cairo_t" name="Cairo.Context"/>
<symbol type="manual" cname="cairo_font_options_t" name="Cairo.FontOptions"/>
<symbol type="manual" cname="cairo_region_t" name="Cairo.Region"/>
<symbol type="marshal" cname="cairo_pattern_t" name="Cairo.Pattern" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Pattern.Lookup ({0})" />
<symbol type="marshal" cname="cairo_surface_t" name="Cairo.Surface" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Surface.Lookup ({0}, true)" />
</api>

View File

@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>CairoSharp is a C# wrapper for the Cairo library.</Description>
<PackageTags>cairo;cairosharp;cairo-sharp;wrapper</PackageTags>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Shared\*.cs">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,75 @@
//
// Mono.Cairo.Context.cs
//
// Author:
// Duncan Mak (duncan@ximian.com)
// Miguel de Icaza (miguel@novell.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// Alp Toker (alp@atoker.com)
//
// (C) Ximian Inc, 2003.
// (C) Novell Inc, 2003.
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Cairo {
public struct Color
{
public Color(double r, double g, double b) : this (r, g, b, 1.0)
{
}
public Color(double r, double g, double b, double a)
{
this.r = r;
this.g = g;
this.b = b;
this.a = a;
}
double r, g, b, a;
public double R {
get { return r; }
set { r = value; }
}
public double G {
get { return g; }
set { g = value; }
}
public double B {
get { return b; }
set { b = value; }
}
public double A {
get { return a; }
set { a = value; }
}
}
}

View File

@@ -0,0 +1,43 @@
//
// Mono.Cairo.Content.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
//[Flags]
[Serializable]
public enum Content
{
Color = 0x1000,
Alpha = 0x2000,
ColorAlpha = 0x3000,
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,104 @@
// Copyright (c) 2011 Novell, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
public enum DeviceType {
Drm,
GL,
Script,
Xcb,
Xlib,
Xml,
}
public class Device : IDisposable
{
IntPtr handle;
internal Device (IntPtr handle)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = NativeMethods.cairo_device_reference (handle);
}
public Status Acquire ()
{
CheckDisposed ();
return NativeMethods.cairo_device_acquire (handle);
}
public void Dispose ()
{
if (handle != IntPtr.Zero)
NativeMethods.cairo_device_destroy (handle);
handle = IntPtr.Zero;
GC.SuppressFinalize (this);
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
public void Finish ()
{
CheckDisposed ();
NativeMethods.cairo_device_finish (handle);
}
public void Flush ()
{
CheckDisposed ();
NativeMethods.cairo_device_flush (handle);
}
public void Release ()
{
CheckDisposed ();
NativeMethods.cairo_device_release (handle);
}
public Status Status {
get {
CheckDisposed ();
return NativeMethods.cairo_device_status (handle);
}
}
public DeviceType Type {
get {
CheckDisposed ();
return NativeMethods.cairo_device_get_type (handle);
}
}
}
}

View File

@@ -0,0 +1,43 @@
//
// Mono.Cairo.DirectFBSurface.cs
//
// Authors:
// Alp Toker
//
// (C) Alp Toker, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class DirectFBSurface : Surface
{
internal DirectFBSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public DirectFBSurface (IntPtr dfb, IntPtr dfb_surface)
: base (NativeMethods.cairo_directfb_surface_create (dfb, dfb_surface), true)
{
}
}
}

View File

@@ -0,0 +1,58 @@
//
// Mono.Cairo.Context.cs
//
// Author:
// Duncan Mak (duncan@ximian.com)
// Miguel de Icaza (miguel@novell.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// Alp Toker (alp@atoker.com)
//
// (C) Ximian Inc, 2003.
// (C) Novell Inc, 2003.
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Cairo {
public struct Distance
{
public Distance (double dx, double dy)
{
this.dx = dx;
this.dy = dy;
}
double dx, dy;
public double Dx {
get { return dx; }
set { dx = value; }
}
public double Dy {
get { return dy; }
set { dy = value; }
}
}
}

View File

@@ -0,0 +1,45 @@
//
// Mono.Cairo.Extend.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// John Luke (john.luke@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
// Copyright (C) 2005 John Luke
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Extend
{
None,
Repeat,
Reflect,
Pad,
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.FillRule.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum FillRule
{
Winding,
EvenOdd
}
}

View File

@@ -0,0 +1,45 @@
//
// Mono.Cairo.Filter.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Filter
{
Fast,
Good,
Best,
Nearest,
Bilinear,
Gaussian,
}
}

View File

@@ -0,0 +1,104 @@
//
// Mono.Cairo.FontExtents.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
//
// This is a simplistic binding of the Cairo API to C#. All functions
// in cairo.h are transcribed into their C# equivelants
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
[StructLayout (LayoutKind.Sequential)]
public struct FontExtents
{
double ascent;
double descent;
double height;
double maxXAdvance;
double maxYAdvance;
public double Ascent {
get { return ascent; }
set { ascent = value; }
}
public double Descent {
get { return descent; }
set { descent = value; }
}
public double Height {
get { return height; }
set { height = value; }
}
public double MaxXAdvance {
get { return maxXAdvance; }
set { maxXAdvance = value; }
}
public double MaxYAdvance {
get { return maxYAdvance; }
set { maxYAdvance = value; }
}
public FontExtents (double ascent, double descent, double height, double maxXAdvance, double maxYAdvance)
{
this.ascent = ascent;
this.descent = descent;
this.height = height;
this.maxXAdvance = maxXAdvance;
this.maxYAdvance = maxYAdvance;
}
public override bool Equals (object obj)
{
if (obj is FontExtents)
return this == (FontExtents) obj;
return false;
}
public override int GetHashCode ()
{
return (int) Ascent ^ (int) Descent ^ (int) Height ^ (int) MaxXAdvance ^ (int) MaxYAdvance;
}
public static bool operator == (FontExtents extents, FontExtents other)
{
return extents.Ascent == other.Ascent && extents.Descent == other.Descent && extents.Height == other.Height && extents.MaxXAdvance == other.MaxXAdvance && extents.MaxYAdvance == other.MaxYAdvance;
}
public static bool operator != (FontExtents extents, FontExtents other)
{
return !(extents == other);
}
}
}

View File

@@ -0,0 +1,122 @@
//
// Mono.Cairo.FontFace.cs
//
// Author:
// Alp Toker (alp@atoker.com)
// Miguel de Icaza (miguel@novell.com)
//
// (C) Ximian Inc, 2003.
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright (C) 2004, 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
public class FontFace : IDisposable
{
IntPtr handle;
internal static FontFace Lookup (IntPtr handle, bool owner)
{
if (handle == IntPtr.Zero)
return null;
return new FontFace (handle, owner);
}
~FontFace ()
{
Dispose (false);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<FontFace> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_font_face_destroy (handle);
handle = IntPtr.Zero;
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
[Obsolete]
public FontFace (IntPtr handle) : this (handle, true)
{
}
public FontFace (IntPtr handle, bool owned)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (!owned)
NativeMethods.cairo_font_face_reference (handle);
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
public IntPtr Handle {
get {
return handle;
}
}
public Status Status {
get {
CheckDisposed ();
return NativeMethods.cairo_font_face_status (handle);
}
}
public FontType FontType {
get {
CheckDisposed ();
return NativeMethods.cairo_font_face_get_type (handle);
}
}
public uint ReferenceCount {
get {
CheckDisposed ();
return NativeMethods.cairo_font_face_get_reference_count (handle);
}
}
}
}

View File

@@ -0,0 +1,181 @@
//
// Mono.Cairo.FontOptions.cs
//
// Author:
// John Luke (john.luke@gmail.com)
//
// (C) John Luke 2005.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
public class FontOptions : IDisposable
{
IntPtr handle;
public FontOptions () : this (NativeMethods.cairo_font_options_create ())
{
}
~FontOptions ()
{
Dispose (false);
}
public FontOptions (IntPtr handle)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
public FontOptions Copy ()
{
CheckDisposed ();
return new FontOptions (NativeMethods.cairo_font_options_copy (handle));
}
[Obsolete ("Use Dispose()")]
public void Destroy ()
{
Dispose ();
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<FontOptions> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_font_options_destroy (handle);
handle = IntPtr.Zero;
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
public static bool operator == (FontOptions options, FontOptions other)
{
return Equals (options, other);
}
public static bool operator != (FontOptions options, FontOptions other)
{
return !(options == other);
}
public override bool Equals (object other)
{
return Equals (other as FontOptions);
}
bool Equals (FontOptions options)
{
return options != null && NativeMethods.cairo_font_options_equal (Handle, options.Handle);
}
public IntPtr Handle {
get { return handle; }
}
public override int GetHashCode ()
{
return (int) NativeMethods.cairo_font_options_hash (handle);
}
public void Merge (FontOptions other)
{
if (other == null)
throw new ArgumentNullException ("other");
CheckDisposed ();
NativeMethods.cairo_font_options_merge (handle, other.Handle);
}
public Antialias Antialias {
get {
CheckDisposed ();
return NativeMethods.cairo_font_options_get_antialias (handle);
}
set {
CheckDisposed ();
NativeMethods.cairo_font_options_set_antialias (handle, value);
}
}
public HintMetrics HintMetrics {
get {
CheckDisposed ();
return NativeMethods.cairo_font_options_get_hint_metrics (handle);
}
set {
CheckDisposed ();
NativeMethods.cairo_font_options_set_hint_metrics (handle, value);
}
}
public HintStyle HintStyle {
get {
CheckDisposed ();
return NativeMethods.cairo_font_options_get_hint_style (handle);
}
set {
CheckDisposed ();
NativeMethods.cairo_font_options_set_hint_style (handle, value);
}
}
public Status Status {
get {
CheckDisposed ();
return NativeMethods.cairo_font_options_status (handle);
}
}
public SubpixelOrder SubpixelOrder {
get {
CheckDisposed ();
return NativeMethods.cairo_font_options_get_subpixel_order (handle);
}
set {
CheckDisposed ();
NativeMethods.cairo_font_options_set_subpixel_order (handle, value);
}
}
}
}

View File

@@ -0,0 +1,42 @@
//
// Mono.Cairo.FontSlant.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum FontSlant
{
Normal,
Italic,
Oblique
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.FontType.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
[Serializable]
public enum FontType
{
Toy,
FreeType,
Win32,
Atsui,
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.FontWeight.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum FontWeight
{
Normal,
Bold,
}
}

View File

@@ -0,0 +1,48 @@
//
// Mono.Cairo.Format.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Format
{
Argb32 = 0,
Rgb24 = 1,
A8 = 2,
A1 = 3,
Rgb16565 = 4,
//[Obsolete ("Use Argb32")]
ARGB32 = Argb32,
//[Obsolete ("Use Rgb24")]
RGB24 = Rgb24,
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<api>
<namespace name="Cairo">
<enum cname="cairo_content_t" name="Content" type="enum" />
</namespace>
<symbol type="ownable" cname="cairo_t" name="Cairo.Context"/>
<symbol type="manual" cname="cairo_font_options_t" name="Cairo.FontOptions"/>
<symbol type="manual" cname="cairo_region_t" name="Cairo.Region"/>
<symbol type="marshal" cname="cairo_pattern_t" name="Cairo.Pattern" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Pattern.Lookup ({0})" />
<symbol type="marshal" cname="cairo_surface_t" name="Cairo.Surface" marshal_type="IntPtr" call_fmt="{0}.Handle" from_fmt="Cairo.Surface.Lookup ({0}, true)" />
</api>

View File

@@ -0,0 +1,43 @@
//
// Mono.Cairo.GlitzSurface.cs
//
// Authors:
// Alp Toker
//
// (C) Alp Toker, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class GlitzSurface : Surface
{
internal GlitzSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public GlitzSurface (IntPtr glitz_surface)
: base (NativeMethods.cairo_glitz_surface_create (glitz_surface), true)
{
}
}
}

View File

@@ -0,0 +1,11 @@
namespace Cairo
{
public partial class Global
{
public static bool IsSupported => GLibrary.IsSupported(Library.Cairo);
}
}

View File

@@ -0,0 +1,96 @@
//
// Mono.Cairo.Glyph.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
[StructLayout(LayoutKind.Sequential)]
public struct Glyph
{
internal long index;
internal double x;
internal double y;
public Glyph (long index, double x, double y)
{
this.index = index;
this.x = x;
this.y = y;
}
public long Index {
get { return index; }
set { index = value; }
}
public double X {
get { return x; }
set { x = value; }
}
public double Y {
get { return y; }
set { y = value; }
}
public override bool Equals (object obj)
{
if (obj is Glyph)
return this == (Glyph)obj;
return false;
}
public override int GetHashCode ()
{
return (int) Index ^ (int) X ^ (int) Y;
}
internal static IntPtr GlyphsToIntPtr (Glyph[] glyphs)
{
int size = Marshal.SizeOf<Glyph> ();
IntPtr dest = Marshal.AllocHGlobal (size * glyphs.Length);
long pos = dest.ToInt64 ();
for (int i = 0; i < glyphs.Length; i++, pos += size)
Marshal.StructureToPtr (glyphs[i], (IntPtr) pos, false);
return dest;
}
public static bool operator == (Glyph glyph, Glyph other)
{
return glyph.Index == other.Index && glyph.X == other.X && glyph.Y == other.Y;
}
public static bool operator != (Glyph glyph, Glyph other)
{
return !(glyph == other);
}
}
}

View File

@@ -0,0 +1,69 @@
//
// Mono.Cairo.Gradient.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class Gradient : Pattern
{
protected Gradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
[Obsolete]
protected Gradient ()
{
}
public int ColorStopCount {
get {
CheckDisposed ();
int cnt;
NativeMethods.cairo_pattern_get_color_stop_count (Handle, out cnt);
return cnt;
}
}
public Status AddColorStop (double offset, Color c)
{
CheckDisposed ();
NativeMethods.cairo_pattern_add_color_stop_rgba (Handle, offset, c.R, c.G, c.B, c.A);
return Status;
}
public Status AddColorStopRgb (double offset, Color c)
{
CheckDisposed ();
NativeMethods.cairo_pattern_add_color_stop_rgb (Handle, offset, c.R, c.G, c.B);
return Status;
}
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.HintMetrics.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum HintMetrics
{
Default,
Off,
On,
}
}

View File

@@ -0,0 +1,43 @@
//
// Mono.Cairo.HintStyle.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum HintStyle
{
Default,
None,
Slight,
Medium,
Full,
}
}

View File

@@ -0,0 +1,116 @@
//
// Mono.Cairo.ImageSurface.cs
//
// Authors:
// Duncan Mak
// Miguel de Icaza.
//
// (C) Ximian Inc, 2003.
// (C) Novell, Inc. 2003.
//
// This is an OO wrapper API for the Cairo API
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo {
public class ImageSurface : Surface
{
internal ImageSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public ImageSurface (Format format, int width, int height)
: base (NativeMethods.cairo_image_surface_create (format, width, height), true)
{
}
[Obsolete ("Use ImageSurface (byte[] data, Cairo.Format format, int width, int height, int stride)")]
public ImageSurface (ref byte[] data, Cairo.Format format, int width, int height, int stride)
: this (data, format, width, height, stride)
{
}
public ImageSurface (byte[] data, Format format, int width, int height, int stride)
: base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true)
{
}
public ImageSurface (IntPtr data, Format format, int width, int height, int stride)
: base (NativeMethods.cairo_image_surface_create_for_data2 (data, format, width, height, stride), true)
{
}
public ImageSurface (string filename)
: base (NativeMethods.cairo_image_surface_create_from_png (filename), true)
{
}
public int Width {
get {
CheckDisposed ();
return NativeMethods.cairo_image_surface_get_width (Handle); }
}
public int Height {
get {
CheckDisposed ();
return NativeMethods.cairo_image_surface_get_height (Handle);
}
}
public byte[] Data {
get {
IntPtr ptr = NativeMethods.cairo_image_surface_get_data (Handle);
int length = Height * Stride;
byte[] data = new byte[length];
Marshal.Copy (ptr, data, 0, length);
return data;
}
}
public IntPtr DataPtr {
get {
CheckDisposed ();
return NativeMethods.cairo_image_surface_get_data (Handle);
}
}
public Format Format {
get {
CheckDisposed ();
return NativeMethods.cairo_image_surface_get_format (Handle);
}
}
public int Stride {
get {
CheckDisposed ();
return NativeMethods.cairo_image_surface_get_stride (Handle);
}
}
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.LineCap.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum LineCap
{
Butt,
Round,
Square,
}
}

View File

@@ -0,0 +1,42 @@
//
// Mono.Cairo.LineJoin.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum LineJoin
{
Miter,
Round,
Bevel
}
}

View File

@@ -0,0 +1,60 @@
//
// Mono.Cairo.LinearGradient.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class LinearGradient : Gradient
{
internal LinearGradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
public LinearGradient (double x0, double y0, double x1, double y1)
: base (NativeMethods.cairo_pattern_create_linear (x0, y0, x1, y1), true)
{
}
public PointD[] LinearPoints {
get {
CheckDisposed ();
double x0, y0, x1, y1;
PointD[] points = new PointD [2];
NativeMethods.cairo_pattern_get_linear_points (Handle, out x0, out y0, out x1, out y1);
points[0] = new PointD (x0, y0);
points[1] = new PointD (x1, y1);
return points;
}
}
}
}

View File

@@ -0,0 +1,193 @@
//
// Mono.Cairo.Matrix.cs
//
// Author: Duncan Mak
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// Idan Gazit (idan@fastmail.fm)
//
// (C) Ximian Inc, 2003 - 2005.
//
// This is an OO wrapper API for the Cairo API
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo {
[StructLayout(LayoutKind.Sequential)]
public class Matrix : ICloneable
{
public double Xx;
public double Yx;
public double Xy;
public double Yy;
public double X0;
public double Y0;
public Matrix (double xx, double yx, double xy, double yy,
double x0, double y0)
{
this.Xx = xx; this.Yx = yx; this.Xy = xy;
this.Yy = yy; this.X0 = x0; this.Y0 = y0;
}
public Matrix ()
{
this.InitIdentity ();
}
public bool IsIdentity ()
{
return (this == new Matrix ());
}
public void InitIdentity ()
{
// this.Init(1,0,0,1,0,0);
NativeMethods.cairo_matrix_init_identity (this);
}
public void Init (double xx, double yx, double xy, double yy,
double x0, double y0)
{
this.Xx = xx; this.Yx = yx; this.Xy = xy;
this.Yy = yy; this.X0 = x0; this.Y0 = y0;
}
public void InitTranslate (double tx, double ty)
{
//this.Init (1, 0, 0, 1, tx, ty);
NativeMethods.cairo_matrix_init_translate (this, tx, ty);
}
public void Translate (double tx, double ty)
{
NativeMethods.cairo_matrix_translate (this, tx, ty);
}
public void InitScale (double sx, double sy)
{
//this.Init (sx, 0, 0, sy, 0, 0);
NativeMethods.cairo_matrix_init_scale (this, sx, sy);
}
public void Scale (double sx, double sy)
{
NativeMethods.cairo_matrix_scale (this, sx, sy);
}
public void InitRotate (double radians)
{
/*
double s, c;
s = Math.Sin (radians);
c = Math.Cos (radians);
this.Init (c, s, -s, c, 0, 0);
*/
NativeMethods.cairo_matrix_init_rotate (this, radians);
}
public void Rotate (double radians)
{
NativeMethods.cairo_matrix_rotate (this, radians);
}
public Cairo.Status Invert ()
{
return NativeMethods.cairo_matrix_invert (this);
}
public void Multiply (Matrix b)
{
Matrix a = (Matrix) this.Clone ();
NativeMethods.cairo_matrix_multiply (this, a, b);
}
public static Matrix Multiply (Matrix a, Matrix b) {
Matrix result = new Matrix ();
NativeMethods.cairo_matrix_multiply (result, a, b);
return result;
}
public void TransformDistance (ref double dx, ref double dy)
{
NativeMethods.cairo_matrix_transform_distance (this, ref dx, ref dy);
}
public void TransformPoint (ref double x, ref double y)
{
NativeMethods.cairo_matrix_transform_point (this, ref x, ref y);
}
public override String ToString ()
{
String s = String.Format ("xx:{0:##0.0#} yx:{1:##0.0#} xy:{2:##0.0#} yy:{3:##0.0#} x0:{4:##0.0#} y0:{5:##0.0#}",
this.Xx, this.Yx, this.Xy, this.Yy, this.X0, this.Y0);
return s;
}
public static bool operator == (Matrix lhs, Matrix rhs)
{
return (lhs.Xx == rhs.Xx &&
lhs.Xy == rhs.Xy &&
lhs.Yx == rhs.Yx &&
lhs.Yy == rhs.Yy &&
lhs.X0 == rhs.X0 &&
lhs.Y0 == rhs.Y0 );
}
public static bool operator != (Matrix lhs, Matrix rhs)
{
return !(lhs==rhs);
}
public override bool Equals(object o)
{
if (! (o is Matrix))
return false;
else
return (this == (Matrix) o);
}
public override int GetHashCode()
{
return (int)this.Xx ^ (int)this.Xx>>32 ^
(int)this.Xy ^ (int)this.Xy>>32 ^
(int)this.Yx ^ (int)this.Yx>>32 ^
(int)this.Yy ^ (int)this.Yy>>32 ^
(int)this.X0 ^ (int)this.X0>>32 ^
(int)this.Y0 ^ (int)this.Y0>>32;
}
public object Clone()
{
return this.MemberwiseClone ();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
//
// Mono.Cairo.Operator.cs
//
// Authors: Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// John Luke (john.luke@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
// Copyright (C) 2005 John Luke
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Operator
{
Clear,
Source,
Over,
In,
Out,
Atop,
Dest,
DestOver,
DestIn,
DestOut,
DestAtop,
Xor,
Add,
Saturate,
}
}

View File

@@ -0,0 +1,68 @@
//
// Mono.Cairo.PostscriptSurface.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class PSSurface : Surface
{
internal PSSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public PSSurface (string filename, double width, double height)
: base (NativeMethods.cairo_ps_surface_create (filename, width, height), true)
{
}
public void BeginPageSetup ()
{
CheckDisposed ();
NativeMethods.cairo_ps_surface_dsc_begin_page_setup (Handle);
}
public void BeginSetup ()
{
CheckDisposed ();
NativeMethods.cairo_ps_surface_dsc_begin_setup (Handle);
}
public void DscComment (string comment)
{
CheckDisposed ();
NativeMethods.cairo_ps_surface_dsc_comment (Handle, comment);
}
public void SetSize (double width, double height)
{
CheckDisposed ();
NativeMethods.cairo_ps_surface_set_size (Handle, width, height);
}
}
}

View File

@@ -0,0 +1,138 @@
//
// Mono.Cairo.Context.cs
//
// Author:
// Miguel de Icaza (miguel@novell.com)
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
using Cairo;
namespace Cairo {
public class Path : IDisposable
{
[StructLayout(LayoutKind.Sequential)]
struct PathStruct
{
public Status Status;
public IntPtr Data;
public int NumData;
}
IntPtr handle = IntPtr.Zero;
Status status;
PathData[] data;
internal Path (IntPtr handle)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
~Path ()
{
Dispose (false);
}
public IntPtr Handle { get { return handle; } }
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<Path> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_path_destroy (handle);
handle = IntPtr.Zero;
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
void MarshalData ()
{
if (data == null)
{
var rawStruct = Marshal.PtrToStructure<PathStruct>(handle);
status = rawStruct.Status;
data = new PathData[rawStruct.NumData];
int oneDataSize = Marshal.SizeOf<PathData>();
for (int i = 0; i < rawStruct.NumData; i++)
{
IntPtr iPtr = new IntPtr(rawStruct.Data.ToInt64() + i * oneDataSize);
data[i] = Marshal.PtrToStructure<PathData>(iPtr);
}
}
}
public Status Status
{
get
{
CheckDisposed ();
MarshalData ();
return status;
}
}
public int NumData
{
get
{
CheckDisposed ();
MarshalData ();
return data.Length;
}
}
public PathData[] Data
{
get
{
CheckDisposed ();
MarshalData ();
return data;
}
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
[StructLayout(LayoutKind.Explicit)]
public struct PathData
{
[FieldOffset(0)]
public PathDataHeader Header;
[FieldOffset(0)]
public PathDataPoint Point;
}
[StructLayout(LayoutKind.Sequential)]
public struct PathDataHeader
{
public PathDataType Type;
public int Length;
}
[StructLayout(LayoutKind.Sequential)]
public struct PathDataPoint
{
public double X;
public double Y;
}
}

View File

@@ -0,0 +1,13 @@
using System;
namespace Cairo
{
[Serializable]
public enum PathDataType
{
MoveTo,
LineTo,
CurveTo,
ClosePath
}
}

View File

@@ -0,0 +1,179 @@
//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
namespace Cairo {
public class Pattern : IDisposable
{
[Obsolete]
protected IntPtr pattern = IntPtr.Zero;
public static Pattern Lookup (IntPtr pattern, bool owner)
{
if (pattern == IntPtr.Zero)
return null;
PatternType pt = NativeMethods.cairo_pattern_get_type (pattern);
switch (pt) {
case PatternType.Solid:
return new SolidPattern (pattern, owner);
case PatternType.Surface:
return new SurfacePattern (pattern, owner);
case PatternType.Linear:
return new LinearGradient (pattern, owner);
case PatternType.Radial:
return new RadialGradient (pattern, owner);
default:
return new Pattern (pattern, owner);
}
}
[Obsolete]
protected Pattern ()
{
}
internal Pattern (IntPtr handle, bool owned)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
Handle = handle;
if (!owned)
NativeMethods.cairo_pattern_reference (handle);
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
~Pattern ()
{
Dispose (false);
}
[Obsolete ("Use the SurfacePattern constructor")]
public Pattern (Surface surface)
: this ( NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
{
}
[Obsolete]
protected void Reference ()
{
CheckDisposed ();
NativeMethods.cairo_pattern_reference (pattern);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<Pattern> (Handle, disposing);
if (Handle == IntPtr.Zero)
return;
NativeMethods.cairo_pattern_destroy (Handle);
Handle = IntPtr.Zero;
}
protected void CheckDisposed ()
{
if (Handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
[Obsolete ("Use Dispose()")]
public void Destroy ()
{
Dispose ();
}
public Status Status
{
get {
CheckDisposed ();
return NativeMethods.cairo_pattern_status (Handle);
}
}
public Extend Extend
{
get {
CheckDisposed ();
return NativeMethods.cairo_pattern_get_extend (Handle);
}
set {
CheckDisposed ();
NativeMethods.cairo_pattern_set_extend (Handle, value);
}
}
public Matrix Matrix {
set {
CheckDisposed ();
NativeMethods.cairo_pattern_set_matrix (Handle, value);
}
get {
CheckDisposed ();
Matrix m = new Matrix ();
NativeMethods.cairo_pattern_get_matrix (Handle, m);
return m;
}
}
#pragma warning disable 612
public IntPtr Handle {
get { return pattern; }
private set { pattern = value; }
}
#pragma warning restore 612
[Obsolete]
public IntPtr Pointer {
get { return pattern; }
}
public PatternType PatternType {
get {
CheckDisposed ();
return NativeMethods.cairo_pattern_get_type (Handle);
}
}
}
}

View File

@@ -0,0 +1,42 @@
//
// Mono.Cairo.PatternType.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
[Serializable]
public enum PatternType
{
Solid,
Surface,
Linear,
Radial,
}
}

View File

@@ -0,0 +1,51 @@
//
// Mono.Cairo.PdfSurface.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class PdfSurface : Surface
{
internal PdfSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public PdfSurface (string filename, double width, double height)
: base (NativeMethods.cairo_pdf_surface_create (filename, width, height), true)
{
}
public void SetSize (double width, double height)
{
CheckDisposed ();
NativeMethods.cairo_pdf_surface_set_size (Handle, width, height);
}
}
}

View File

@@ -0,0 +1,57 @@
//
// Mono.Cairo.Context.cs
//
// Author:
// Duncan Mak (duncan@ximian.com)
// Miguel de Icaza (miguel@novell.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// Alp Toker (alp@atoker.com)
//
// (C) Ximian Inc, 2003.
// (C) Novell Inc, 2003.
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Cairo {
public struct Point
{
public Point (int x, int y)
{
this.x = x;
this.y = y;
}
int x, y;
public int X {
get { return x; }
set { x = value; }
}
public int Y {
get { return y; }
set { y = value; }
}
}
}

View File

@@ -0,0 +1,58 @@
//
// Mono.Cairo.Context.cs
//
// Author:
// Duncan Mak (duncan@ximian.com)
// Miguel de Icaza (miguel@novell.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// Alp Toker (alp@atoker.com)
//
// (C) Ximian Inc, 2003.
// (C) Novell Inc, 2003.
//
// This is an OO wrapper API for the Cairo API.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace Cairo {
public struct PointD
{
public PointD (double x, double y)
{
this.x = x;
this.y = y;
}
double x, y;
public double X {
get { return x; }
set { x = value; }
}
public double Y {
get { return y; }
set { y = value; }
}
}
}

View File

@@ -0,0 +1,46 @@
//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class RadialGradient : Gradient
{
internal RadialGradient (IntPtr handle, bool owned) : base (handle, owned)
{
}
public RadialGradient (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1)
: base (NativeMethods.cairo_pattern_create_radial (cx0, cy0, radius0, cx1, cy1, radius1), true)
{
}
}
}

View File

@@ -0,0 +1,99 @@
//
// Mono.Cairo.Rectangle.cs
//
// Author:
// John Luke (john.luke@gmail.com)
//
// (C) John Luke 2005.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
public struct Rectangle
{
double x;
double y;
double width;
double height;
public Rectangle (double x, double y, double width, double height)
{
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
public Rectangle (Point point, double width, double height)
{
x = point.X;
y = point.Y;
this.width = width;
this.height = height;
}
public double X {
get { return x; }
}
public double Y {
get { return y; }
}
public double Width {
get { return width; }
}
public double Height {
get { return height; }
}
public override bool Equals (object obj)
{
if (obj is Rectangle)
return this == (Rectangle)obj;
return false;
}
public override int GetHashCode ()
{
return (int) (x + y + width + height);
}
public override string ToString ()
{
return String.Format ("x:{0} y:{1} w:{2} h:{3}", x, y, width, height);
}
public static bool operator == (Rectangle rectangle, Rectangle other)
{
return rectangle.X == other.X && rectangle.Y == other.Y && rectangle.Width == other.Width && rectangle.Height == other.Height;
}
public static bool operator != (Rectangle rectangle, Rectangle other)
{
return !(rectangle == other);
}
}
}

View File

@@ -0,0 +1,227 @@
// Copyright (C) 2011 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
[StructLayout(LayoutKind.Sequential)]
public struct RectangleInt {
public int X;
public int Y;
public int Width;
public int Height;
}
public enum RegionOverlap {
In,
Out,
Part,
}
public class Region : IDisposable {
IntPtr handle;
public IntPtr Handle {
get { return handle; }
}
[Obsolete]
public Region (IntPtr handle) : this (handle, false) {}
public Region (IntPtr handle, bool owned)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (!owned)
NativeMethods.cairo_region_reference (handle);
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
public Region () : this (NativeMethods.cairo_region_create () , true)
{
}
public Region (RectangleInt rect)
{
handle = NativeMethods.cairo_region_create_rectangle (ref rect);
}
public Region (RectangleInt[] rects)
{
handle = NativeMethods.cairo_region_create_rectangles (rects, rects.Length);
}
public Region Copy ()
{
CheckDisposed ();
return new Region (NativeMethods.cairo_region_copy (Handle), true);
}
~Region ()
{
Dispose (false);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<Region> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_region_destroy (Handle);
handle = IntPtr.Zero;
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
public override bool Equals (object obj)
{
return (obj is Region) && NativeMethods.cairo_region_equal (Handle, (obj as Region).Handle);
}
public override int GetHashCode ()
{
return Handle.GetHashCode ();
}
public Status Status {
get {
CheckDisposed ();
return NativeMethods.cairo_region_status (Handle); }
}
public RectangleInt Extents {
get {
CheckDisposed ();
RectangleInt result;
NativeMethods.cairo_region_get_extents (Handle, out result);
return result;
}
}
public int NumRectangles {
get {
CheckDisposed ();
return NativeMethods.cairo_region_num_rectangles (Handle);
}
}
public RectangleInt GetRectangle (int nth)
{
CheckDisposed ();
RectangleInt val;
NativeMethods.cairo_region_get_rectangle (Handle, nth, out val);
return val;
}
public bool IsEmpty {
get {
CheckDisposed ();
return NativeMethods.cairo_region_is_empty (Handle);
}
}
public RegionOverlap ContainsPoint (RectangleInt rectangle)
{
CheckDisposed ();
return NativeMethods.cairo_region_contains_rectangle (Handle, ref rectangle);
}
public bool ContainsPoint (int x, int y)
{
CheckDisposed ();
return NativeMethods.cairo_region_contains_point (Handle, x, y);
}
public void Translate (int dx, int dy)
{
CheckDisposed ();
NativeMethods.cairo_region_translate (Handle, dx, dy);
}
public Status Subtract (Region other)
{
CheckDisposed ();
return NativeMethods.cairo_region_subtract (Handle, other.Handle);
}
public Status SubtractRectangle (RectangleInt rectangle)
{
CheckDisposed ();
return NativeMethods.cairo_region_subtract_rectangle (Handle, ref rectangle);
}
public Status Intersect (Region other)
{
CheckDisposed ();
return NativeMethods.cairo_region_intersect (Handle, other.Handle);
}
public Status IntersectRectangle (RectangleInt rectangle)
{
CheckDisposed ();
return NativeMethods.cairo_region_intersect_rectangle (Handle, ref rectangle);
}
public Status Union (Region other)
{
CheckDisposed ();
return NativeMethods.cairo_region_union (Handle, other.Handle);
}
public Status UnionRectangle (RectangleInt rectangle)
{
CheckDisposed ();
return NativeMethods.cairo_region_union_rectangle (Handle, ref rectangle);
}
public Status Xor (Region other)
{
CheckDisposed ();
return NativeMethods.cairo_region_xor (Handle, other.Handle);
}
public Status XorRectangle (RectangleInt rectangle)
{
CheckDisposed ();
return NativeMethods.cairo_region_xor_rectangle (Handle, ref rectangle);
}
}
}

View File

@@ -0,0 +1,140 @@
//
// Mono.Cairo.ScaledFont.cs
//
// (c) 2008 Jordi Mas i Hernandez (jordimash@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo {
public class ScaledFont : IDisposable
{
protected IntPtr handle = IntPtr.Zero;
internal ScaledFont (IntPtr handle, bool owner)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (!owner)
NativeMethods.cairo_scaled_font_reference (handle);
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
public ScaledFont (FontFace fontFace, Matrix matrix, Matrix ctm, FontOptions options)
: this (NativeMethods.cairo_scaled_font_create (fontFace.Handle, matrix, ctm, options.Handle), true)
{
}
~ScaledFont ()
{
Dispose (false);
}
public IntPtr Handle {
get {
return handle;
}
}
public FontExtents FontExtents {
get {
CheckDisposed ();
FontExtents extents;
NativeMethods.cairo_scaled_font_extents (handle, out extents);
return extents;
}
}
public Matrix FontMatrix {
get {
CheckDisposed ();
Matrix m;
NativeMethods.cairo_scaled_font_get_font_matrix (handle, out m);
return m;
}
}
public FontType FontType {
get {
CheckDisposed ();
return NativeMethods.cairo_scaled_font_get_type (handle);
}
}
public TextExtents GlyphExtents (Glyph[] glyphs)
{
CheckDisposed ();
IntPtr ptr = Context.FromGlyphToUnManagedMemory (glyphs);
TextExtents extents;
NativeMethods.cairo_scaled_font_glyph_extents (handle, ptr, glyphs.Length, out extents);
Marshal.FreeHGlobal (ptr);
return extents;
}
public Status Status
{
get {
CheckDisposed ();
return NativeMethods.cairo_scaled_font_status (handle);
}
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<ScaledFont> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_scaled_font_destroy (handle);
handle = IntPtr.Zero;
}
void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
[Obsolete]
protected void Reference ()
{
CheckDisposed ();
NativeMethods.cairo_scaled_font_reference (handle);
}
}
}

View File

@@ -0,0 +1,73 @@
//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class SolidPattern : Pattern
{
internal SolidPattern (IntPtr handle, bool owned) : base (handle, owned)
{
}
public SolidPattern (Color color)
: base (NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A), true)
{
}
public SolidPattern (double r, double g, double b)
: base (NativeMethods.cairo_pattern_create_rgb (r, g, b), true)
{
}
public SolidPattern (double r, double g, double b, double a)
: base (NativeMethods.cairo_pattern_create_rgba (r, g, b, a), true)
{
}
public SolidPattern (Color color, bool solid)
: base (solid
? NativeMethods.cairo_pattern_create_rgb (color.R, color.G, color.B)
: NativeMethods.cairo_pattern_create_rgba (color.R, color.G, color.B, color.A),
true)
{
}
public Color Color {
get {
CheckDisposed ();
double red, green, blue, alpha;
NativeMethods.cairo_pattern_get_rgba (Handle, out red, out green, out blue, out alpha);
return new Color (red, green, blue, alpha);
}
}
}
}

View File

@@ -0,0 +1,64 @@
//
// Mono.Cairo.Status.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// John Luke (john.luke@gmail.com)
// Alp Toker (alp@atoker.com)
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
// Copyright (C) 2005 John Luke
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum Status
{
Success = 0,
NoMemory,
InvalidRestore,
InvalidPopGroup,
NoCurrentPoint,
InvalidMatrix,
InvalidStatus,
NullPointer,
InvalidString,
InvalidPathData,
ReadError,
WriteError,
SurfaceFinished,
SurfaceTypeMismatch,
PatternTypeMismatch,
InvalidContent,
InvalidFormat,
InvalidVisual,
FileNotFound,
InvalidDash,
InvalidDscComment,
InvalidIndex,
ClipNotRepresentable,
}
}

View File

@@ -0,0 +1,42 @@
//
// Mono.Cairo.Cairo.cs
//
// Authors:
// John Luke (john.luke@gmail.com)
//
// Copyright (C) John Luke 2005
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo
{
[Serializable]
public enum SubpixelOrder
{
Default,
Rgb,
Bgr,
Vrgb,
Vbgr,
}
}

View File

@@ -0,0 +1,273 @@
//
// Mono.Cairo.Surface.cs
//
// Authors:
// Duncan Mak
// Miguel de Icaza.
// Alp Toker
//
// (C) Ximian Inc, 2003.
// (C) Novell, Inc. 2003.
//
// This is an OO wrapper API for the Cairo API
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Collections;
namespace Cairo {
public class Surface : IDisposable
{
[Obsolete]
protected static Hashtable surfaces = new Hashtable ();
IntPtr handle = IntPtr.Zero;
[Obsolete]
protected Surface()
{
}
[Obsolete]
protected Surface (IntPtr handle) : this (handle, true)
{
}
protected Surface (IntPtr handle, bool owner)
{
if (handle == IntPtr.Zero)
throw new ArgumentException ("handle should not be NULL", "handle");
this.handle = handle;
if (!owner)
NativeMethods.cairo_surface_reference (handle);
if (CairoDebug.Enabled)
CairoDebug.OnAllocated (handle);
}
public static Surface Lookup (IntPtr surface, bool owned)
{
SurfaceType st = NativeMethods.cairo_surface_get_type (surface);
switch (st) {
case SurfaceType.Image:
return new ImageSurface (surface, owned);
case SurfaceType.Xlib:
return new XlibSurface (surface, owned);
case SurfaceType.Xcb:
return new XcbSurface (surface, owned);
case SurfaceType.Glitz:
return new GlitzSurface (surface, owned);
case SurfaceType.Win32:
return new Win32Surface (surface, owned);
case SurfaceType.Pdf:
return new PdfSurface (surface, owned);
case SurfaceType.PS:
return new PSSurface (surface, owned);
case SurfaceType.DirectFB:
return new DirectFBSurface (surface, owned);
case SurfaceType.Svg:
return new SvgSurface (surface, owned);
default:
return new Surface (surface, owned);
}
}
[Obsolete ("Use an ImageSurface constructor instead.")]
public static Cairo.Surface CreateForImage (
ref byte[] data, Cairo.Format format, int width, int height, int stride)
{
IntPtr p = NativeMethods.cairo_image_surface_create_for_data (
data, format, width, height, stride);
return new Cairo.Surface (p, true);
}
[Obsolete ("Use an ImageSurface constructor instead.")]
public static Cairo.Surface CreateForImage (
Cairo.Format format, int width, int height)
{
IntPtr p = NativeMethods.cairo_image_surface_create (
format, width, height);
return new Cairo.Surface (p, true);
}
public Cairo.Surface CreateSimilar (
Cairo.Content content, int width, int height)
{
IntPtr p = NativeMethods.cairo_surface_create_similar (
this.Handle, content, width, height);
return new Cairo.Surface (p, true);
}
~Surface ()
{
Dispose (false);
}
//[Obsolete ("Use Context.SetSource() followed by Context.Paint()")]
public void Show (Context gr, double x, double y)
{
NativeMethods.cairo_set_source_surface (gr.Handle, handle, x, y);
NativeMethods.cairo_paint (gr.Handle);
}
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
protected virtual void Dispose (bool disposing)
{
if (!disposing || CairoDebug.Enabled)
CairoDebug.OnDisposed<Surface> (handle, disposing);
if (handle == IntPtr.Zero)
return;
NativeMethods.cairo_surface_destroy (handle);
handle = IntPtr.Zero;
}
protected void CheckDisposed ()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException ("Object has already been disposed");
}
public Status Finish ()
{
CheckDisposed ();
NativeMethods.cairo_surface_finish (handle);
return Status;
}
public void Flush ()
{
CheckDisposed ();
NativeMethods.cairo_surface_flush (handle);
}
public void MarkDirty ()
{
CheckDisposed ();
NativeMethods.cairo_surface_mark_dirty (Handle);
}
public void MarkDirty (Rectangle rectangle)
{
CheckDisposed ();
NativeMethods.cairo_surface_mark_dirty_rectangle (Handle, (int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height);
}
public IntPtr Handle {
get {
return handle;
}
}
public PointD DeviceOffset {
get {
CheckDisposed ();
double x, y;
NativeMethods.cairo_surface_get_device_offset (handle, out x, out y);
return new PointD (x, y);
}
set {
CheckDisposed ();
NativeMethods.cairo_surface_set_device_offset (handle, value.X, value.Y);
}
}
public PointD DeviceScale {
get {
CheckDisposed ();
double x, y;
NativeMethods.cairo_surface_get_device_scale (handle, out x, out y);
return new PointD(x, y);
}
set {
CheckDisposed ();
NativeMethods.cairo_surface_set_device_scale (handle, value.X, value.Y);
}
}
[Obsolete ("Use Dispose()")]
public void Destroy()
{
Dispose ();
}
public void SetFallbackResolution (double x, double y)
{
CheckDisposed ();
NativeMethods.cairo_surface_set_fallback_resolution (handle, x, y);
}
public void WriteToPng (string filename)
{
CheckDisposed ();
NativeMethods.cairo_surface_write_to_png (handle, filename);
}
[Obsolete ("Use Handle instead.")]
public IntPtr Pointer {
get {
return handle;
}
}
public Status Status {
get {
CheckDisposed ();
return NativeMethods.cairo_surface_status (handle);
}
}
public Content Content {
get {
CheckDisposed ();
return NativeMethods.cairo_surface_get_content (handle);
}
}
public SurfaceType SurfaceType {
get {
CheckDisposed ();
return NativeMethods.cairo_surface_get_type (handle);
}
}
public uint ReferenceCount {
get {
return NativeMethods.cairo_surface_get_reference_count (handle); }
}
}
}

View File

@@ -0,0 +1,57 @@
//
// Mono.Cairo.Pattern.cs
//
// Author: Jordi Mas (jordi@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
// (C) Ximian Inc, 2004.
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class SurfacePattern : Pattern
{
internal SurfacePattern (IntPtr handle, bool owned) : base (handle, owned)
{
}
public SurfacePattern (Surface surface)
: base (NativeMethods.cairo_pattern_create_for_surface (surface.Handle), true)
{
}
public Filter Filter {
set {
CheckDisposed ();
NativeMethods.cairo_pattern_set_filter (Handle, value);
}
get {
CheckDisposed ();
return NativeMethods.cairo_pattern_get_filter (Handle);
}
}
}
}

View File

@@ -0,0 +1,48 @@
//
// Mono.Cairo.SurfaceType.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
[Serializable]
public enum SurfaceType
{
Image,
Pdf,
PS,
Xlib,
Xcb,
Glitz,
Quartz,
Win32,
BeOS,
DirectFB,
Svg,
}
}

View File

@@ -0,0 +1,51 @@
//
// Mono.Cairo.SvgSurface.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class SvgSurface : Surface
{
internal SvgSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public SvgSurface (string filename, double width, double height)
: base (NativeMethods.cairo_svg_surface_create (filename, width, height), true)
{
}
public void RestrictToVersion (SvgVersion version)
{
CheckDisposed ();
NativeMethods.cairo_svg_surface_restrict_to_version (Handle, version);
}
}
}

View File

@@ -0,0 +1,41 @@
//
// Mono.Cairo.SvgVersion.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
[Serializable]
public enum SvgVersion
{
// FIXME: yuck
OnePointOne = 0,
OnePointTwo,
}
}

View File

@@ -0,0 +1,98 @@
//
// Mono.Cairo.TextExtents.cs
//
// Authors:
// Duncan Mak (duncan@ximian.com)
// Hisham Mardam Bey (hisham.mardambey@gmail.com)
//
// (C) Ximian, Inc. 2003
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Cairo
{
[StructLayout (LayoutKind.Sequential)]
public struct TextExtents
{
double xbearing;
double ybearing;
double width;
double height;
double xadvance;
double yadvance;
public double XBearing {
get { return xbearing; }
set { xbearing = value; }
}
public double YBearing {
get { return ybearing; }
set { ybearing = value; }
}
public double Width {
get { return width; }
set { width = value; }
}
public double Height {
get { return height; }
set { height = value; }
}
public double XAdvance {
get { return xadvance; }
set { xadvance = value; }
}
public double YAdvance {
get { return yadvance; }
set { yadvance = value; }
}
public override bool Equals (object obj)
{
if (obj is TextExtents)
return this == (TextExtents)obj;
return false;
}
public override int GetHashCode ()
{
return (int)XBearing ^ (int)YBearing ^ (int)Width ^ (int)Height ^ (int)XAdvance ^ (int)YAdvance;
}
public static bool operator == (TextExtents extents, TextExtents other)
{
return extents.XBearing == other.XBearing && extents.YBearing == other.YBearing && extents.Width == other.Width && extents.Height == other.Height && extents.XAdvance == other.XAdvance && extents.YAdvance == other.YAdvance;
}
public static bool operator != (TextExtents extents, TextExtents other)
{
return !(extents == other);
}
}
}

View File

@@ -0,0 +1,44 @@
//
// Mono.Cairo.Win32Surface.cs
//
// Authors:
// John Luke
//
// (C) John Luke, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class Win32Surface : Surface
{
internal Win32Surface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public Win32Surface (IntPtr hdc)
: base (NativeMethods.cairo_win32_surface_create (hdc), true)
{
}
}
}

View File

@@ -0,0 +1,55 @@
//
// Mono.Cairo.XcbSurface.cs
//
// Authors:
// Alp Toker
//
// (C) Alp Toker, 2006.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class XcbSurface : Surface
{
internal XcbSurface (IntPtr handle, bool owns) : base (handle, owns)
{
}
public XcbSurface (IntPtr connection, uint drawable, IntPtr visual, int width, int height)
: base (NativeMethods.cairo_xcb_surface_create (connection, drawable, visual, width, height), true)
{
}
public static XcbSurface FromBitmap (IntPtr connection, uint bitmap, IntPtr screen, int width, int height)
{
IntPtr ptr = NativeMethods.cairo_xcb_surface_create_for_bitmap (connection, bitmap, screen, width, height);
return new XcbSurface (ptr, true);
}
public void SetSize (int width, int height)
{
CheckDisposed ();
NativeMethods.cairo_xcb_surface_set_size (Handle, width, height);
}
}
}

View File

@@ -0,0 +1,118 @@
//
// Mono.Cairo.XlibSurface.cs
//
// Authors:
// Duncan Mak
// Miguel de Icaza.
//
// (C) Ximian Inc, 2003.
// (C) Novell, Inc. 2003.
//
// This is an OO wrapper API for the Cairo API
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
namespace Cairo {
public class XlibSurface : Surface
{
public XlibSurface (IntPtr display, IntPtr drawable, IntPtr visual, int width, int height)
: base (NativeMethods.cairo_xlib_surface_create (display, drawable, visual, width, height), true)
{
}
public XlibSurface (IntPtr ptr, bool own) : base (ptr, own)
{
}
public static XlibSurface FromBitmap (IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height)
{
IntPtr ptr = NativeMethods.cairo_xlib_surface_create_for_bitmap (display, bitmap, screen, width, height);
return new XlibSurface(ptr, true);
}
public void SetDrawable (IntPtr drawable, int width, int height)
{
CheckDisposed ();
NativeMethods.cairo_xlib_surface_set_drawable (Handle, drawable, width, height);
}
public void SetSize (int width, int height)
{
CheckDisposed ();
NativeMethods.cairo_xlib_surface_set_size (Handle, width, height);
}
public int Depth {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_depth (Handle);
}
}
public IntPtr Display {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_display (Handle);
}
}
public IntPtr Drawable {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_drawable (Handle);
}
}
public int Height {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_height (Handle);
}
}
public IntPtr Screen {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_screen (Handle);
}
}
public IntPtr Visual {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_visual (Handle);
}
}
public int Width {
get {
CheckDisposed ();
return NativeMethods.cairo_xlib_surface_get_width (Handle);
}
}
}
}

View File

@@ -0,0 +1,98 @@
{
"format": 1,
"restore": {
"E:\\projects\\KioskApp\\GtkSharp\\Source\\Libs\\CairoSharp\\CairoSharp.csproj": {}
},
"projects": {
"E:\\projects\\KioskApp\\GtkSharp\\Source\\Libs\\CairoSharp\\CairoSharp.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "E:\\projects\\KioskApp\\GtkSharp\\Source\\Libs\\CairoSharp\\CairoSharp.csproj",
"projectName": "CairoSharp",
"projectPath": "E:\\projects\\KioskApp\\GtkSharp\\Source\\Libs\\CairoSharp\\CairoSharp.csproj",
"packagesPath": "C:\\Users\\Uther\\.nuget\\packages\\",
"outputPath": "E:\\projects\\KioskApp\\GtkSharp\\Source\\Libs\\CairoSharp\\obj\\",
"projectStyle": "PackageReference",
"crossTargeting": true,
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\Uther\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0",
"netstandard2.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {},
"https://nuget.BepInEx.dev/v3/index.json": {},
"https://www.myget.org/f/umod/api/v3/index.json": {}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"projectReferences": {}
},
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net8.0": {
"targetAlias": "net8.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.206/PortableRuntimeIdentifierGraph.json"
},
"netstandard2.0": {
"targetAlias": "netstandard2.0",
"dependencies": {
"NETStandard.Library": {
"suppressParent": "All",
"target": "Package",
"version": "[2.0.3, )",
"autoReferenced": true
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\8.0.206\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Uther\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.8.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Uther\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' AND '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets" Condition="Exists('$(NuGetPackageRoot)netstandard.library\2.0.3\build\netstandard2.0\NETStandard.Library.targets')" />
</ImportGroup>
</Project>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("CairoSharp is a C# wrapper for the Cairo library.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b7303616129ab5a0ca64def45649ab522d83fa4a")]
[assembly: System.Reflection.AssemblyProductAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/GtkSharp/GtkSharp")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -0,0 +1 @@
298c9e3807758f656e86d6ba8bc7c91f301023f2e70921def4b7800124e9056b

View File

@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = CairoSharp
build_property.ProjectDir = E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1 @@
55f27121a6186c91104c3ecb9edd05d1ddd61bbab42bddc3a62f988a005f3a5a

View File

@@ -0,0 +1,12 @@
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\net8.0\CairoSharp.deps.json
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\net8.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\net8.0\CairoSharp.pdb
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.GeneratedMSBuildEditorConfig.editorconfig
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.AssemblyInfoInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.AssemblyInfo.cs
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.csproj.CoreCompileInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.sourcelink.json
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\refint\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\CairoSharp.pdb
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\net8.0\ref\CairoSharp.dll

View File

@@ -0,0 +1 @@
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("CairoSharp is a C# wrapper for the Cairo library.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b7303616129ab5a0ca64def45649ab522d83fa4a")]
[assembly: System.Reflection.AssemblyProductAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/GtkSharp/GtkSharp")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -0,0 +1 @@
298c9e3807758f656e86d6ba8bc7c91f301023f2e70921def4b7800124e9056b

View File

@@ -0,0 +1,5 @@
is_global = true
build_property.RootNamespace = CairoSharp
build_property.ProjectDir = E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1 @@
07777a96d1801572d110fba1e9dd2d1117af14da2df548635e6c6d3641b3f38e

View File

@@ -0,0 +1,11 @@
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\netstandard2.0\CairoSharp.deps.json
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\netstandard2.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\BuildOutput\Debug\netstandard2.0\CairoSharp.pdb
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.csproj.AssemblyReference.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.GeneratedMSBuildEditorConfig.editorconfig
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.AssemblyInfoInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.AssemblyInfo.cs
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.csproj.CoreCompileInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.sourcelink.json
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Debug\netstandard2.0\CairoSharp.pdb

View File

@@ -0,0 +1 @@
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>CairoSharp</id>
<version>3.24.24.1</version>
<authors>'GtkSharp Contributors'</authors>
<projectUrl>https://github.com/GtkSharp/GtkSharp</projectUrl>
<description>CairoSharp is a C# wrapper for the Cairo library.</description>
<tags>cairo cairosharp cairo-sharp wrapper</tags>
<repository type="git" url="https://github.com/GtkSharp/GtkSharp" commit="b7303616129ab5a0ca64def45649ab522d83fa4a" />
<dependencies>
<group targetFramework="net8.0" />
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
<files>
<file src="E:\projects\KioskApp\GtkSharp\BuildOutput\Release\net8.0\CairoSharp.dll" target="lib\net8.0\CairoSharp.dll" />
<file src="E:\projects\KioskApp\GtkSharp\BuildOutput\Release\netstandard2.0\CairoSharp.dll" target="lib\netstandard2.0\CairoSharp.dll" />
</files>
</package>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("CairoSharp is a C# wrapper for the Cairo library.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+b7303616129ab5a0ca64def45649ab522d83fa4a")]
[assembly: System.Reflection.AssemblyProductAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyTitleAttribute("CairoSharp")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/GtkSharp/GtkSharp")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View File

@@ -0,0 +1 @@
b37c6a050b73484c7c2ddecb09a9a34afb98f37a1d7df67b981ae2411ac8f898

View File

@@ -0,0 +1,13 @@
is_global = true
build_property.TargetFramework = net8.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = CairoSharp
build_property.ProjectDir = E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =

View File

@@ -0,0 +1 @@
10b6aa45b60557ef1cf46d59a5ab41863162f6ff93d23dd7461435d5c011fc1c

View File

@@ -0,0 +1,12 @@
E:\projects\KioskApp\GtkSharp\BuildOutput\Release\net8.0\CairoSharp.deps.json
E:\projects\KioskApp\GtkSharp\BuildOutput\Release\net8.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\BuildOutput\Release\net8.0\CairoSharp.pdb
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.GeneratedMSBuildEditorConfig.editorconfig
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.AssemblyInfoInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.AssemblyInfo.cs
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.csproj.CoreCompileInputs.cache
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.sourcelink.json
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\refint\CairoSharp.dll
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\CairoSharp.pdb
E:\projects\KioskApp\GtkSharp\Source\Libs\CairoSharp\obj\Release\net8.0\ref\CairoSharp.dll

View File

@@ -0,0 +1 @@
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]

Some files were not shown because too many files have changed in this diff Show More