cairo: Fix some whitespace and code formatting issues

This commit is contained in:
Bertrand Lorentz 2013-07-26 16:11:56 -05:00
parent c77fa9d048
commit 21ce761271
4 changed files with 16 additions and 18 deletions

View file

@ -46,7 +46,7 @@ namespace Cairo {
public Graphics (Surface surface) : base (surface) {} public Graphics (Surface surface) : base (surface) {}
} }
public class Context : IDisposable public class Context : IDisposable
{ {
IntPtr handle = IntPtr.Zero; IntPtr handle = IntPtr.Zero;
@ -304,7 +304,7 @@ namespace Cairo {
} }
[Obsolete("Use GetScaledFont/SetScaledFont")] [Obsolete("Use GetScaledFont/SetScaledFont")]
public Cairo.ScaledFont ScaledFont { public ScaledFont ScaledFont {
set { set {
SetScaledFont (value); SetScaledFont (value);
} }
@ -423,7 +423,7 @@ namespace Cairo {
public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3) public void RelCurveTo (double dx1, double dy1, double dx2, double dy2, double dx3, double dy3)
{ {
NativeMethods.cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3); NativeMethods.cairo_rel_curve_to (handle, dx1, dy1, dx2, dy2, dx3, dy3);
} }
public void Arc (double xc, double yc, double radius, double angle1, double angle2) public void Arc (double xc, double yc, double radius, double angle1, double angle2)
@ -507,7 +507,7 @@ namespace Cairo {
public void StrokePreserve () public void StrokePreserve ()
{ {
NativeMethods.cairo_stroke_preserve (handle); NativeMethods.cairo_stroke_preserve (handle);
} }
public Rectangle StrokeExtents () public Rectangle StrokeExtents ()
{ {
@ -544,12 +544,12 @@ namespace Cairo {
{ {
NativeMethods.cairo_clip_preserve (handle); NativeMethods.cairo_clip_preserve (handle);
} }
public void ResetClip () public void ResetClip ()
{ {
NativeMethods.cairo_reset_clip (handle); NativeMethods.cairo_reset_clip (handle);
} }
public bool InStroke (double x, double y) public bool InStroke (double x, double y)
{ {
return NativeMethods.cairo_in_stroke (handle, x, y); return NativeMethods.cairo_in_stroke (handle, x, y);
@ -625,7 +625,7 @@ namespace Cairo {
} }
[Obsolete("Use UserToDeviceDistance instead")] [Obsolete("Use UserToDeviceDistance instead")]
public void TransformDistance (ref double dx, ref double dy) public void TransformDistance (ref double dx, ref double dy)
{ {
NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy); NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
} }
@ -647,7 +647,7 @@ namespace Cairo {
NativeMethods.cairo_user_to_device (handle, ref x, ref y); NativeMethods.cairo_user_to_device (handle, ref x, ref y);
} }
public void UserToDeviceDistance (ref double dx, ref double dy) public void UserToDeviceDistance (ref double dx, ref double dy)
{ {
NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy); NativeMethods.cairo_user_to_device_distance (handle, ref dx, ref dy);
} }
@ -662,7 +662,7 @@ namespace Cairo {
NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy); NativeMethods.cairo_device_to_user_distance (handle, ref dx, ref dy);
} }
public Cairo.Matrix Matrix { public Matrix Matrix {
set { set {
NativeMethods.cairo_set_matrix (handle, value); NativeMethods.cairo_set_matrix (handle, value);
} }
@ -808,7 +808,6 @@ namespace Cairo {
get { get {
return GetContextFontFace (); return GetContextFontFace ();
} }
set { set {
SetContextFontFace (value); SetContextFontFace (value);
} }

View file

@ -36,12 +36,11 @@ using System.Runtime.InteropServices;
namespace Cairo namespace Cairo
{ {
// sort these so it is easier to find what is missing // sort the functions like in the following page so it is easier to find what is missing
// http://www.cairographics.org/manual/ix01.html // http://cairographics.org/manual/index-all.html
internal static class NativeMethods internal static class NativeMethods
{ {
const string cairo = "libcairo-2.dll"; const string cairo = "libcairo-2.dll";
[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)]

View file

@ -34,7 +34,7 @@ using Cairo;
namespace Cairo { namespace Cairo {
public class Path : IDisposable public class Path : IDisposable
{ {
IntPtr handle = IntPtr.Zero; IntPtr handle = IntPtr.Zero;
@ -57,7 +57,7 @@ namespace Cairo {
Dispose (true); Dispose (true);
GC.SuppressFinalize (this); GC.SuppressFinalize (this);
} }
protected virtual void Dispose (bool disposing) protected virtual void Dispose (bool disposing)
{ {
if (!disposing || CairoDebug.Enabled) if (!disposing || CairoDebug.Enabled)

View file

@ -7,10 +7,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to // distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to // permit persons to whom the Software is furnished to do so, subject to
// the following conditions: // the following conditions:
// //
// The above copyright notice and this permission notice shall be // The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software. // included in all copies or substantial portions of the Software.
// //
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@ -39,7 +39,7 @@ namespace Cairo
Out, Out,
Part, Part,
} }
public class Region : IDisposable { public class Region : IDisposable {
IntPtr handle; IntPtr handle;