no more submodule
This commit is contained in:
43
GtkSharp/Source/Libs/CairoSharp/Antialias.cs
Normal file
43
GtkSharp/Source/Libs/CairoSharp/Antialias.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
53
GtkSharp/Source/Libs/CairoSharp/Cairo.cs
Normal file
53
GtkSharp/Source/Libs/CairoSharp/Cairo.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
GtkSharp/Source/Libs/CairoSharp/CairoDebug.cs
Normal file
82
GtkSharp/Source/Libs/CairoSharp/CairoDebug.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
11
GtkSharp/Source/Libs/CairoSharp/CairoSharp-api.xml
Normal file
11
GtkSharp/Source/Libs/CairoSharp/CairoSharp-api.xml
Normal 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>
|
||||
14
GtkSharp/Source/Libs/CairoSharp/CairoSharp.csproj
Normal file
14
GtkSharp/Source/Libs/CairoSharp/CairoSharp.csproj
Normal 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>
|
||||
75
GtkSharp/Source/Libs/CairoSharp/Color.cs
Normal file
75
GtkSharp/Source/Libs/CairoSharp/Color.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
43
GtkSharp/Source/Libs/CairoSharp/Content.cs
Normal file
43
GtkSharp/Source/Libs/CairoSharp/Content.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
1045
GtkSharp/Source/Libs/CairoSharp/Context.cs
Normal file
1045
GtkSharp/Source/Libs/CairoSharp/Context.cs
Normal file
File diff suppressed because it is too large
Load Diff
104
GtkSharp/Source/Libs/CairoSharp/Device.cs
Normal file
104
GtkSharp/Source/Libs/CairoSharp/Device.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
43
GtkSharp/Source/Libs/CairoSharp/DirectFBSurface.cs
Normal file
43
GtkSharp/Source/Libs/CairoSharp/DirectFBSurface.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
58
GtkSharp/Source/Libs/CairoSharp/Distance.cs
Normal file
58
GtkSharp/Source/Libs/CairoSharp/Distance.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
45
GtkSharp/Source/Libs/CairoSharp/Extend.cs
Normal file
45
GtkSharp/Source/Libs/CairoSharp/Extend.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
41
GtkSharp/Source/Libs/CairoSharp/FillRule.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/FillRule.cs
Normal 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
|
||||
}
|
||||
}
|
||||
45
GtkSharp/Source/Libs/CairoSharp/Filter.cs
Normal file
45
GtkSharp/Source/Libs/CairoSharp/Filter.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
104
GtkSharp/Source/Libs/CairoSharp/FontExtents.cs
Normal file
104
GtkSharp/Source/Libs/CairoSharp/FontExtents.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
122
GtkSharp/Source/Libs/CairoSharp/FontFace.cs
Normal file
122
GtkSharp/Source/Libs/CairoSharp/FontFace.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
181
GtkSharp/Source/Libs/CairoSharp/FontOptions.cs
Normal file
181
GtkSharp/Source/Libs/CairoSharp/FontOptions.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
GtkSharp/Source/Libs/CairoSharp/FontSlant.cs
Normal file
42
GtkSharp/Source/Libs/CairoSharp/FontSlant.cs
Normal 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
|
||||
}
|
||||
}
|
||||
41
GtkSharp/Source/Libs/CairoSharp/FontType.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/FontType.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
41
GtkSharp/Source/Libs/CairoSharp/FontWeight.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/FontWeight.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
48
GtkSharp/Source/Libs/CairoSharp/Format.cs
Normal file
48
GtkSharp/Source/Libs/CairoSharp/Format.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
11
GtkSharp/Source/Libs/CairoSharp/Generated/CairoSharp-api.xml
Normal file
11
GtkSharp/Source/Libs/CairoSharp/Generated/CairoSharp-api.xml
Normal 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>
|
||||
43
GtkSharp/Source/Libs/CairoSharp/GlitzSurface.cs
Normal file
43
GtkSharp/Source/Libs/CairoSharp/GlitzSurface.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
GtkSharp/Source/Libs/CairoSharp/Global.cs
Normal file
11
GtkSharp/Source/Libs/CairoSharp/Global.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Cairo
|
||||
{
|
||||
|
||||
public partial class Global
|
||||
{
|
||||
|
||||
public static bool IsSupported => GLibrary.IsSupported(Library.Cairo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
96
GtkSharp/Source/Libs/CairoSharp/Glyph.cs
Normal file
96
GtkSharp/Source/Libs/CairoSharp/Glyph.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
69
GtkSharp/Source/Libs/CairoSharp/Gradient.cs
Normal file
69
GtkSharp/Source/Libs/CairoSharp/Gradient.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
GtkSharp/Source/Libs/CairoSharp/HintMetrics.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/HintMetrics.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
43
GtkSharp/Source/Libs/CairoSharp/HintStyle.cs
Normal file
43
GtkSharp/Source/Libs/CairoSharp/HintStyle.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
116
GtkSharp/Source/Libs/CairoSharp/ImageSurface.cs
Normal file
116
GtkSharp/Source/Libs/CairoSharp/ImageSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
41
GtkSharp/Source/Libs/CairoSharp/LineCap.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/LineCap.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
42
GtkSharp/Source/Libs/CairoSharp/LineJoin.cs
Normal file
42
GtkSharp/Source/Libs/CairoSharp/LineJoin.cs
Normal 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
|
||||
}
|
||||
}
|
||||
|
||||
60
GtkSharp/Source/Libs/CairoSharp/LinearGradient.cs
Normal file
60
GtkSharp/Source/Libs/CairoSharp/LinearGradient.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
193
GtkSharp/Source/Libs/CairoSharp/Matrix.cs
Normal file
193
GtkSharp/Source/Libs/CairoSharp/Matrix.cs
Normal 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 ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
1299
GtkSharp/Source/Libs/CairoSharp/NativeMethods.cs
Normal file
1299
GtkSharp/Source/Libs/CairoSharp/NativeMethods.cs
Normal file
File diff suppressed because it is too large
Load Diff
56
GtkSharp/Source/Libs/CairoSharp/Operator.cs
Normal file
56
GtkSharp/Source/Libs/CairoSharp/Operator.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
68
GtkSharp/Source/Libs/CairoSharp/PSSurface.cs
Normal file
68
GtkSharp/Source/Libs/CairoSharp/PSSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
138
GtkSharp/Source/Libs/CairoSharp/Path.cs
Normal file
138
GtkSharp/Source/Libs/CairoSharp/Path.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
28
GtkSharp/Source/Libs/CairoSharp/PathData.cs
Normal file
28
GtkSharp/Source/Libs/CairoSharp/PathData.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
13
GtkSharp/Source/Libs/CairoSharp/PathDataType.cs
Normal file
13
GtkSharp/Source/Libs/CairoSharp/PathDataType.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Cairo
|
||||
{
|
||||
[Serializable]
|
||||
public enum PathDataType
|
||||
{
|
||||
MoveTo,
|
||||
LineTo,
|
||||
CurveTo,
|
||||
ClosePath
|
||||
}
|
||||
}
|
||||
179
GtkSharp/Source/Libs/CairoSharp/Pattern.cs
Normal file
179
GtkSharp/Source/Libs/CairoSharp/Pattern.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
GtkSharp/Source/Libs/CairoSharp/PatternType.cs
Normal file
42
GtkSharp/Source/Libs/CairoSharp/PatternType.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
|
||||
51
GtkSharp/Source/Libs/CairoSharp/PdfSurface.cs
Normal file
51
GtkSharp/Source/Libs/CairoSharp/PdfSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
GtkSharp/Source/Libs/CairoSharp/Point.cs
Normal file
57
GtkSharp/Source/Libs/CairoSharp/Point.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
58
GtkSharp/Source/Libs/CairoSharp/PointD.cs
Normal file
58
GtkSharp/Source/Libs/CairoSharp/PointD.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
46
GtkSharp/Source/Libs/CairoSharp/RadialGradient.cs
Normal file
46
GtkSharp/Source/Libs/CairoSharp/RadialGradient.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
99
GtkSharp/Source/Libs/CairoSharp/Rectangle.cs
Normal file
99
GtkSharp/Source/Libs/CairoSharp/Rectangle.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
227
GtkSharp/Source/Libs/CairoSharp/Region.cs
Normal file
227
GtkSharp/Source/Libs/CairoSharp/Region.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
140
GtkSharp/Source/Libs/CairoSharp/ScaledFont.cs
Normal file
140
GtkSharp/Source/Libs/CairoSharp/ScaledFont.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
73
GtkSharp/Source/Libs/CairoSharp/SolidPattern.cs
Normal file
73
GtkSharp/Source/Libs/CairoSharp/SolidPattern.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
GtkSharp/Source/Libs/CairoSharp/Status.cs
Normal file
64
GtkSharp/Source/Libs/CairoSharp/Status.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
42
GtkSharp/Source/Libs/CairoSharp/SubpixelOrder.cs
Normal file
42
GtkSharp/Source/Libs/CairoSharp/SubpixelOrder.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
273
GtkSharp/Source/Libs/CairoSharp/Surface.cs
Normal file
273
GtkSharp/Source/Libs/CairoSharp/Surface.cs
Normal 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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
57
GtkSharp/Source/Libs/CairoSharp/SurfacePattern.cs
Normal file
57
GtkSharp/Source/Libs/CairoSharp/SurfacePattern.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
48
GtkSharp/Source/Libs/CairoSharp/SurfaceType.cs
Normal file
48
GtkSharp/Source/Libs/CairoSharp/SurfaceType.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
51
GtkSharp/Source/Libs/CairoSharp/SvgSurface.cs
Normal file
51
GtkSharp/Source/Libs/CairoSharp/SvgSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
41
GtkSharp/Source/Libs/CairoSharp/SvgVersion.cs
Normal file
41
GtkSharp/Source/Libs/CairoSharp/SvgVersion.cs
Normal 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,
|
||||
}
|
||||
}
|
||||
|
||||
98
GtkSharp/Source/Libs/CairoSharp/TextExtents.cs
Normal file
98
GtkSharp/Source/Libs/CairoSharp/TextExtents.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
44
GtkSharp/Source/Libs/CairoSharp/Win32Surface.cs
Normal file
44
GtkSharp/Source/Libs/CairoSharp/Win32Surface.cs
Normal 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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
55
GtkSharp/Source/Libs/CairoSharp/XcbSurface.cs
Normal file
55
GtkSharp/Source/Libs/CairoSharp/XcbSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
118
GtkSharp/Source/Libs/CairoSharp/XlibSurface.cs
Normal file
118
GtkSharp/Source/Libs/CairoSharp/XlibSurface.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
298c9e3807758f656e86d6ba8bc7c91f301023f2e70921def4b7800124e9056b
|
||||
@@ -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 =
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
55f27121a6186c91104c3ecb9edd05d1ddd61bbab42bddc3a62f988a005f3a5a
|
||||
@@ -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
|
||||
BIN
GtkSharp/Source/Libs/CairoSharp/obj/Debug/net8.0/CairoSharp.dll
Normal file
BIN
GtkSharp/Source/Libs/CairoSharp/obj/Debug/net8.0/CairoSharp.dll
Normal file
Binary file not shown.
BIN
GtkSharp/Source/Libs/CairoSharp/obj/Debug/net8.0/CairoSharp.pdb
Normal file
BIN
GtkSharp/Source/Libs/CairoSharp/obj/Debug/net8.0/CairoSharp.pdb
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}
|
||||
Binary file not shown.
Binary file not shown.
@@ -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")]
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
298c9e3807758f656e86d6ba8bc7c91f301023f2e70921def4b7800124e9056b
|
||||
@@ -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 =
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
07777a96d1801572d110fba1e9dd2d1117af14da2df548635e6c6d3641b3f38e
|
||||
@@ -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
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}
|
||||
@@ -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>
|
||||
@@ -0,0 +1,4 @@
|
||||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
|
||||
@@ -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.
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
b37c6a050b73484c7c2ddecb09a9a34afb98f37a1d7df67b981ae2411ac8f898
|
||||
@@ -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 =
|
||||
Binary file not shown.
@@ -0,0 +1 @@
|
||||
10b6aa45b60557ef1cf46d59a5ab41863162f6ff93d23dd7461435d5c011fc1c
|
||||
@@ -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
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
{"documents":{"E:\\projects\\KioskApp\\GtkSharp\\*":"https://raw.githubusercontent.com/GtkSharp/GtkSharp/b7303616129ab5a0ca64def45649ab522d83fa4a/*"}}
|
||||
Binary file not shown.
Binary file not shown.
@@ -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
Reference in New Issue
Block a user