Imported Upstream version 6.0.0.259

Former-commit-id: a2feb8469d8f23b4264831f7d8d4e51f47cd1948
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2019-05-25 08:50:17 +00:00
parent 03112dc19c
commit 3d63c66c1d
53 changed files with 126 additions and 44 deletions

View File

@ -1 +1 @@
74abfccb776ba324a0275fcc0ddb2897bdf001d5 ba1784f90767e3d03c6b54bf98772182d52e800b

View File

@ -1 +1 @@
445ee57c4662662a46c91f4416ed9da910fad8c3 b47556c41715a88e1a5e14e5b839a3f1394745dd

View File

@ -1 +1 @@
abf6e68da54c68314fad4a41cfb7001569124eca 44f13ddec9a8d9c04a955ae30eeba3a40f62c228

View File

@ -41,7 +41,7 @@ static partial class Consts
// Use these assembly version constants to make code more maintainable. // Use these assembly version constants to make code more maintainable.
// //
public const string MonoVersion = "6.0.0.255"; public const string MonoVersion = "6.0.0.259";
public const string MonoCompany = "Mono development team"; public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure"; public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors"; public const string MonoCopyright = "(c) Various Mono authors";

View File

@ -49,7 +49,7 @@ namespace Cairo {
public class Context : IDisposable public class Context : IDisposable
{ {
IntPtr handle = IntPtr.Zero; IntPtr handle;
static int native_glyph_size, c_compiler_long_size; static int native_glyph_size, c_compiler_long_size;
@ -105,6 +105,12 @@ namespace Cairo {
Dispose (false); Dispose (false);
} }
private void ThrowIfDisposed()
{
if (handle == IntPtr.Zero)
throw new ObjectDisposedException("Cairo.Context");
}
public void Dispose () public void Dispose ()
{ {
Dispose (true); Dispose (true);
@ -307,9 +313,14 @@ namespace Cairo {
public void SetTarget (Surface target) public void SetTarget (Surface target)
{ {
IntPtr newHandle = NativeMethods.cairo_create (target.Handle);
if (newHandle == IntPtr.Zero)
throw new InvalidOperationException ("Surface had an invalid handle.");
if (handle != IntPtr.Zero) if (handle != IntPtr.Zero)
NativeMethods.cairo_destroy (handle); NativeMethods.cairo_destroy (handle);
handle = NativeMethods.cairo_create (target.Handle);
handle = newHandle;
} }
[Obsolete("Use GetScaledFont/SetScaledFont")] [Obsolete("Use GetScaledFont/SetScaledFont")]
@ -325,11 +336,13 @@ namespace Cairo {
public ScaledFont GetScaledFont () public ScaledFont GetScaledFont ()
{ {
ThrowIfDisposed();
return new ScaledFont (NativeMethods.cairo_get_scaled_font (handle), false); return new ScaledFont (NativeMethods.cairo_get_scaled_font (handle), false);
} }
public void SetScaledFont (ScaledFont font) public void SetScaledFont (ScaledFont font)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_scaled_font (handle, font.Handle); NativeMethods.cairo_set_scaled_font (handle, font.Handle);
} }
@ -339,32 +352,38 @@ namespace Cairo {
public void SetSourceColor (Color color) public void SetSourceColor (Color color)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A); NativeMethods.cairo_set_source_rgba (handle, color.R, color.G, color.B, color.A);
} }
public void SetSourceRGB (double r, double g, double b) public void SetSourceRGB (double r, double g, double b)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgb (handle, r, g, b); NativeMethods.cairo_set_source_rgb (handle, r, g, b);
} }
public void SetSourceRGBA (double r, double g, double b, double a) public void SetSourceRGBA (double r, double g, double b, double a)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_rgba (handle, r, g, b, a); NativeMethods.cairo_set_source_rgba (handle, r, g, b, a);
} }
//[Obsolete ("Use SetSource method (with double parameters)")] //[Obsolete ("Use SetSource method (with double parameters)")]
public void SetSourceSurface (Surface source, int x, int y) public void SetSourceSurface (Surface source, int x, int y)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y); NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
} }
public void SetSource (Surface source, double x, double y) public void SetSource (Surface source, double x, double y)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y); NativeMethods.cairo_set_source_surface (handle, source.Handle, x, y);
} }
public void SetSource (Surface source) public void SetSource (Surface source)
{ {
ThrowIfDisposed();
NativeMethods.cairo_set_source_surface (handle, source.Handle, 0, 0); NativeMethods.cairo_set_source_surface (handle, source.Handle, 0, 0);
} }
@ -372,116 +391,139 @@ namespace Cairo {
public void NewPath () public void NewPath ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_new_path (handle); NativeMethods.cairo_new_path (handle);
} }
public void NewSubPath () public void NewSubPath ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_new_sub_path (handle); NativeMethods.cairo_new_sub_path (handle);
} }
public void MoveTo (PointD p) public void MoveTo (PointD p)
{ {
ThrowIfDisposed();
MoveTo (p.X, p.Y); MoveTo (p.X, p.Y);
} }
public void MoveTo (double x, double y) public void MoveTo (double x, double y)
{ {
ThrowIfDisposed();
NativeMethods.cairo_move_to (handle, x, y); NativeMethods.cairo_move_to (handle, x, y);
} }
public void LineTo (PointD p) public void LineTo (PointD p)
{ {
ThrowIfDisposed();
LineTo (p.X, p.Y); LineTo (p.X, p.Y);
} }
public void LineTo (double x, double y) public void LineTo (double x, double y)
{ {
ThrowIfDisposed();
NativeMethods.cairo_line_to (handle, x, y); NativeMethods.cairo_line_to (handle, x, y);
} }
public void CurveTo (PointD p1, PointD p2, PointD p3) public void CurveTo (PointD p1, PointD p2, PointD p3)
{ {
ThrowIfDisposed();
CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y); CurveTo (p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y);
} }
public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3) public void CurveTo (double x1, double y1, double x2, double y2, double x3, double y3)
{ {
ThrowIfDisposed();
NativeMethods.cairo_curve_to (handle, x1, y1, x2, y2, x3, y3); NativeMethods.cairo_curve_to (handle, x1, y1, x2, y2, x3, y3);
} }
public void RelMoveTo (Distance d) public void RelMoveTo (Distance d)
{ {
ThrowIfDisposed();
RelMoveTo (d.Dx, d.Dy); RelMoveTo (d.Dx, d.Dy);
} }
public void RelMoveTo (double dx, double dy) public void RelMoveTo (double dx, double dy)
{ {
ThrowIfDisposed();
NativeMethods.cairo_rel_move_to (handle, dx, dy); NativeMethods.cairo_rel_move_to (handle, dx, dy);
} }
public void RelLineTo (Distance d) public void RelLineTo (Distance d)
{ {
ThrowIfDisposed();
RelLineTo (d.Dx, d.Dy); RelLineTo (d.Dx, d.Dy);
} }
public void RelLineTo (double dx, double dy) public void RelLineTo (double dx, double dy)
{ {
ThrowIfDisposed();
NativeMethods.cairo_rel_line_to (handle, dx, dy); NativeMethods.cairo_rel_line_to (handle, dx, dy);
} }
public void RelCurveTo (Distance d1, Distance d2, Distance d3) public void RelCurveTo (Distance d1, Distance d2, Distance d3)
{ {
ThrowIfDisposed();
RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy); RelCurveTo (d1.Dx, d1.Dy, d2.Dx, d2.Dy, d3.Dx, d3.Dy);
} }
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)
{ {
ThrowIfDisposed();
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)
{ {
ThrowIfDisposed();
NativeMethods.cairo_arc (handle, xc, yc, radius, angle1, angle2); NativeMethods.cairo_arc (handle, xc, yc, radius, angle1, angle2);
} }
public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2) public void ArcNegative (double xc, double yc, double radius, double angle1, double angle2)
{ {
ThrowIfDisposed();
NativeMethods.cairo_arc_negative (handle, xc, yc, radius, angle1, angle2); NativeMethods.cairo_arc_negative (handle, xc, yc, radius, angle1, angle2);
} }
public void Rectangle (Rectangle rectangle) public void Rectangle (Rectangle rectangle)
{ {
ThrowIfDisposed();
Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height); Rectangle (rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
} }
public void Rectangle (PointD p, double width, double height) public void Rectangle (PointD p, double width, double height)
{ {
ThrowIfDisposed();
Rectangle (p.X, p.Y, width, height); Rectangle (p.X, p.Y, width, height);
} }
public void Rectangle (double x, double y, double width, double height) public void Rectangle (double x, double y, double width, double height)
{ {
ThrowIfDisposed();
NativeMethods.cairo_rectangle (handle, x, y, width, height); NativeMethods.cairo_rectangle (handle, x, y, width, height);
} }
public void ClosePath () public void ClosePath ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_close_path (handle); NativeMethods.cairo_close_path (handle);
} }
public Path CopyPath () public Path CopyPath ()
{ {
ThrowIfDisposed();
return new Path (NativeMethods.cairo_copy_path (handle)); return new Path (NativeMethods.cairo_copy_path (handle));
} }
public Path CopyPathFlat () public Path CopyPathFlat ()
{ {
ThrowIfDisposed();
return new Path (NativeMethods.cairo_copy_path_flat (handle)); return new Path (NativeMethods.cairo_copy_path_flat (handle));
} }
public void AppendPath (Path path) public void AppendPath (Path path)
{ {
ThrowIfDisposed();
NativeMethods.cairo_append_path (handle, path.Handle); NativeMethods.cairo_append_path (handle, path.Handle);
} }
@ -490,36 +532,43 @@ namespace Cairo {
#region Painting Methods #region Painting Methods
public void Paint () public void Paint ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_paint (handle); NativeMethods.cairo_paint (handle);
} }
public void PaintWithAlpha (double alpha) public void PaintWithAlpha (double alpha)
{ {
ThrowIfDisposed();
NativeMethods.cairo_paint_with_alpha (handle, alpha); NativeMethods.cairo_paint_with_alpha (handle, alpha);
} }
public void Mask (Pattern pattern) public void Mask (Pattern pattern)
{ {
ThrowIfDisposed();
NativeMethods.cairo_mask (handle, pattern.Handle); NativeMethods.cairo_mask (handle, pattern.Handle);
} }
public void MaskSurface (Surface surface, double surface_x, double surface_y) public void MaskSurface (Surface surface, double surface_x, double surface_y)
{ {
ThrowIfDisposed();
NativeMethods.cairo_mask_surface (handle, surface.Handle, surface_x, surface_y); NativeMethods.cairo_mask_surface (handle, surface.Handle, surface_x, surface_y);
} }
public void Stroke () public void Stroke ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_stroke (handle); NativeMethods.cairo_stroke (handle);
} }
public void StrokePreserve () public void StrokePreserve ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_stroke_preserve (handle); NativeMethods.cairo_stroke_preserve (handle);
} }
public Rectangle StrokeExtents () public Rectangle StrokeExtents ()
{ {
ThrowIfDisposed();
double x1, y1, x2, y2; double x1, y1, x2, y2;
NativeMethods.cairo_stroke_extents (handle, out x1, out y1, out x2, out y2); NativeMethods.cairo_stroke_extents (handle, out x1, out y1, out x2, out y2);
return new Rectangle (x1, y1, x2 - x1, y2 - y1); return new Rectangle (x1, y1, x2 - x1, y2 - y1);
@ -527,6 +576,7 @@ namespace Cairo {
public void Fill () public void Fill ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_fill (handle); NativeMethods.cairo_fill (handle);
} }
@ -539,6 +589,7 @@ namespace Cairo {
public void FillPreserve () public void FillPreserve ()
{ {
ThrowIfDisposed();
NativeMethods.cairo_fill_preserve (handle); NativeMethods.cairo_fill_preserve (handle);
} }

View File

@ -0,0 +1,13 @@
using System;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
namespace System.Linq.Expressions {
public partial class LambdaExpression {
public void CompileToMethod (MethodBuilder method) => throw new PlatformNotSupportedException ();
public void CompileToMethod (MethodBuilder method, DebugInfoGenerator debugInfoGenerator) => throw new PlatformNotSupportedException ();
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Reflection.Emit;
using System.Linq.Expressions;
namespace System.Runtime.CompilerServices {
public partial class RuntimeOps {
[Obsolete ("do not use this method")]
public static IRuntimeVariables MergeRuntimeVariables (IRuntimeVariables first, IRuntimeVariables second, int[] indexes) => throw new PlatformNotSupportedException ();
[Obsolete ("do not use this method")]
public static Expression Quote (Expression expression, object hoistedLocals, object[] locals) => throw new PlatformNotSupportedException ();
}
}

View File

@ -1,3 +1,4 @@
#include common_System.Core.dll.sources #include common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources #include interpreter_System.Core.dll.sources
#include pipes_pns.sources #include pipes_pns.sources
#include sre_pns.sources

View File

@ -0,0 +1,2 @@
System.Linq.Expressions/LambdaExpression.NotSupported.cs
System.Runtime.CompilerServices/RuntimeOps.NotSupported.cs

View File

@ -1 +1 @@
1645b18a9d8dda6529e3cdae726e1c21a2227ba7 9dc03b0dca3a091e4ac2ddd5d728e3d26a5d932e

View File

@ -1 +1 @@
7a576bb41bd21859526feae7b08e48e9b31fa50c 04f97c37b51e418ea1af197553131047499cab62

View File

@ -1 +1 @@
be39720ce0c5b32ef632aa70f2e4559d7c10b573 296b6252413645b66b0b30a8113ce75b75c11cd9

View File

@ -1 +1 @@
5594789749490508283bf82b09672da5f4310d25 57ded3591080d30e69c5d29606e1f6791f91ce66

View File

@ -1 +1 @@
3793ea7f306407ceac890e0dc1f0048946374e59 3202e79921954dba22d63ecbf2f8fcddcbcb16a2

View File

@ -1 +1 @@
5dcca253494d6da57816a6e9c9702b3a3a4723e4 aaee731cfa5a449be1adca8388869d1139f5fcc9

View File

@ -1 +1 @@
042d381ea6d1a6bc1d3ca453f46804a982a2bdbf 819f1d6e5fa5d08eb07aec3b576abadfd5b04f19

View File

@ -1 +1 @@
1645b18a9d8dda6529e3cdae726e1c21a2227ba7 9dc03b0dca3a091e4ac2ddd5d728e3d26a5d932e

View File

@ -1 +1 @@
7a576bb41bd21859526feae7b08e48e9b31fa50c 04f97c37b51e418ea1af197553131047499cab62

View File

@ -1 +1 @@
be39720ce0c5b32ef632aa70f2e4559d7c10b573 296b6252413645b66b0b30a8113ce75b75c11cd9

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