diff --git a/BuildToolsVersion.txt b/BuildToolsVersion.txt
index c62266d1d755..f8f308481e6f 100644
--- a/BuildToolsVersion.txt
+++ b/BuildToolsVersion.txt
@@ -1 +1 @@
-2.0.0-prerelease-02014-02
+2.0.0-prerelease-02020-01
diff --git a/dependencies.props b/dependencies.props
index 6852b1d6207d..5d9fbb07db1f 100644
--- a/dependencies.props
+++ b/dependencies.props
@@ -9,29 +9,29 @@
These ref versions are pulled from https://github.com/dotnet/versions.
-->
- ab762a3c35e208cd698988fb7761bc92be417be9
- 03b82d8284524a8a14ecea71deb2601b0c21c2cb
- 568fb017cade704dcf611a1c991e7b8e2e27972b
+ ed8cf4ba3c0e143c142542aaf53a8cdaa6cb0023
+ 790f084a4cfcc9f4559edc92988809906ebb6b6b
+ 790f084a4cfcc9f4559edc92988809906ebb6b6b
96dc7805f5df4a70a55783964ce69dcd91bfca80
- 568fb017cade704dcf611a1c991e7b8e2e27972b
- 568fb017cade704dcf611a1c991e7b8e2e27972b
+ f67e34b392960a4fcc1da7fdb7a8082ae031471d
+ f67e34b392960a4fcc1da7fdb7a8082ae031471d
8bd1ec5fac9f0eec34ff6b34b1d878b4359e02dd
- 7ad3a5fba96f1ad3032fe742bee5069b5167beca
- 2a83ae1685d323e6bd206dd2596b953488479922
+ 41dcb6f6c972d9900b4bf8dc9b9352ceabdec66e
+ 8cd983ea0756ec0b094cce18c820b9d1b9d2b107
- 2.1.0-preview1-25712-02
- preview1-25712-02
- 2.1.0-preview1-25715-02
+ 2.1.0-preview1-25718-03
+ preview1-25718-03
+ 2.1.0-preview1-25720-03
beta-25627-00
- beta-25715-00
- beta-25715-00
- 1.0.0-beta-25715-00
- 2.1.0-preview1-25714-01
+ beta-25723-00
+ beta-25723-00
+ 1.0.0-beta-25723-00
+ 2.1.0-preview1-25722-01
NETStandard.Library
- 2.1.0-preview1-25714-02
+ 2.1.0-preview1-25719-04
4.4.0
diff --git a/dir.props b/dir.props
index aebbb9ba6849..5c90cfc83ce0 100644
--- a/dir.props
+++ b/dir.props
@@ -297,6 +297,6 @@
-
-
+
+
diff --git a/external/test-runtime/XUnit.Runtime.depproj b/external/test-runtime/XUnit.Runtime.depproj
index ad997092240a..643c7f2e51d5 100644
--- a/external/test-runtime/XUnit.Runtime.depproj
+++ b/external/test-runtime/XUnit.Runtime.depproj
@@ -76,7 +76,7 @@
1.0.0-prerelease
- 1.0.3
+ 1.0.6
diff --git a/external/test-runtime/optional.json b/external/test-runtime/optional.json
index 25a480967be9..eb307ecf8f71 100644
--- a/external/test-runtime/optional.json
+++ b/external/test-runtime/optional.json
@@ -3,9 +3,9 @@
"net45": {
"dependencies": {
"Microsoft.DotNet.IBCMerge": "4.6.0-alpha-00001",
- "TestILC.amd64ret": "1.0.0-beta-25715-00",
- "TestILC.armret": "1.0.0-beta-25715-00",
- "TestILC.x86ret": "1.0.0-beta-25715-00"
+ "TestILC.amd64ret": "1.0.0-beta-25723-00",
+ "TestILC.armret": "1.0.0-beta-25723-00",
+ "TestILC.x86ret": "1.0.0-beta-25723-00"
}
}
}
diff --git a/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj b/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj
index f7d45d979ffa..c2e8ce256ab8 100644
--- a/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj
+++ b/pkg/Microsoft.NETFramework.Compatibility/Microsoft.NETFramework.Compatibility.pkgproj
@@ -44,6 +44,7 @@
+
diff --git a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
index 7c6c3a1eca26..eb994241cb86 100644
--- a/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
+++ b/pkg/Microsoft.Private.PackageBaseline/packageIndex.json
@@ -1577,6 +1577,12 @@
"4.2.0.0": "4.5.0"
}
},
+ "System.Data.Odbc": {
+ "InboxOn": {},
+ "AssemblyVersionInPackageVersion": {
+ "4.0.0.0": "4.5.0"
+ }
+ },
"System.Drawing.Common": {
"InboxOn": {},
"AssemblyVersionInPackageVersion": {
@@ -5439,4 +5445,4 @@
"System.Xml.XDocument"
]
}
-}
\ No newline at end of file
+}
diff --git a/pkg/descriptions.json b/pkg/descriptions.json
index 4c905c08006a..725deb8faf32 100644
--- a/pkg/descriptions.json
+++ b/pkg/descriptions.json
@@ -454,6 +454,19 @@
"System.Data.TypedTableBaseExtensions"
]
},
+ {
+ "Name": "System.Data.Odbc",
+ "Description": "Provides a collection of classes used to access an ODBC data source in the managed space",
+ "CommonTypes": [
+ "System.Data.Odbc.OdbcCommand",
+ "System.Data.Odbc.OdbcConnection",
+ "System.Data.Odbc.OdbcDataReader",
+ "System.Data.Odbc.OdbcDataAdapter",
+ "System.Data.Odbc.OdbcParameter",
+ "System.Data.Odbc.OdbcParameterCollection",
+ "System.Data.Odbc.OdbcTransaction"
+ ]
+ },
{
"Name": "System.Data.SqlClient",
"Description": "Provides the data provider for SQL Server. These classes provide access to versions of SQL Server and encapsulate database-specific protocols, including tabular data stream (TDS)",
diff --git a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs
index d9d713d4c428..2b87afa3c764 100644
--- a/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs
+++ b/src/Common/src/Interop/Linux/procfs/Interop.ProcFsStat.cs
@@ -14,13 +14,15 @@ internal static partial class Interop
internal static partial class procfs
{
internal const string RootPath = "/proc/";
- internal const string SelfExeFilePath = RootPath + "self/exe";
- internal const string ProcUptimeFilePath = RootPath + "uptime";
+ private const string ExeFileName = "/exe";
private const string StatFileName = "/stat";
private const string MapsFileName = "/maps";
private const string FileDescriptorDirectoryName = "/fd/";
private const string TaskDirectoryName = "/task/";
+ internal const string SelfExeFilePath = RootPath + "self" + ExeFileName;
+ internal const string ProcUptimeFilePath = RootPath + "uptime";
+
internal struct ParsedStat
{
// Commented out fields are available in the stat data file but
@@ -80,6 +82,11 @@ internal struct ParsedMapsModule
internal KeyValuePair AddressRange;
}
+ internal static string GetExeFilePathForProcess(int pid)
+ {
+ return RootPath + pid.ToString(CultureInfo.InvariantCulture) + ExeFileName;
+ }
+
internal static string GetStatFilePathForProcess(int pid)
{
return RootPath + pid.ToString(CultureInfo.InvariantCulture) + StatFileName;
diff --git a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
index a2f601eb437f..b8a610af19cb 100644
--- a/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
+++ b/src/Common/src/Interop/Unix/System.Native/Interop.MountPoints.FormatInfo.cs
@@ -21,53 +21,101 @@ internal static partial class Sys
///
internal enum UnixFileSystemTypes : long
{
- adfs = 0xadf5,
+ adfs = 0xADF5,
affs = 0xADFF,
+ afs = 0x5346414F,
+ anoninode = 0x09041934,
+ aufs = 0x61756673,
+ autofs = 0x0187,
befs = 0x42465331,
+ bdevfs = 0x62646576,
bfs = 0x1BADFACE,
+ binfmt_misc = 0x42494E4D,
+ btrfs = 0x9123683E,
+ ceph = 0x00C36400,
+ cgroupfs = 0x0027E0EB,
cifs = 0xFF534D42,
coda = 0x73757245,
coherent = 0x012FF7B7,
- cramfs = 0x28cd3d45,
+ cramfs = 0x28CD3D45,
+ debugfs = 0x64626720,
devfs = 0x1373,
+ devpts = 0x1CD1,
+ ecryptfs = 0xF15F,
efs = 0x00414A53,
ext = 0x137D,
ext2_old = 0xEF51,
ext2 = 0xEF53,
ext3 = 0xEF53,
ext4 = 0xEF53,
+ fat = 0x4006,
+ fhgfs = 0x19830326,
+ fuseblk = 0x65735546,
+ fusectl = 0x65735543,
+ futexfs = 0x0BAD1DEA,
+ gfsgfs2 = 0x1161970,
+ gpfs = 0x47504653,
hfs = 0x4244,
hpfs = 0xF995E849,
- hugetlbfs = 0x958458f6,
+ hugetlbfs = 0x958458F6,
+ inodefs = 0x11307854,
+ inotifyfs = 0x2BAD1DEA,
isofs = 0x9660,
- jffs2 = 0x72b6,
- jfs = 0x3153464a,
+ // isofs = 0x4004, // R_WIN
+ // isofs = 0x4000, // WIN
+ jffs = 0x07C0,
+ jffs2 = 0x72B6,
+ jfs = 0x3153464A,
+ kafs = 0x6B414653,
+ lustre = 0x0BD00BD0,
minix_old = 0x137F, /* orig. minix */
minix = 0x138F, /* 30 char minix */
minix2 = 0x2468, /* minix V2 */
- minix2v2 = 0x2478, /* minix V2, 30 char names */
- msdos = 0x4d44,
- ncpfs = 0x564c,
+ minix2v2 = 0x2478, /* MINIX V2, 30 char names */
+ minix3 = 0x4D5A,
+ mqueue = 0x19800202,
+ msdos = 0x4D44,
nfs = 0x6969,
- ntfs = 0x5346544e,
- openprom = 0x9fa1,
- overlay = 0x794c7630,
- overlayfs = 0x794c764f,
- proc = 0x9fa0,
- qnx4 = 0x002f,
+ nfsd = 0x6E667364,
+ nilfs = 0x3434,
+ novell = 0x564C,
+ ntfs = 0x5346544E,
+ openprom = 0x9FA1,
+ ocfs2 = 0x7461636F,
+ overlay = 0x794C7630,
+ overlayfs = 0x794C764F,
+ panfs = 0xAAD7AAEA,
+ pipefs = 0x50495045,
+ proc = 0x9FA0,
+ pstorefs = 0x6165676C,
+ qnx4 = 0x002F,
+ qnx6 = 0x68191122,
+ ramfs = 0x858458F6,
reiserfs = 0x52654973,
romfs = 0x7275,
+ rpc_pipefs = 0x67596969,
+ securityfs = 0x73636673,
+ selinux = 0xF97CFF8C,
smb = 0x517B,
+ sockfs = 0x534F434B,
+ squashfs = 0x73717368,
+ sysfs = 0x62656572,
sysv2 = 0x012FF7B6,
sysv4 = 0x012FF7B5,
tmpfs = 0x01021994,
udf = 0x15013346,
ufs = 0x00011954,
- usbdevice = 0x9fa2,
- vxfs = 0xa501FCF5,
+ // ufs = 0x54190100, // byteswapped
+ usbdevice = 0x9FA2,
+ v9fs = 0x01021997,
+ vmhgfs = 0xBACBACBC,
+ vxfs = 0xA501FCF5,
+ vzfs = 0x565A4653,
+ xenfs = 0xABBA1974,
xenix = 0x012FF7B4,
xfs = 0x58465342,
- xiafs = 0x012FD16D,
+ xia = 0x012FD16D,
+ zfs = 0x2FC12FC1,
}
[StructLayout(LayoutKind.Sequential)]
@@ -130,7 +178,7 @@ private static int GetFormatInfoForMountPoint(string name, out string format, ou
/// The recognized drive type.
private static DriveType GetDriveType(string fileSystemName)
{
- // This list is based primarily on "man fs", "man mount", "mntent.h", "/proc/filesystems",
+ // This list is based primarily on "man fs", "man mount", "mntent.h", "/proc/filesystems", coreutils "stat.c",
// and "wiki.debian.org/FileSystem". It can be extended over time as we
// find additional file systems that should be recognized as a particular drive type.
switch (fileSystemName)
@@ -143,91 +191,154 @@ private static DriveType GetDriveType(string fileSystemName)
case "umview-mod-umfuseiso9660":
return DriveType.CDRom;
+ case "aafs":
case "adfs":
case "affs":
+ case "anoninode":
+ case "anon-inode FS":
case "apfs":
+ case "autofs":
+ case "balloon-kvm-fs":
+ case "bdevfs":
case "befs":
case "bfs":
+ case "bpf_fs":
case "btrfs":
+ case "btrfs_test":
+ case "cgroup2fs":
+ case "cgroupfs":
+ case "coh":
+ case "cramfs":
+ case "cramfs-wend":
+ case "daxfs":
case "drvfs":
case "ecryptfs":
+ case "efivarfs":
case "efs":
+ case "exofs":
case "ext":
case "ext2":
case "ext2_old":
case "ext3":
+ case "ext2/ext3":
case "ext4":
case "ext4dev":
+ case "f2fs":
case "fat":
- case "fuseblk":
case "fuseext2":
case "fusefat":
+ case "futexfs":
case "hfs":
+ case "hfs+":
case "hfsplus":
+ case "hfsx":
+ case "hostfs":
case "hpfs":
+ case "inodefs":
+ case "inotifyfs":
case "jbd":
case "jbd2":
- case "jfs":
case "jffs":
case "jffs2":
+ case "jfs":
+ case "logfs":
case "lxfs":
+ case "minix (30 char.)":
+ case "minix v2 (30 char.)":
+ case "minix v2":
case "minix":
case "minix_old":
case "minix2":
case "minix2v2":
+ case "minix3":
+ case "mlfs":
case "msdos":
+ case "nilfs":
+ case "nsfs":
+ case "ntfs":
case "ocfs2":
case "omfs":
case "openprom":
case "overlay":
case "overlayfs":
- case "ntfs":
+ case "pstorefs":
case "qnx4":
+ case "qnx6":
case "reiserfs":
+ case "rpc_pipefs":
+ case "selinux":
+ case "smackfs":
case "squashfs":
case "swap":
+ case "sysfs":
case "sysv":
+ case "sysv2":
+ case "sysv4":
+ case "tracefs":
case "ubifs":
case "udf":
case "ufs":
case "umsdos":
case "umview-mod-umfuseext2":
+ case "usbdevfs":
+ case "v9fs":
+ case "vzfs":
+ case "wslfs":
+ case "xenfs":
case "xenix":
case "xfs":
+ case "xia":
case "xiafs":
case "xmount":
+ case "zfs":
case "zfs-fuse":
+ case "zsmallocfs":
return DriveType.Fixed;
case "9p":
- case "autofs":
+ case "acfs":
+ case "afs":
+ case "aufs":
case "autofs4":
case "beaglefs":
+ case "ceph":
case "cifs":
case "coda":
case "coherent":
case "curlftpfs":
case "davfs2":
case "dlm":
+ case "fhgfs":
case "flickrfs":
+ case "fuseblk":
case "fusedav":
case "fusesmb":
+ case "gfsgfs2":
+ case "gfs/gfs2":
case "gfs2":
case "glusterfs-client":
case "gmailfs":
+ case "gpfs":
+ case "ibrix":
+ case "k-afs":
case "kafs":
case "ltspfs":
+ case "lustre":
case "ncpfs":
case "nfs":
case "nfs4":
+ case "nfsd":
+ case "novell":
case "obexfs":
+ case "panfs":
+ case "prl_fs":
case "s3ql":
case "smb":
+ case "smb2":
case "smbfs":
+ case "snfs":
case "sshfs":
- case "sysfs":
- case "sysv2":
- case "sysv4":
+ case "vmhgfs":
case "vxfs":
case "wikipediafs":
return DriveType.Network;
@@ -239,7 +350,6 @@ private static DriveType GetDriveType(string fileSystemName)
case "binfmt_misc":
case "cgroup":
case "configfs":
- case "cramfs":
case "cryptkeeper":
case "cpuset":
case "debugfs":
diff --git a/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs b/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs
index c6ba2496bec7..053d7e824f4a 100644
--- a/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs
+++ b/src/Common/src/Interop/Windows/kernel32/Interop.FlushViewOfFile.cs
@@ -9,7 +9,7 @@ internal partial class Interop
{
internal partial class Kernel32
{
- [DllImport(Libraries.Kernel32)]
- internal extern static int FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush);
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal extern static bool FlushViewOfFile(IntPtr lpBaseAddress, UIntPtr dwNumberOfBytesToFlush);
}
}
diff --git a/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs b/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs
index 8895ac80e6a7..2a1879fa30a9 100644
--- a/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs
+++ b/src/Common/src/Interop/Windows/kernel32/Interop.UnmapViewOfFile.cs
@@ -9,7 +9,7 @@ internal partial class Interop
{
internal partial class Kernel32
{
- [DllImport(Libraries.Kernel32)]
- internal extern static int UnmapViewOfFile(IntPtr lpBaseAddress);
+ [DllImport(Libraries.Kernel32, SetLastError = true)]
+ internal extern static bool UnmapViewOfFile(IntPtr lpBaseAddress);
}
}
diff --git a/src/Common/src/System/Net/Http/WinHttpException.cs b/src/Common/src/System/Net/Http/WinHttpException.cs
index 1a4bcf8f5272..d77e3471351f 100644
--- a/src/Common/src/System/Net/Http/WinHttpException.cs
+++ b/src/Common/src/System/Net/Http/WinHttpException.cs
@@ -15,6 +15,11 @@ public WinHttpException(int error, string message) : base(error, message)
this.HResult = ConvertErrorCodeToHR(error);
}
+ public WinHttpException(int error, string message, Exception innerException) : base(message, innerException)
+ {
+ this.HResult = ConvertErrorCodeToHR(error);
+ }
+
public static int ConvertErrorCodeToHR(int error)
{
// This method allows common error detection code to be used by consumers
@@ -52,6 +57,13 @@ public static WinHttpException CreateExceptionUsingError(int error)
return e;
}
+ public static WinHttpException CreateExceptionUsingError(int error, Exception innerException)
+ {
+ var e = new WinHttpException(error, GetErrorMessage(error), innerException);
+ ExceptionStackTrace.AddCurrentStack(e);
+ return e;
+ }
+
public static string GetErrorMessage(int error)
{
// Look up specific error message in WINHTTP.DLL since it is not listed in default system resources
diff --git a/src/Common/tests/System/Buffers/NativeOwnedMemory.cs b/src/Common/tests/System/Buffers/NativeOwnedMemory.cs
index 3058add17c19..31d90b35bfe4 100644
--- a/src/Common/tests/System/Buffers/NativeOwnedMemory.cs
+++ b/src/Common/tests/System/Buffers/NativeOwnedMemory.cs
@@ -51,7 +51,7 @@ protected override bool IsRetained
}
}
- public override unsafe Span AsSpan() => new Span((void*)_ptr, _length);
+ public override unsafe Span Span => new Span((void*)_ptr, _length);
public override unsafe MemoryHandle Pin() => new MemoryHandle(this, (void*)_ptr);
diff --git a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
index 97be5d7274c5..9f9f65465c80 100644
--- a/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
+++ b/src/CoreFx.Private.TestUtilities/ref/CoreFx.Private.TestUtilities.cs
@@ -77,6 +77,9 @@ public static partial class PlatformDetection
public static Version ICUVersion { get { return null; } }
public static bool IsUbuntu { get { throw null; } }
public static bool IsUbuntu1404 { get { throw null; } }
+ public static bool IsUbuntu1604 { get { throw null; } }
+ public static bool IsUbuntu1704 { get { throw null; } }
+ public static bool IsUbuntu1710 { get { throw null; } }
public static bool IsWindows { get { throw null; } }
public static bool IsWindows10InsiderPreviewBuild16215OrGreater { get { throw null; } }
public static bool IsWindows10Version1607OrGreater { get { throw null; } }
@@ -131,6 +134,7 @@ protected RemoteExecutorTestBase() { }
public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func method, string arg1, string arg2, string arg3, string arg4, string arg5, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func> method, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
+ public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvoke(System.Func> method, string arg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
public static System.Diagnostics.RemoteExecutorTestBase.RemoteInvokeHandle RemoteInvokeRaw(System.Delegate method, string unparsedArg, System.Diagnostics.RemoteInvokeOptions options=null) { throw null; }
public sealed partial class RemoteInvokeHandle : System.IDisposable
{
diff --git a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
index 78ceb4a99712..9ff440256c1c 100644
--- a/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
+++ b/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs
@@ -42,6 +42,17 @@ public static RemoteInvokeHandle RemoteInvoke(
return RemoteInvoke(GetMethodInfo(method), Array.Empty(), options);
}
+ /// Invokes the method from this assembly in another process using the specified arguments.
+ /// The method to invoke.
+ /// Options to use for the invocation.
+ public static RemoteInvokeHandle RemoteInvoke(
+ Func> method,
+ string arg,
+ RemoteInvokeOptions options = null)
+ {
+ return RemoteInvoke(GetMethodInfo(method), new[] { arg }, options);
+ }
+
/// Invokes the method from this assembly in another process using the specified arguments.
/// The method to invoke.
/// The first argument to pass to the method.
diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs
index b606cb5ee982..abb86f939948 100644
--- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs
+++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Unix.cs
@@ -33,6 +33,9 @@ public static partial class PlatformDetection
public static bool IsDebian => IsDistroAndVersion("debian");
public static bool IsDebian8 => IsDistroAndVersion("debian", "8");
public static bool IsUbuntu1404 => IsDistroAndVersion("ubuntu", "14.04");
+ public static bool IsUbuntu1604 => IsDistroAndVersion("ubuntu", "16.04");
+ public static bool IsUbuntu1704 => IsDistroAndVersion("ubuntu", "17.04");
+ public static bool IsUbuntu1710 => IsDistroAndVersion("ubuntu", "17.10");
public static bool IsCentos7 => IsDistroAndVersion("centos", "7");
public static bool IsTizen => IsDistroAndVersion("tizen");
public static bool IsNotFedoraOrRedHatOrCentos => !IsDistroAndVersion("fedora") && !IsDistroAndVersion("rhel") && !IsDistroAndVersion("centos");
diff --git a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs
index 9d93f3c45e5a..ce31c9965a0a 100644
--- a/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs
+++ b/src/CoreFx.Private.TestUtilities/src/System/PlatformDetection.Windows.cs
@@ -21,6 +21,9 @@ public static partial class PlatformDetection
public static bool IsDebian => false;
public static bool IsDebian8 => false;
public static bool IsUbuntu1404 => false;
+ public static bool IsUbuntu1604 => false;
+ public static bool IsUbuntu1704 => false;
+ public static bool IsUbuntu1710 => false;
public static bool IsCentos7 => false;
public static bool IsTizen => false;
public static bool IsNotFedoraOrRedHatOrCentos => true;
diff --git a/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets b/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets
index 54dfbfe6508d..ce4649910de2 100644
--- a/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets
+++ b/src/Microsoft.XmlSerializer.Generator/pkg/GenerateNupkgProps.targets
@@ -20,9 +20,6 @@
<ItemGroup>
<DotNetCliToolReference Include="$(Id)" Version="$(PackageVersion)" />
</ItemGroup>
- <ItemGroup>
- <None Condition="Exists('%24(OutputPath)\%24(AssemblyName).XmlSerializers.dll')=='true'" Include="%24(OutputPath)\%24(AssemblyName).XmlSerializers.dll" Pack="true" PackagePath="lib\netstandard2.0" />
- </ItemGroup>
</Project>
diff --git a/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets b/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets
index fe8bf38787f0..8ebc0d32c436 100644
--- a/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets
+++ b/src/Microsoft.XmlSerializer.Generator/pkg/build/Microsoft.XmlSerializer.Generator.targets
@@ -11,7 +11,7 @@
-
+
@@ -21,4 +21,7 @@
+
+
+
\ No newline at end of file
diff --git a/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs b/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs
index 28cc23e81e4d..ae28c4bc974f 100644
--- a/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs
+++ b/src/Microsoft.XmlSerializer.Generator/src/Sgen.cs
@@ -28,6 +28,7 @@ private int Run(string[] args)
var errs = new ArrayList();
bool force = false;
bool proxyOnly = false;
+ bool disableRun = true;
try
{
@@ -85,6 +86,10 @@ private int Run(string[] args)
assembly = value;
}
+ else if (ArgumentMatch(arg, "quiet"))
+ {
+ disableRun = false;
+ }
else
{
if (arg.EndsWith(".dll") || arg.EndsWith(".exe"))
@@ -122,6 +127,14 @@ private int Run(string[] args)
return 0;
}
+ if(disableRun)
+ {
+ Console.WriteLine("This tool is not intended to be used directly.");
+ Console.WriteLine("The feature is still under development.");
+ Console.WriteLine("Please refer to https://go.microsoft.com/fwlink/?linkid=858539 for more detail.");
+ return 0;
+ }
+
GenerateFile(types, assembly, proxyOnly, force, codePath);
}
catch (Exception e)
diff --git a/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj b/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj
index 52084587be8f..83e46880c330 100644
--- a/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj
+++ b/src/Microsoft.XmlSerializer.Generator/tests/Microsoft.XmlSerializer.Generator.Tests.csproj
@@ -54,7 +54,7 @@
$(AssemblyName).XmlSerializers
-
+
Padded head and tail indices, to avoid false sharing between producers and consumers.
[DebuggerDisplay("Head = {Head}, Tail = {Tail}")]
- [StructLayout(LayoutKind.Explicit, Size = 192)] // padding before/between/after fields based on typical cache line size of 64
+ [StructLayout(LayoutKind.Explicit, Size = 384)] // padding before/between/after fields based on worst case cache line size of 128
internal struct PaddedHeadAndTail
{
- [FieldOffset(64)] public int Head;
- [FieldOffset(128)] public int Tail;
+ [FieldOffset(128)] public int Head;
+ [FieldOffset(256)] public int Tail;
}
}
diff --git a/src/System.Collections.Immutable/src/PEVerifyCompat.rsp b/src/System.Collections.Immutable/src/PEVerifyCompat.rsp
new file mode 100644
index 000000000000..0a7805fa7ae9
--- /dev/null
+++ b/src/System.Collections.Immutable/src/PEVerifyCompat.rsp
@@ -0,0 +1 @@
+/features:peverify-compat
\ No newline at end of file
diff --git a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj
index 457c68c3a80a..e33534057228 100644
--- a/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj
+++ b/src/System.Collections.Immutable/src/System.Collections.Immutable.csproj
@@ -9,6 +9,7 @@
512
$(OutputPath)$(MSBuildProjectName).xml
False
+ $(MSBuildThisFileDirectory)PEVerifyCompat.rsp;$(CompilerResponseFile)
netstandard1.0;portable-net45+win8+wp8+wpa81
diff --git a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs
index 5e92ae53303e..dfa77cce24dc 100644
--- a/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs
+++ b/src/System.Collections.Immutable/src/System/Collections/Immutable/ImmutableInterlocked.cs
@@ -423,7 +423,7 @@ public static bool TryRemove(ref ImmutableDictionary
#region ImmutableStack members
///
- /// Pushes a new element onto a stack.
+ /// Pops the top element off a stack and returns it to the caller, if the stack is not empty.
///
/// The type of elements stored in the stack.
/// The variable or field to atomically update.
diff --git a/src/System.Collections/src/System/Collections/Generic/HashSet.cs b/src/System.Collections/src/System/Collections/Generic/HashSet.cs
index 1228e55072d4..ece16c972efd 100644
--- a/src/System.Collections/src/System/Collections/Generic/HashSet.cs
+++ b/src/System.Collections/src/System/Collections/Generic/HashSet.cs
@@ -1148,7 +1148,7 @@ private void IncreaseCapacity()
}
// Able to increase capacity; copy elements to larger array and rehash
- SetCapacity(newSize, false);
+ SetCapacity(newSize);
}
///
@@ -1156,7 +1156,7 @@ private void IncreaseCapacity()
/// *must* be a prime. It is very likely that you want to call IncreaseCapacity()
/// instead of this method.
///
- private void SetCapacity(int newSize, bool forceNewHashCodes)
+ private void SetCapacity(int newSize)
{
Debug.Assert(_buckets != null, "SetCapacity called on a set with no elements");
@@ -1166,21 +1166,6 @@ private void SetCapacity(int newSize, bool forceNewHashCodes)
Array.Copy(_slots, 0, newSlots, 0, _lastIndex);
}
-#if FEATURE_RANDOMIZED_STRING_HASHING
- if (forceNewHashCodes)
- {
- for (int i = 0; i < _lastIndex; i++)
- {
- if (newSlots[i].hashCode != -1)
- {
- newSlots[i].hashCode = InternalGetHashCode(newSlots[i].value);
- }
- }
- }
-#else
- Debug.Assert(!forceNewHashCodes);
-#endif
-
int[] newBuckets = new int[newSize];
for (int i = 0; i < _lastIndex; i++)
{
@@ -1207,18 +1192,13 @@ private bool AddIfNotPresent(T value)
int hashCode = InternalGetHashCode(value);
int bucket = hashCode % _buckets.Length;
-#if FEATURE_RANDOMIZED_STRING_HASHING
- int collisionCount = 0;
-#endif
+
for (int i = _buckets[bucket] - 1; i >= 0; i = _slots[i].next)
{
if (_slots[i].hashCode == hashCode && _comparer.Equals(_slots[i].value, value))
{
return false;
}
-#if FEATURE_RANDOMIZED_STRING_HASHING
- collisionCount++;
-#endif
}
int index;
@@ -1245,14 +1225,6 @@ private bool AddIfNotPresent(T value)
_count++;
_version++;
-#if FEATURE_RANDOMIZED_STRING_HASHING
- if (collisionCount > HashHelpers.HashCollisionThreshold && HashHelpers.IsWellKnownEqualityComparer(_comparer))
- {
- _comparer = (IEqualityComparer)HashHelpers.GetRandomizedEqualityComparer(_comparer);
- SetCapacity(_buckets.Length, true);
- }
-#endif // FEATURE_RANDOMIZED_STRING_HASHING
-
return true;
}
diff --git a/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs b/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs
index 012b6ea01c97..06f4ba0ccb00 100644
--- a/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs
+++ b/src/System.ComponentModel.Annotations/src/System/ComponentModel/DataAnnotations/MaxLengthAttribute.cs
@@ -122,12 +122,24 @@ public static bool TryGetCount(object value, out int count)
return true;
}
- PropertyInfo property = value.GetType().GetRuntimeProperty("Count");
+ PropertyInfo property = null;
+ try
+ {
+ // On CoreRT, this property may not be enabled for reflection.
+ // It may be possible to eliminate the exception by using direct reflection
+ // (i.e. not via the RuntimeReflectionExtensions or the new split TypeInfo format.
+ property = value.GetType().GetRuntimeProperty("Count");
+ }
+ catch (TypeAccessException)
+ {
+ }
+
if (property != null && property.CanRead && property.PropertyType == typeof(int))
{
count = (int)property.GetValue(value);
return true;
}
+
count = -1;
return false;
}
diff --git a/src/System.Data.Odbc/dir.props b/src/System.Data.Odbc/dir.props
index af5b29338515..4356decc45ef 100644
--- a/src/System.Data.Odbc/dir.props
+++ b/src/System.Data.Odbc/dir.props
@@ -2,7 +2,7 @@
- 4.0.1.0
+ 4.0.0.0
Open
\ No newline at end of file
diff --git a/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj b/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj
new file mode 100644
index 000000000000..c0232ef4ea44
--- /dev/null
+++ b/src/System.Data.Odbc/pkg/System.Data.Odbc.pkgproj
@@ -0,0 +1,11 @@
+
+
+
+
+
+ net461;netcoreapp2.0;$(AllXamarinFrameworks)
+
+
+
+
+
diff --git a/src/System.Data.Odbc/src/Configurations.props b/src/System.Data.Odbc/src/Configurations.props
index 34857a0ae48e..8c227f14fcd1 100644
--- a/src/System.Data.Odbc/src/Configurations.props
+++ b/src/System.Data.Odbc/src/Configurations.props
@@ -3,6 +3,7 @@
netfx-Windows_NT;
+ netstandard;
netstandard-Linux;
netstandard-OSX;
netstandard-Windows_NT;
diff --git a/src/System.Data.Odbc/src/Resources/Strings.resx b/src/System.Data.Odbc/src/Resources/Strings.resx
index a0981e69ba2f..7c1d6f4331dd 100644
--- a/src/System.Data.Odbc/src/Resources/Strings.resx
+++ b/src/System.Data.Odbc/src/Resources/Strings.resx
@@ -429,4 +429,7 @@
An internal connection does not have an owner.
+
+ System.Data.ODBC is not supported on this platform.
+
\ No newline at end of file
diff --git a/src/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/System.Data.Odbc/src/System.Data.Odbc.csproj
index 43dbb34d2a82..e24e87e76ce8 100644
--- a/src/System.Data.Odbc/src/System.Data.Odbc.csproj
+++ b/src/System.Data.Odbc/src/System.Data.Odbc.csproj
@@ -6,6 +6,7 @@
System.Data.Odbc
true
true
+ SR.Odbc_PlatformNotSupported
@@ -15,7 +16,7 @@
-
+
Common\System\Data\Common\AdapterUtil.cs
diff --git a/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs b/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs
index 0bc0df2c97ac..f5c03bb81cf8 100644
--- a/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs
+++ b/src/System.Data.SqlClient/src/System/Data/SqlClient/SqlInternalConnectionTds.cs
@@ -1416,7 +1416,7 @@ TimeoutTimer timeout
// Determine unit interval
if (timeout.IsInfinite)
{
- timeoutUnitInterval = checked((long)ADP.FailoverTimeoutStep * ADP.TimerFromSeconds(ADP.DefaultConnectionTimeout));
+ timeoutUnitInterval = checked((long)(ADP.FailoverTimeoutStep * ADP.TimerFromSeconds(ADP.DefaultConnectionTimeout)));
}
else
{
diff --git a/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs b/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs
new file mode 100644
index 000000000000..ac72f03d1c0d
--- /dev/null
+++ b/src/System.Data.SqlClient/tests/ManualTests/SQL/MirroringTest/ConnectionOnMirroringTest.cs
@@ -0,0 +1,97 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+
+namespace System.Data.SqlClient.ManualTesting.Tests
+{
+ public static class ConnectionOnMirroringTest
+ {
+ private static ManualResetEvent workerCompletedEvent = new ManualResetEvent(false);
+
+ [CheckConnStrSetupFact]
+ public static void TestMultipleConnectionToMirroredServer()
+ {
+ string mirroringStateDesc;
+ string failoverPartnerName;
+ bool isMirroring = GetMirroringInfo(DataTestUtility.TcpConnStr, out mirroringStateDesc, out failoverPartnerName);
+ bool isSynchronized = "SYNCHRONIZED".Equals(mirroringStateDesc, StringComparison.InvariantCultureIgnoreCase);
+ if (isMirroring && isSynchronized && !string.IsNullOrEmpty(failoverPartnerName))
+ {
+ SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(DataTestUtility.TcpConnStr);
+ builder.ConnectTimeout = 0;
+
+ TestWorker worker = new TestWorker(builder.ConnectionString);
+ Thread childThread = new Thread(() => worker.TestMultipleConnection());
+ childThread.Start();
+
+ if (workerCompletedEvent.WaitOne(10000))
+ {
+ childThread.Join();
+ }
+ else
+ {
+ // currently Thread.Abort() throws PlatformNotSupportedException in CoreFx.
+ childThread.Interrupt();
+ throw new Exception("SqlConnection could not open and close successfully in timely manner. Possibly connection hangs.");
+ }
+ }
+ }
+
+ private static bool GetMirroringInfo(string connectionString, out string mirroringStateDesc, out string failoverPartnerName)
+ {
+ mirroringStateDesc = null;
+ failoverPartnerName = null;
+
+ SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder(connectionString);
+ string dbname = builder.InitialCatalog;
+
+ builder.ConnectTimeout = 5;
+ connectionString = builder.ConnectionString;
+
+ DataTable dt = DataTestUtility.RunQuery(connectionString, $"select mirroring_state_desc from sys.database_mirroring where database_id = DB_ID('{dbname}')");
+ mirroringStateDesc = dt.Rows[0][0].ToString();
+
+ bool isMirroring = !string.IsNullOrEmpty(mirroringStateDesc);
+ if (isMirroring)
+ {
+ dt = DataTestUtility.RunQuery(connectionString, $"select mirroring_partner_name from sys.database_mirroring where database_id = DB_ID('{dbname}')");
+ failoverPartnerName = dt.Rows[0][0].ToString();
+ }
+
+ return isMirroring;
+ }
+
+ private class TestWorker
+ {
+ private string _connectionString;
+
+ public TestWorker(string connectionString)
+ {
+ _connectionString = connectionString;
+ }
+
+ public void TestMultipleConnection()
+ {
+ List list = new List();
+
+ for (int i = 0; i < 10; ++i)
+ {
+ SqlConnection conn = new SqlConnection(_connectionString);
+ list.Add(conn);
+ conn.Open();
+ }
+
+ foreach (SqlConnection conn in list)
+ {
+ conn.Dispose();
+ }
+
+ workerCompletedEvent.Set();
+ }
+ }
+ }
+}
diff --git a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj
index 3805a80820b9..7a0e5419151a 100644
--- a/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj
+++ b/src/System.Data.SqlClient/tests/ManualTests/System.Data.SqlClient.ManualTesting.Tests.csproj
@@ -56,6 +56,7 @@
+
diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs
index d46cda85f4d2..898cf347ec1f 100644
--- a/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs
+++ b/src/System.Diagnostics.Process/src/System/Diagnostics/Process.Linux.cs
@@ -186,9 +186,14 @@ private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr
// ---- PAL layer ends here ----
// -----------------------------
- /// Gets the path to the current executable, or null if it could not be retrieved.
- private static string GetExePath()
+ /// Gets the path to the executable for the process, or null if it could not be retrieved.
+ /// The pid for the target process, or -1 for the current process.
+ internal static string GetExePath(int processId = -1)
{
+ string exeFilePath = processId == -1 ?
+ Interop.procfs.SelfExeFilePath :
+ Interop.procfs.GetExeFilePathForProcess(processId);
+
// Determine the maximum size of a path
int maxPath = Interop.Sys.MaxPath;
@@ -197,7 +202,7 @@ private static string GetExePath()
{
// Read from procfs the symbolic link to this process' executable
byte[] buffer = new byte[pathLen + 1]; // +1 for null termination
- int resultLength = Interop.Sys.ReadLink(Interop.procfs.SelfExeFilePath, buffer, pathLen);
+ int resultLength = Interop.Sys.ReadLink(exeFilePath, buffer, pathLen);
// If we got one, null terminate it (readlink doesn't do this) and return the string
if (resultLength > 0)
diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
index a64f50d89aa0..61e1d1f2e531 100644
--- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
+++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.Linux.cs
@@ -80,6 +80,22 @@ internal static ProcessModuleCollection GetModules(int processId)
}
}
+ // Move the main executable module to be the first in the list if it's not already
+ string exePath = Process.GetExePath(processId);
+ for (int i = 0; i < modules.Count; i++)
+ {
+ ProcessModule module = modules[i];
+ if (module.FileName == exePath)
+ {
+ if (i > 0)
+ {
+ modules.RemoveAt(i);
+ modules.Insert(0, module);
+ }
+ break;
+ }
+ }
+
// Return the set of modules found
return modules;
}
diff --git a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs
index e370668b7cf1..6b701ec5c974 100644
--- a/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs
+++ b/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessModuleCollection.cs
@@ -27,6 +27,10 @@ internal ProcessModuleCollection(int capacity)
internal void Add(ProcessModule module) => InnerList.Add(module);
+ internal void Insert(int index, ProcessModule module) => InnerList.Insert(index, module);
+
+ internal void RemoveAt(int index) => InnerList.RemoveAt(index);
+
public ProcessModule this[int index] => (ProcessModule)InnerList[index];
public int IndexOf(ProcessModule module) => InnerList.IndexOf(module);
diff --git a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs
index 281fae85abb9..1f655227ea72 100644
--- a/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs
+++ b/src/System.Diagnostics.Tracing/tests/BasicEventSourceTest/TestEventCounter.cs
@@ -44,6 +44,7 @@ public void Error()
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework, reason: "https://github.com/dotnet/corefx/issues/23661")]
+ [ActiveIssue("https://github.com/dotnet/corefx/issues/22791", TargetFrameworkMonikers.UapAot)]
public void Test_Write_Metric_EventListener()
{
using (var listener = new EventListenerListener())
diff --git a/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs b/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs
index 3f12128f7560..bf67a3c0591e 100644
--- a/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs
+++ b/src/System.DirectoryServices.AccountManagement/tests/PrincipalContextTests.cs
@@ -170,7 +170,11 @@ public void Ctor_InvalidContexType_ThrowsInvalidEnumArgumentException(ContextTyp
[Fact]
public void Ctor_DomainContextType_ThrowsPrincipalServerDownException()
{
- Assert.Throws(() => new PrincipalContext(ContextType.Domain));
+ if (Environment.MachineName.Equals(Environment.UserDomainName, StringComparison.OrdinalIgnoreCase))
+ {
+ // The machine is not connected to a domain. we expect PrincipalContext(ContextType.Domain) to throw
+ Assert.Throws(() => new PrincipalContext(ContextType.Domain));
+ }
}
[Fact]
diff --git a/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs b/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs
index 9edcb9389bc7..7c811207178e 100644
--- a/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs
+++ b/src/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/common/SearchResults.cs
@@ -72,10 +72,11 @@ public class SearchResultEntry
{
private DirectoryControl[] _resultControls = null;
- internal SearchResultEntry(string dn) => DistinguishedName = dn;
+ internal SearchResultEntry(string dn) : this(dn, new SearchResultAttributeCollection()) {}
- internal SearchResultEntry(string dn, SearchResultAttributeCollection attrs) : this(dn)
+ internal SearchResultEntry(string dn, SearchResultAttributeCollection attrs)
{
+ DistinguishedName = dn;
Attributes = attrs;
}
diff --git a/src/System.Drawing.Common/System.Drawing.Common.sln b/src/System.Drawing.Common/System.Drawing.Common.sln
index abc475c28dc3..bdc9c7a7074a 100644
--- a/src/System.Drawing.Common/System.Drawing.Common.sln
+++ b/src/System.Drawing.Common/System.Drawing.Common.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26730.10
+VisualStudioVersion = 15.0.26911.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Drawing.Common.Tests", "tests\System.Drawing.Common.Tests.csproj", "{4B93E684-0630-45F4-8F63-6C7788C9892F}"
ProjectSection(ProjectDependencies) = postProject
diff --git a/src/System.Drawing.Common/src/Unix/MonoTODOAttribute.cs b/src/System.Drawing.Common/src/MonoTODOAttribute.cs
similarity index 100%
rename from src/System.Drawing.Common/src/Unix/MonoTODOAttribute.cs
rename to src/System.Drawing.Common/src/MonoTODOAttribute.cs
diff --git a/src/System.Drawing.Common/src/System.Drawing.Common.csproj b/src/System.Drawing.Common/src/System.Drawing.Common.csproj
index fde00ae01d91..e96c9dddc0bf 100644
--- a/src/System.Drawing.Common/src/System.Drawing.Common.csproj
+++ b/src/System.Drawing.Common/src/System.Drawing.Common.csproj
@@ -32,6 +32,7 @@
+
@@ -50,6 +51,8 @@
+
+
@@ -112,6 +115,7 @@
+
@@ -202,29 +206,28 @@
-
+
-
-
-
+
+
+
-
-
+
+
-
+
-
+
-
-
-
-
-
+
+
+
+
@@ -243,10 +246,9 @@
-
+
-
@@ -295,6 +297,10 @@
+
+
+
+
@@ -305,39 +311,29 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
+
-
+
Common\Interop\Unix\Interop.Libraries.cs
@@ -365,4 +361,4 @@
-
\ No newline at end of file
+
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs
similarity index 83%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs
rename to src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs
index 34c11158d81d..5c6707c9aeb9 100644
--- a/src/System.Drawing.Common/src/Unix/System.Drawing/Bitmap.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Unix.cs
@@ -71,9 +71,6 @@ internal Bitmap(IntPtr ptr)
// (when using MS GDI+ and IStream we must ensure the stream stays alive for all the life of the Image)
internal Bitmap(IntPtr ptr, Stream stream)
{
- // under Win32 stream is owned by SD/GDI+ code
- if (GDIPlus.RunningOnWindows())
- this.stream = stream;
nativeObject = ptr;
}
@@ -87,7 +84,7 @@ public Bitmap(int width, int height, Graphics g)
throw new ArgumentNullException("g");
IntPtr bmp;
- Status s = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out bmp);
+ int s = SafeNativeMethods.Gdip.GdipCreateBitmapFromGraphics(width, height, g.nativeObject, out bmp);
SafeNativeMethods.Gdip.CheckStatus(s);
nativeObject = bmp;
}
@@ -95,7 +92,7 @@ public Bitmap(int width, int height, Graphics g)
public Bitmap(int width, int height, PixelFormat format)
{
IntPtr bmp;
- Status s = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, 0, format, IntPtr.Zero, out bmp);
+ int s = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, 0, format, IntPtr.Zero, out bmp);
SafeNativeMethods.Gdip.CheckStatus(s);
nativeObject = bmp;
@@ -121,7 +118,7 @@ public Bitmap(string filename, bool useIcm)
throw new ArgumentNullException("filename");
IntPtr imagePtr;
- Status st;
+ int st;
if (useIcm)
st = SafeNativeMethods.Gdip.GdipCreateBitmapFromFileICM(filename, out imagePtr);
@@ -149,9 +146,6 @@ public Bitmap(Type type, string resource)
}
nativeObject = InitFromStream(s);
- // under Win32 stream is owned by SD/GDI+ code
- if (GDIPlus.RunningOnWindows())
- stream = s;
}
public Bitmap(Image original, int width, int height) : this(width, height, PixelFormat.Format32bppArgb)
@@ -166,7 +160,7 @@ public Bitmap(int width, int height, int stride, PixelFormat format, IntPtr scan
{
IntPtr bmp;
- Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, format, scan0, out bmp);
+ int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(width, height, stride, format, scan0, out bmp);
SafeNativeMethods.Gdip.CheckStatus(status);
nativeObject = bmp;
}
@@ -182,7 +176,7 @@ public Color GetPixel(int x, int y)
int argb;
- Status s = SafeNativeMethods.Gdip.GdipBitmapGetPixel(nativeObject, x, y, out argb);
+ int s = SafeNativeMethods.Gdip.GdipBitmapGetPixel(nativeObject, x, y, out argb);
SafeNativeMethods.Gdip.CheckStatus(s);
return Color.FromArgb(argb);
@@ -190,8 +184,8 @@ public Color GetPixel(int x, int y)
public void SetPixel(int x, int y, Color color)
{
- Status s = SafeNativeMethods.Gdip.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb());
- if (s == Status.InvalidParameter)
+ int s = SafeNativeMethods.Gdip.GdipBitmapSetPixel(nativeObject, x, y, color.ToArgb());
+ if (s == SafeNativeMethods.Gdip.InvalidParameter)
{
// check is done in case of an error only to avoid another
// unmanaged call for normal (successful) calls
@@ -207,7 +201,7 @@ public void SetPixel(int x, int y, Color color)
public Bitmap Clone(Rectangle rect, PixelFormat format)
{
IntPtr bmp;
- Status status = SafeNativeMethods.Gdip.GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height,
+ int status = SafeNativeMethods.Gdip.GdipCloneBitmapAreaI(rect.X, rect.Y, rect.Width, rect.Height,
format, nativeObject, out bmp);
SafeNativeMethods.Gdip.CheckStatus(status);
return new Bitmap(bmp);
@@ -216,7 +210,7 @@ public Bitmap Clone(Rectangle rect, PixelFormat format)
public Bitmap Clone(RectangleF rect, PixelFormat format)
{
IntPtr bmp;
- Status status = SafeNativeMethods.Gdip.GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height,
+ int status = SafeNativeMethods.Gdip.GdipCloneBitmapArea(rect.X, rect.Y, rect.Width, rect.Height,
format, nativeObject, out bmp);
SafeNativeMethods.Gdip.CheckStatus(status);
return new Bitmap(bmp);
@@ -225,7 +219,7 @@ public Bitmap Clone(RectangleF rect, PixelFormat format)
public static Bitmap FromHicon(IntPtr hicon)
{
IntPtr bitmap;
- Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(hicon, out bitmap);
+ int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromHICON(hicon, out bitmap);
SafeNativeMethods.Gdip.CheckStatus(status);
return new Bitmap(bitmap);
}
@@ -233,7 +227,7 @@ public static Bitmap FromHicon(IntPtr hicon)
public static Bitmap FromResource(IntPtr hinstance, string bitmapName) //TODO: Untested
{
IntPtr bitmap;
- Status status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(hinstance, bitmapName, out bitmap);
+ int status = SafeNativeMethods.Gdip.GdipCreateBitmapFromResource(hinstance, bitmapName, out bitmap);
SafeNativeMethods.Gdip.CheckStatus(status);
return new Bitmap(bitmap);
}
@@ -249,7 +243,7 @@ public IntPtr GetHbitmap(Color background)
{
IntPtr HandleBmp;
- Status status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(nativeObject, out HandleBmp, background.ToArgb());
+ int status = SafeNativeMethods.Gdip.GdipCreateHBITMAPFromBitmap(nativeObject, out HandleBmp, background.ToArgb());
SafeNativeMethods.Gdip.CheckStatus(status);
return HandleBmp;
@@ -260,7 +254,7 @@ public IntPtr GetHicon()
{
IntPtr HandleIcon;
- Status status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(nativeObject, out HandleIcon);
+ int status = SafeNativeMethods.Gdip.GdipCreateHICONFromBitmap(nativeObject, out HandleIcon);
SafeNativeMethods.Gdip.CheckStatus(status);
return HandleIcon;
@@ -275,7 +269,11 @@ public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat form
public
BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)
{
- Status status = SafeNativeMethods.Gdip.GdipBitmapLockBits(nativeObject, ref rect, flags, format, bitmapData);
+ int status = SafeNativeMethods.Gdip.GdipBitmapLockBits(nativeObject, ref rect, flags, format, bitmapData);
+ if (status == 7)
+ {
+ status = 8; // libgdiplus has the wrong error code mapping for this state.
+ }
//NOTE: scan0 points to piece of memory allocated in the unmanaged space
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -311,13 +309,13 @@ public void MakeTransparent(Color transparentColor)
public void SetResolution(float xDpi, float yDpi)
{
- Status status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(nativeObject, xDpi, yDpi);
+ int status = SafeNativeMethods.Gdip.GdipBitmapSetResolution(nativeObject, xDpi, yDpi);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void UnlockBits(BitmapData bitmapdata)
{
- Status status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(nativeObject, bitmapdata);
+ int status = SafeNativeMethods.Gdip.GdipBitmapUnlockBits(nativeObject, bitmapdata);
SafeNativeMethods.Gdip.CheckStatus(status);
}
}
diff --git a/src/System.Drawing.Common/src/System/Drawing/Bitmap.cs b/src/System.Drawing.Common/src/System/Drawing/Bitmap.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/Bitmap.cs
rename to src/System.Drawing.Common/src/System/Drawing/Bitmap.Windows.cs
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphics.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Unix.cs
similarity index 100%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphics.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Unix.cs
diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphics.Windows.cs
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsContext.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Unix.cs
similarity index 100%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsContext.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Unix.cs
diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsContext.Windows.cs
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsManager.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Unix.cs
similarity index 100%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/BufferedGraphicsManager.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Unix.cs
diff --git a/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.cs b/src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.cs
rename to src/System.Drawing.Common/src/System/Drawing/BufferedGraphicsManager.Windows.cs
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs
similarity index 76%
rename from src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs
rename to src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs
index 20ef1909461b..1260c98a5cd5 100644
--- a/src/System.Drawing.Common/src/Unix/System.Drawing.Drawing2D/GraphicsPath.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Unix.cs
@@ -50,13 +50,13 @@ public sealed class GraphicsPath : MarshalByRefObject, ICloneable, IDisposable
public GraphicsPath()
{
- Status status = SafeNativeMethods.Gdip.GdipCreatePath(FillMode.Alternate, out nativePath);
+ int status = SafeNativeMethods.Gdip.GdipCreatePath(FillMode.Alternate, out nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public GraphicsPath(FillMode fillMode)
{
- Status status = SafeNativeMethods.Gdip.GdipCreatePath(fillMode, out nativePath);
+ int status = SafeNativeMethods.Gdip.GdipCreatePath(fillMode, out nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -77,7 +77,7 @@ public GraphicsPath(Point[] pts, byte[] types, FillMode fillMode)
if (pts.Length != types.Length)
throw new ArgumentException("Invalid parameter passed. Number of points and types must be same.");
- Status status = SafeNativeMethods.Gdip.GdipCreatePath2I(pts, types, pts.Length, fillMode, out nativePath);
+ int status = SafeNativeMethods.Gdip.GdipCreatePath2I(pts, types, pts.Length, fillMode, out nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -88,7 +88,7 @@ public GraphicsPath(PointF[] pts, byte[] types, FillMode fillMode)
if (pts.Length != types.Length)
throw new ArgumentException("Invalid parameter passed. Number of points and types must be same.");
- Status status = SafeNativeMethods.Gdip.GdipCreatePath2(pts, types, pts.Length, fillMode, out nativePath);
+ int status = SafeNativeMethods.Gdip.GdipCreatePath2(pts, types, pts.Length, fillMode, out nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -96,7 +96,7 @@ public object Clone()
{
IntPtr clone;
- Status status = SafeNativeMethods.Gdip.GdipClonePath(nativePath, out clone);
+ int status = SafeNativeMethods.Gdip.GdipClonePath(nativePath, out clone);
SafeNativeMethods.Gdip.CheckStatus(status);
return new GraphicsPath(clone);
@@ -115,7 +115,7 @@ public void Dispose()
void Dispose(bool disposing)
{
- Status status;
+ int status;
if (nativePath != IntPtr.Zero)
{
status = SafeNativeMethods.Gdip.GdipDeletePath(nativePath);
@@ -130,7 +130,7 @@ public FillMode FillMode
get
{
FillMode mode;
- Status status = SafeNativeMethods.Gdip.GdipGetPathFillMode(nativePath, out mode);
+ int status = SafeNativeMethods.Gdip.GdipGetPathFillMode(nativePath, out mode);
SafeNativeMethods.Gdip.CheckStatus(status);
return mode;
@@ -140,7 +140,7 @@ public FillMode FillMode
if ((value < FillMode.Alternate) || (value > FillMode.Winding))
throw new InvalidEnumArgumentException("FillMode", (int)value, typeof(FillMode));
- Status status = SafeNativeMethods.Gdip.GdipSetPathFillMode(nativePath, value);
+ int status = SafeNativeMethods.Gdip.GdipSetPathFillMode(nativePath, value);
SafeNativeMethods.Gdip.CheckStatus(status);
}
}
@@ -150,7 +150,7 @@ public PathData PathData
get
{
int count;
- Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
+ int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
SafeNativeMethods.Gdip.CheckStatus(status);
PointF[] points = new PointF[count];
@@ -179,7 +179,7 @@ public PointF[] PathPoints
get
{
int count;
- Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
+ int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
SafeNativeMethods.Gdip.CheckStatus(status);
if (count == 0)
throw new ArgumentException("PathPoints");
@@ -197,7 +197,7 @@ public byte[] PathTypes
get
{
int count;
- Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
+ int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
SafeNativeMethods.Gdip.CheckStatus(status);
if (count == 0)
throw new ArgumentException("PathTypes");
@@ -215,7 +215,7 @@ public int PointCount
get
{
int count;
- Status status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
+ int status = SafeNativeMethods.Gdip.GdipGetPointCount(nativePath, out count);
SafeNativeMethods.Gdip.CheckStatus(status);
return count;
@@ -239,25 +239,25 @@ internal IntPtr NativeObject
//
public void AddArc(Rectangle rect, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddArc(RectangleF rect, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddArc(int x, int y, int width, int height, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathArcI(nativePath, x, y, width, height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddArc(float x, float y, float width, float height, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathArc(nativePath, x, y, width, height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -266,7 +266,7 @@ public void AddArc(float x, float y, float width, float height, float startAngle
//
public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, pt1.X, pt1.Y,
+ int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, pt1.X, pt1.Y,
pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -274,7 +274,7 @@ public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4)
public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, pt1.X, pt1.Y,
+ int status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, pt1.X, pt1.Y,
pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -282,13 +282,13 @@ public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4)
public void AddBezier(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4);
+ int status = SafeNativeMethods.Gdip.GdipAddPathBezierI(nativePath, x1, y1, x2, y2, x3, y3, x4, y4);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddBezier(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4);
+ int status = SafeNativeMethods.Gdip.GdipAddPathBezier(nativePath, x1, y1, x2, y2, x3, y3, x4, y4);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -299,7 +299,7 @@ public void AddBeziers(params Point[] points)
{
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathBeziersI(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -307,7 +307,7 @@ public void AddBeziers(PointF[] points)
{
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathBeziers(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathBeziers(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -316,25 +316,25 @@ public void AddBeziers(PointF[] points)
//
public void AddEllipse(RectangleF rect)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddEllipse(float x, float y, float width, float height)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, x, y, width, height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathEllipse(nativePath, x, y, width, height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddEllipse(Rectangle rect)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddEllipse(int x, int y, int width, int height)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, x, y, width, height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathEllipseI(nativePath, x, y, width, height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -344,13 +344,13 @@ public void AddEllipse(int x, int y, int width, int height)
//
public void AddLine(Point pt1, Point pt2)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y);
+ int status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddLine(PointF pt1, PointF pt2)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, pt1.X, pt1.Y, pt2.X,
+ int status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, pt1.X, pt1.Y, pt2.X,
pt2.Y);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -358,13 +358,13 @@ public void AddLine(PointF pt1, PointF pt2)
public void AddLine(int x1, int y1, int x2, int y2)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, x1, y1, x2, y2);
+ int status = SafeNativeMethods.Gdip.GdipAddPathLineI(nativePath, x1, y1, x2, y2);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddLine(float x1, float y1, float x2, float y2)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, x1, y1, x2,
+ int status = SafeNativeMethods.Gdip.GdipAddPathLine(nativePath, x1, y1, x2,
y2);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -380,7 +380,7 @@ public void AddLines(Point[] points)
if (points.Length == 0)
throw new ArgumentException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathLine2I(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathLine2I(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -391,7 +391,7 @@ public void AddLines(PointF[] points)
if (points.Length == 0)
throw new ArgumentException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathLine2(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathLine2(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -400,20 +400,20 @@ public void AddLines(PointF[] points)
//
public void AddPie(Rectangle rect, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathPie(
+ int status = SafeNativeMethods.Gdip.GdipAddPathPie(
nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddPie(int x, int y, int width, int height, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathPieI(nativePath, x, y, width, height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddPie(float x, float y, float width, float height, float startAngle, float sweepAngle)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle);
+ int status = SafeNativeMethods.Gdip.GdipAddPathPie(nativePath, x, y, width, height, startAngle, sweepAngle);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -425,7 +425,7 @@ public void AddPolygon(Point[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathPolygonI(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -434,7 +434,7 @@ public void AddPolygon(PointF[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathPolygon(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathPolygon(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -443,13 +443,13 @@ public void AddPolygon(PointF[] points)
//
public void AddRectangle(Rectangle rect)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathRectangleI(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void AddRectangle(RectangleF rect)
{
- Status status = SafeNativeMethods.Gdip.GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
+ int status = SafeNativeMethods.Gdip.GdipAddPathRectangle(nativePath, rect.X, rect.Y, rect.Width, rect.Height);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -463,7 +463,7 @@ public void AddRectangles(Rectangle[] rects)
if (rects.Length == 0)
throw new ArgumentException("rects");
- Status status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(nativePath, rects, rects.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathRectanglesI(nativePath, rects, rects.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -474,7 +474,7 @@ public void AddRectangles(RectangleF[] rects)
if (rects.Length == 0)
throw new ArgumentException("rects");
- Status status = SafeNativeMethods.Gdip.GdipAddPathRectangles(nativePath, rects, rects.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathRectangles(nativePath, rects, rects.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -486,14 +486,14 @@ public void AddPath(GraphicsPath addingPath, bool connect)
if (addingPath == null)
throw new ArgumentNullException("addingPath");
- Status status = SafeNativeMethods.Gdip.GdipAddPathPath(nativePath, addingPath.nativePath, connect);
+ int status = SafeNativeMethods.Gdip.GdipAddPathPath(nativePath, addingPath.nativePath, connect);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public PointF GetLastPoint()
{
PointF pt;
- Status status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(nativePath, out pt);
+ int status = SafeNativeMethods.Gdip.GdipGetPathLastPoint(nativePath, out pt);
SafeNativeMethods.Gdip.CheckStatus(status);
return pt;
@@ -507,7 +507,7 @@ public void AddClosedCurve(Point[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurveI(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -516,7 +516,7 @@ public void AddClosedCurve(PointF[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -525,7 +525,7 @@ public void AddClosedCurve(Point[] points, float tension)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(nativePath, points, points.Length, tension);
+ int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2I(nativePath, points, points.Length, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -534,7 +534,7 @@ public void AddClosedCurve(PointF[] points, float tension)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(nativePath, points, points.Length, tension);
+ int status = SafeNativeMethods.Gdip.GdipAddPathClosedCurve2(nativePath, points, points.Length, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -546,7 +546,7 @@ public void AddCurve(Point[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurveI(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurveI(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -555,7 +555,7 @@ public void AddCurve(PointF[] points)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurve(nativePath, points, points.Length);
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurve(nativePath, points, points.Length);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -564,7 +564,7 @@ public void AddCurve(Point[] points, float tension)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(nativePath, points, points.Length, tension);
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurve2I(nativePath, points, points.Length, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -573,7 +573,7 @@ public void AddCurve(PointF[] points, float tension)
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurve2(nativePath, points, points.Length, tension);
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurve2(nativePath, points, points.Length, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -582,7 +582,7 @@ public void AddCurve(Point[] points, int offset, int numberOfSegments, float ten
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(nativePath, points, points.Length,
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurve3I(nativePath, points, points.Length,
offset, numberOfSegments, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -593,7 +593,7 @@ public void AddCurve(PointF[] points, int offset, int numberOfSegments, float te
if (points == null)
throw new ArgumentNullException("points");
- Status status = SafeNativeMethods.Gdip.GdipAddPathCurve3(nativePath, points, points.Length,
+ int status = SafeNativeMethods.Gdip.GdipAddPathCurve3(nativePath, points, points.Length,
offset, numberOfSegments, tension);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -601,13 +601,13 @@ public void AddCurve(PointF[] points, int offset, int numberOfSegments, float te
public void Reset()
{
- Status status = SafeNativeMethods.Gdip.GdipResetPath(nativePath);
+ int status = SafeNativeMethods.Gdip.GdipResetPath(nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void Reverse()
{
- Status status = SafeNativeMethods.Gdip.GdipReversePath(nativePath);
+ int status = SafeNativeMethods.Gdip.GdipReversePath(nativePath);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -616,7 +616,7 @@ public void Transform(Matrix matrix)
if (matrix == null)
throw new ArgumentNullException("matrix");
- Status status = SafeNativeMethods.Gdip.GdipTransformPath(nativePath, matrix.nativeMatrix);
+ int status = SafeNativeMethods.Gdip.GdipTransformPath(nativePath, matrix.nativeMatrix);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -646,7 +646,7 @@ public void AddString(string s, FontFamily family, int style, float emSize, Rect
IntPtr sformat = (format == null) ? IntPtr.Zero : format.nativeFormat;
// note: the NullReferenceException on s.Length is the expected (MS) exception
- Status status = SafeNativeMethods.Gdip.GdipAddPathStringI(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
+ int status = SafeNativeMethods.Gdip.GdipAddPathStringI(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -658,27 +658,27 @@ public void AddString(string s, FontFamily family, int style, float emSize, Rect
IntPtr sformat = (format == null) ? IntPtr.Zero : format.nativeFormat;
// note: the NullReferenceException on s.Length is the expected (MS) exception
- Status status = SafeNativeMethods.Gdip.GdipAddPathString(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
+ int status = SafeNativeMethods.Gdip.GdipAddPathString(nativePath, s, s.Length, family.NativeFamily, style, emSize, ref layoutRect, sformat);
SafeNativeMethods.Gdip.CheckStatus(status);
}
public void ClearMarkers()
{
- Status s = SafeNativeMethods.Gdip.GdipClearPathMarkers(nativePath);
+ int s = SafeNativeMethods.Gdip.GdipClearPathMarkers(nativePath);
SafeNativeMethods.Gdip.CheckStatus(s);
}
public void CloseAllFigures()
{
- Status s = SafeNativeMethods.Gdip.GdipClosePathFigures(nativePath);
+ int s = SafeNativeMethods.Gdip.GdipClosePathFigures(nativePath);
SafeNativeMethods.Gdip.CheckStatus(s);
}
public void CloseFigure()
{
- Status s = SafeNativeMethods.Gdip.GdipClosePathFigure(nativePath);
+ int s = SafeNativeMethods.Gdip.GdipClosePathFigure(nativePath);
SafeNativeMethods.Gdip.CheckStatus(s);
}
@@ -696,7 +696,7 @@ public void Flatten(Matrix matrix)
public void Flatten(Matrix matrix, float flatness)
{
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
- Status status = SafeNativeMethods.Gdip.GdipFlattenPath(nativePath, m, flatness);
+ int status = SafeNativeMethods.Gdip.GdipFlattenPath(nativePath, m, flatness);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -717,7 +717,7 @@ public RectangleF GetBounds(Matrix matrix, Pen pen)
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
IntPtr p = (pen == null) ? IntPtr.Zero : pen.NativePen;
- Status s = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(nativePath, out retval, m, p);
+ int s = SafeNativeMethods.Gdip.GdipGetPathWorldBounds(nativePath, out retval, m, p);
SafeNativeMethods.Gdip.CheckStatus(s);
@@ -762,7 +762,7 @@ public bool IsOutlineVisible(int x, int y, Pen pen, Graphics graphics)
bool result;
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
- Status s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(nativePath, x, y, pen.NativePen, g, out result);
+ int s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPointI(nativePath, x, y, pen.NativePen, g, out result);
SafeNativeMethods.Gdip.CheckStatus(s);
return result;
@@ -776,7 +776,7 @@ public bool IsOutlineVisible(float x, float y, Pen pen, Graphics graphics)
bool result;
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
- Status s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(nativePath, x, y, pen.NativePen, g, out result);
+ int s = SafeNativeMethods.Gdip.GdipIsOutlineVisiblePathPoint(nativePath, x, y, pen.NativePen, g, out result);
SafeNativeMethods.Gdip.CheckStatus(s);
return result;
@@ -818,7 +818,7 @@ public bool IsVisible(int x, int y, Graphics graphics)
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
- Status s = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(nativePath, x, y, g, out retval);
+ int s = SafeNativeMethods.Gdip.GdipIsVisiblePathPointI(nativePath, x, y, g, out retval);
SafeNativeMethods.Gdip.CheckStatus(s);
@@ -831,7 +831,7 @@ public bool IsVisible(float x, float y, Graphics graphics)
IntPtr g = (graphics == null) ? IntPtr.Zero : graphics.nativeObject;
- Status s = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(nativePath, x, y, g, out retval);
+ int s = SafeNativeMethods.Gdip.GdipIsVisiblePathPoint(nativePath, x, y, g, out retval);
SafeNativeMethods.Gdip.CheckStatus(s);
@@ -840,14 +840,14 @@ public bool IsVisible(float x, float y, Graphics graphics)
public void SetMarkers()
{
- Status s = SafeNativeMethods.Gdip.GdipSetPathMarker(nativePath);
+ int s = SafeNativeMethods.Gdip.GdipSetPathMarker(nativePath);
SafeNativeMethods.Gdip.CheckStatus(s);
}
public void StartFigure()
{
- Status s = SafeNativeMethods.Gdip.GdipStartPathFigure(nativePath);
+ int s = SafeNativeMethods.Gdip.GdipStartPathFigure(nativePath);
SafeNativeMethods.Gdip.CheckStatus(s);
}
@@ -878,7 +878,7 @@ public void Warp(PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMod
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
- Status s = SafeNativeMethods.Gdip.GdipWarpPath(nativePath, m, destPoints, destPoints.Length,
+ int s = SafeNativeMethods.Gdip.GdipWarpPath(nativePath, m, destPoints, destPoints.Length,
srcRect.X, srcRect.Y, srcRect.Width, srcRect.Height, warpMode, flatness);
SafeNativeMethods.Gdip.CheckStatus(s);
@@ -905,7 +905,7 @@ public void Widen(Pen pen, Matrix matrix, float flatness)
return;
IntPtr m = (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix;
- Status s = SafeNativeMethods.Gdip.GdipWidenPath(nativePath, pen.NativePen, m, flatness);
+ int s = SafeNativeMethods.Gdip.GdipWidenPath(nativePath, pen.NativePen, m, flatness);
SafeNativeMethods.Gdip.CheckStatus(s);
}
}
diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.cs
rename to src/System.Drawing.Common/src/System/Drawing/Drawing2D/GraphicsPath.Windows.cs
diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs
index 68e539988df8..43ea6829e2bb 100644
--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/HatchBrush.cs
@@ -15,6 +15,11 @@ public HatchBrush(HatchStyle hatchstyle, Color foreColor) : this(hatchstyle, for
public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
{
+ if (hatchstyle < HatchStyle.Min || hatchstyle > HatchStyle.SolidDiamond)
+ {
+ throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(hatchstyle), hatchstyle, nameof(HatchStyle)), nameof(hatchstyle));
+ }
+
IntPtr nativeBrush;
int status = SafeNativeMethods.Gdip.GdipCreateHatchBrush(unchecked((int)hatchstyle), foreColor.ToArgb(), backColor.ToArgb(), out nativeBrush);
SafeNativeMethods.Gdip.CheckStatus(status);
diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs
index cf158ee9773e..162a4735ecdc 100644
--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/LinearGradientBrush.cs
@@ -335,9 +335,14 @@ public Blend Blend
public void SetSigmaBellShape(float focus, float scale)
{
- if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
+ if (focus < 0 || focus > 1)
{
- throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter));
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus));
+ }
+
+ if (scale < 0 || scale > 1)
+ {
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale));
}
int status = SafeNativeMethods.Gdip.GdipSetLineSigmaBlend(new HandleRef(this, NativeBrush), focus, scale);
@@ -348,9 +353,14 @@ public void SetSigmaBellShape(float focus, float scale)
public void SetBlendTriangularShape(float focus, float scale)
{
- if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
+ if (focus < 0 || focus > 1)
{
- throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter));
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus));
+ }
+
+ if (scale < 0 || scale > 1)
+ {
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale));
}
int status = SafeNativeMethods.Gdip.GdipSetLineLinearBlend(new HandleRef(this, NativeBrush), focus, scale);
@@ -531,7 +541,7 @@ public Matrix Transform
{
if (value == null)
{
- throw new ArgumentNullException("matrix");
+ throw new ArgumentNullException(nameof(value));
}
int status = SafeNativeMethods.Gdip.GdipSetLineTransform(new HandleRef(this, NativeBrush), new HandleRef(value, value.nativeMatrix));
@@ -554,6 +564,13 @@ public void MultiplyTransform(Matrix matrix, MatrixOrder order)
throw new ArgumentNullException(nameof(matrix));
}
+ // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws
+ // with the libgdiplus backend. Simulate a nop for compatability with GDI+.
+ if (matrix.nativeMatrix == IntPtr.Zero)
+ {
+ return;
+ }
+
int status = SafeNativeMethods.Gdip.GdipMultiplyLineTransform(new HandleRef(this, NativeBrush),
new HandleRef(matrix, matrix.nativeMatrix),
order);
diff --git a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs
index 1293902b5f2f..a268e66aad5d 100644
--- a/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Drawing2D/PathGradientBrush.cs
@@ -339,30 +339,36 @@ public Blend Blend
public void SetSigmaBellShape(float focus, float scale)
{
- if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
+ if (focus < 0 || focus > 1)
{
- throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter));
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus));
}
- int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, NativeBrush), focus, scale);
+ if (scale < 0 || scale > 1)
+ {
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale));
+ }
- if (status != SafeNativeMethods.Gdip.Ok)
- throw SafeNativeMethods.Gdip.StatusException(status);
+ int status = SafeNativeMethods.Gdip.GdipSetPathGradientSigmaBlend(new HandleRef(this, NativeBrush), focus, scale);
+ SafeNativeMethods.Gdip.CheckStatus(status);
}
public void SetBlendTriangularShape(float focus) => SetBlendTriangularShape(focus, (float)1.0);
public void SetBlendTriangularShape(float focus, float scale)
{
- if (focus < 0 || focus > 1 || scale < 0 || scale > 1)
+ if (focus < 0 || focus > 1)
{
- throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter));
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(focus));
}
- int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, NativeBrush), focus, scale);
+ if (scale < 0 || scale > 1)
+ {
+ throw new ArgumentException(SR.Format(SR.GdiplusInvalidParameter), nameof(scale));
+ }
- if (status != SafeNativeMethods.Gdip.Ok)
- throw SafeNativeMethods.Gdip.StatusException(status);
+ int status = SafeNativeMethods.Gdip.GdipSetPathGradientLinearBlend(new HandleRef(this, NativeBrush), focus, scale);
+ SafeNativeMethods.Gdip.CheckStatus(status);
}
public ColorBlend InterpolationColors
@@ -450,21 +456,19 @@ public Matrix Transform
Matrix matrix = new Matrix();
int status = SafeNativeMethods.Gdip.GdipGetPathGradientTransform(new HandleRef(this, NativeBrush), new HandleRef(matrix, matrix.nativeMatrix));
-
- if (status != SafeNativeMethods.Gdip.Ok)
- throw SafeNativeMethods.Gdip.StatusException(status);
+ SafeNativeMethods.Gdip.CheckStatus(status);
return matrix;
}
set
{
if (value == null)
- throw new ArgumentNullException("matrix");
+ {
+ throw new ArgumentNullException(nameof(value));
+ }
int status = SafeNativeMethods.Gdip.GdipSetPathGradientTransform(new HandleRef(this, NativeBrush), new HandleRef(value, value.nativeMatrix));
-
- if (status != SafeNativeMethods.Gdip.Ok)
- throw SafeNativeMethods.Gdip.StatusException(status);
+ SafeNativeMethods.Gdip.CheckStatus(status);
}
}
@@ -481,14 +485,21 @@ public void ResetTransform()
public void MultiplyTransform(Matrix matrix, MatrixOrder order)
{
if (matrix == null)
- throw new ArgumentNullException("matrix");
+ {
+ throw new ArgumentNullException(nameof(matrix));
+ }
+
+ // Multiplying the transform by a disposed matrix is a nop in GDI+, but throws
+ // with the libgdiplus backend. Simulate a nop for compatability with GDI+.
+ if (matrix.nativeMatrix == IntPtr.Zero)
+ {
+ return;
+ }
int status = SafeNativeMethods.Gdip.GdipMultiplyPathGradientTransform(new HandleRef(this, NativeBrush),
new HandleRef(matrix, matrix.nativeMatrix),
order);
-
- if (status != SafeNativeMethods.Gdip.Ok)
- throw SafeNativeMethods.Gdip.StatusException(status);
+ SafeNativeMethods.Gdip.CheckStatus(status);
}
public void TranslateTransform(float dx, float dy) => TranslateTransform(dx, dy, MatrixOrder.Prepend);
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs b/src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs
similarity index 86%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs
rename to src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs
index a77cc2ca66d4..2f360846f1c4 100644
--- a/src/System.Drawing.Common/src/Unix/System.Drawing/Font.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Font.Unix.cs
@@ -52,7 +52,6 @@ public sealed class Font : MarshalByRefObject, ISerializable, ICloneable, IDispo
private string systemFontName;
private string originalFontName;
private float _size;
- private object olf;
private const byte DefaultCharSet = 1;
private static int CharSetOffset = -1;
@@ -73,9 +72,9 @@ private void CreateFont(string familyName, float emSize, FontStyle style, Graphi
}
setProperties(family, emSize, style, unit, charSet, isVertical);
- Status status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject);
+ int status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject);
- if (status == Status.FontStyleNotFound)
+ if (status == SafeNativeMethods.Gdip.FontStyleNotFound)
throw new ArgumentException(string.Format("Style {0} isn't supported by font {1}.", style.ToString(), familyName));
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -113,7 +112,7 @@ public void Dispose()
{
if (fontObject != IntPtr.Zero)
{
- Status status = SafeNativeMethods.Gdip.GdipDeleteFont(fontObject);
+ int status = SafeNativeMethods.Gdip.GdipDeleteFont(fontObject);
fontObject = IntPtr.Zero;
GC.SuppressFinalize(this);
// check the status code (throw) at the last step
@@ -214,7 +213,6 @@ void setProperties(FontFamily family, float emSize, FontStyle style, GraphicsUni
public static Font FromHfont(IntPtr hfont)
{
IntPtr newObject;
- IntPtr hdc;
FontStyle newStyle = FontStyle.Regular;
float newSize;
SafeNativeMethods.LOGFONT lf = new SafeNativeMethods.LOGFONT();
@@ -226,32 +224,10 @@ public static Font FromHfont(IntPtr hfont)
return (result);
}
- if (GDIPlus.RunningOnUnix())
- {
- // If we're on Unix we use our private gdiplus API to avoid Wine
- // dependencies in S.D
- Status s = SafeNativeMethods.Gdip.GdipCreateFontFromHfont(hfont, out newObject, ref lf);
- SafeNativeMethods.Gdip.CheckStatus(s);
- }
- else
- {
-
- // This needs testing
- // GetDC, SelectObject, ReleaseDC GetTextMetric and
- // GetFontFace are not really GDIPlus, see gdipFunctions.cs
-
- newStyle = FontStyle.Regular;
-
- hdc = GDIPlus.GetDC(IntPtr.Zero);
- try
- {
- return FromLogFont(lf, hdc);
- }
- finally
- {
- GDIPlus.ReleaseDC(IntPtr.Zero, hdc);
- }
- }
+ // If we're on Unix we use our private gdiplus API to avoid Wine
+ // dependencies in S.D
+ int s = SafeNativeMethods.Gdip.GdipCreateFontFromHfont(hfont, out newObject, ref lf);
+ SafeNativeMethods.Gdip.CheckStatus(s);
if (lf.lfItalic != 0)
{
@@ -290,17 +266,7 @@ public IntPtr ToHfont()
if (fontObject == IntPtr.Zero)
throw new ArgumentException("Object has been disposed.");
- if (GDIPlus.RunningOnUnix())
- return fontObject;
-
- // win32 specific code
- if (olf == null)
- {
- olf = new LOGFONT();
- ToLogFont(olf);
- }
- LOGFONT lf = (LOGFONT)olf;
- return GDIPlus.CreateFontIndirect(ref lf);
+ return fontObject;
}
internal Font(IntPtr newFontObject, string familyName, FontStyle style, float size)
@@ -325,7 +291,7 @@ public Font(Font prototype, FontStyle newStyle)
// no null checks, MS throws a NullReferenceException if original is null
setProperties(prototype.FontFamily, prototype.Size, newStyle, prototype.Unit, prototype.GdiCharSet, prototype.GdiVerticalFont);
- Status status = SafeNativeMethods.Gdip.GdipCreateFont(_fontFamily.NativeFamily, Size, Style, Unit, out fontObject);
+ int status = SafeNativeMethods.Gdip.GdipCreateFont(_fontFamily.NativeFamily, Size, Style, Unit, out fontObject);
SafeNativeMethods.Gdip.CheckStatus(status);
}
@@ -365,7 +331,7 @@ public Font(FontFamily family, float emSize, FontStyle style,
if (family == null)
throw new ArgumentNullException("family");
- Status status;
+ int status;
setProperties(family, emSize, style, unit, gdiCharSet, gdiVerticalFont);
status = SafeNativeMethods.Gdip.GdipCreateFont(family.NativeFamily, emSize, style, unit, out fontObject);
SafeNativeMethods.Gdip.CheckStatus(status);
@@ -632,7 +598,7 @@ public static Font FromLogFont(object lf, IntPtr hdc)
{
IntPtr newObject;
SafeNativeMethods.LOGFONT o = (SafeNativeMethods.LOGFONT)lf;
- Status status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfont(hdc, ref o, out newObject);
+ int status = SafeNativeMethods.Gdip.GdipCreateFontFromLogfont(hdc, ref o, out newObject);
SafeNativeMethods.Gdip.CheckStatus(status);
return new Font(newObject, "Microsoft Sans Serif", FontStyle.Regular, 10);
}
@@ -644,50 +610,18 @@ public float GetHeight()
public static Font FromLogFont(object lf)
{
- if (GDIPlus.RunningOnUnix())
- return FromLogFont(lf, IntPtr.Zero);
-
- // win32 specific code
- IntPtr hDC = IntPtr.Zero;
- try
- {
- hDC = GDIPlus.GetDC(IntPtr.Zero);
- return FromLogFont(lf, hDC);
- }
- finally
- {
- GDIPlus.ReleaseDC(IntPtr.Zero, hDC);
- }
+ return FromLogFont(lf, IntPtr.Zero);
}
public void ToLogFont(object logFont)
{
- if (GDIPlus.RunningOnUnix())
- {
- // Unix - We don't have a window we could associate the DC with
- // so we use an image instead
- using (Bitmap img = new Bitmap(1, 1, Imaging.PixelFormat.Format32bppArgb))
- {
- using (Graphics g = Graphics.FromImage(img))
- {
- ToLogFont(logFont, g);
- }
- }
- }
- else
+ // Unix - We don't have a window we could associate the DC with
+ // so we use an image instead
+ using (Bitmap img = new Bitmap(1, 1, Imaging.PixelFormat.Format32bppArgb))
{
- // Windows
- IntPtr hDC = GDIPlus.GetDC(IntPtr.Zero);
- try
- {
- using (Graphics g = Graphics.FromHdc(hDC))
- {
- ToLogFont(logFont, g);
- }
- }
- finally
+ using (Graphics g = Graphics.FromImage(img))
{
- GDIPlus.ReleaseDC(IntPtr.Zero, hDC);
+ ToLogFont(logFont, g);
}
}
}
@@ -711,14 +645,14 @@ public void ToLogFont(object logFont, Graphics graphics)
int size = Marshal.SizeOf(logFont);
if (size >= Marshal.SizeOf(lf))
{
- Status status;
+ int status;
IntPtr copy = Marshal.AllocHGlobal(size);
try
{
Marshal.StructureToPtr(logFont, copy, false);
status = SafeNativeMethods.Gdip.GdipGetLogFont(NativeObject, graphics.NativeObject, logFont);
- if (status != Status.Ok)
+ if (status != SafeNativeMethods.Gdip.Ok)
{
// reset to original values
Marshal.PtrToStructure(copy, logFont);
@@ -764,7 +698,7 @@ public float GetHeight(Graphics graphics)
throw new ArgumentNullException("graphics");
float size;
- Status status = SafeNativeMethods.Gdip.GdipGetFontHeight(fontObject, graphics.NativeObject, out size);
+ int status = SafeNativeMethods.Gdip.GdipGetFontHeight(fontObject, graphics.NativeObject, out size);
SafeNativeMethods.Gdip.CheckStatus(status);
return size;
}
@@ -772,7 +706,7 @@ public float GetHeight(Graphics graphics)
public float GetHeight(float dpi)
{
float size;
- Status status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(fontObject, dpi, out size);
+ int status = SafeNativeMethods.Gdip.GdipGetFontHeightGivenDPI(fontObject, dpi, out size);
SafeNativeMethods.Gdip.CheckStatus(status);
return size;
}
diff --git a/src/System.Drawing.Common/src/System/Drawing/Font.cs b/src/System.Drawing.Common/src/System/Drawing/Font.Windows.cs
similarity index 100%
rename from src/System.Drawing.Common/src/System/Drawing/Font.cs
rename to src/System.Drawing.Common/src/System/Drawing/Font.Windows.cs
diff --git a/src/System.Drawing.Common/src/Unix/System.Drawing/GdiPlusStreamHelper.cs b/src/System.Drawing.Common/src/System/Drawing/GdiPlusStreamHelper.Unix.cs
similarity index 100%
rename from src/System.Drawing.Common/src/Unix/System.Drawing/GdiPlusStreamHelper.cs
rename to src/System.Drawing.Common/src/System/Drawing/GdiPlusStreamHelper.Unix.cs
diff --git a/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs b/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs
index 4c729c473301..2783c02b7684 100644
--- a/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/Gdiplus.cs
@@ -83,7 +83,7 @@ static Gdip()
s_gdipModule = LoadNativeLibrary();
LoadSharedFunctionPointers();
- LoadPlatformFunctionPointers(); // This should be combined with the above call when Windows/Unix implementations are unified.
+ PlatformInitialize();
StartupInput input = StartupInput.GetDefault();
StartupOutput output;
diff --git a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs
index 98df532e795f..7e531ba0b2cc 100644
--- a/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs
+++ b/src/System.Drawing.Common/src/System/Drawing/GdiplusNative.Unix.cs
@@ -5,10 +5,7 @@
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using System.Drawing.Text;
-using System.IO;
using System.Runtime.InteropServices;
-using System.Runtime.InteropServices.ComTypes;
-using System.Text;
namespace System.Drawing
{
@@ -16,87 +13,89 @@ internal partial class SafeNativeMethods
{
internal unsafe partial class Gdip
{
+ public static IntPtr Display = IntPtr.Zero;
+ public static bool UseX11Drawable = false;
+ public static bool UseCarbonDrawable = false;
+ public static bool UseCocoaDrawable = false;
+
private static IntPtr LoadNativeLibrary()
{
- // Various Unix package managers have chosen different names for the "libgdiplus" shared library.
- // The mono project, where libgdiplus originated, allowed both of the names below to be used, via
- // a global configuration setting. We prefer the "unversioned" shared object name, and fallback to
- // the name suffixed with ".0".
- IntPtr lib = Interop.Libdl.dlopen("libgdiplus.so", Interop.Libdl.RTLD_NOW);
- if (lib == IntPtr.Zero)
+ IntPtr lib = IntPtr.Zero;
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ lib = Interop.Libdl.dlopen("libgdiplus.dylib", Interop.Libdl.RTLD_NOW);
+ }
+ else
{
- lib = Interop.Libdl.dlopen("libgdiplus.so.0", Interop.Libdl.RTLD_NOW);
+ // Various Unix package managers have chosen different names for the "libgdiplus" shared library.
+ // The mono project, where libgdiplus originated, allowed both of the names below to be used, via
+ // a global configuration setting. We prefer the "unversioned" shared object name, and fallback to
+ // the name suffixed with ".0".
+ lib = Interop.Libdl.dlopen("libgdiplus.so", Interop.Libdl.RTLD_NOW);
if (lib == IntPtr.Zero)
{
- throw new DllNotFoundException(SR.LibgdiplusNotFound);
+ lib = Interop.Libdl.dlopen("libgdiplus.so.0", Interop.Libdl.RTLD_NOW);
}
}
+ // This function may return a null handle. If it does, individual functions loaded from it will throw a DllNotFoundException,
+ // but not until an attempt is made to actually use the function (rather than load it). This matches how PInvokes behave.
return lib;
}
private static IntPtr LoadFunctionPointer(IntPtr nativeLibraryHandle, string functionName) => Interop.Libdl.dlsym(nativeLibraryHandle, functionName);
- internal static void CheckStatus(Status status)
+ private static void PlatformInitialize()
{
- string msg;
- switch (status)
+ InitializeSystemContext();
+ LoadFunctionPointers();
+ }
+
+ private static void InitializeSystemContext()
+ {
+ if (Environment.GetEnvironmentVariable("not_supported_MONO_MWF_USE_NEW_X11_BACKEND") != null || Environment.GetEnvironmentVariable("MONO_MWF_MAC_FORCE_X11") != null)
{
- case Status.Ok:
- return;
- case Status.GenericError:
- msg = string.Format("Generic Error [GDI+ status: {0}]", status);
- throw new Exception(msg);
- case Status.InvalidParameter:
- msg = string.Format("A null reference or invalid value was found [GDI+ status: {0}]", status);
- throw new ArgumentException(msg);
- case Status.OutOfMemory:
- msg = string.Format("Not enough memory to complete operation [GDI+ status: {0}]", status);
- throw new OutOfMemoryException(msg);
- case Status.ObjectBusy:
- msg = string.Format("Object is busy and cannot state allow this operation [GDI+ status: {0}]", status);
- throw new MemberAccessException(msg);
- case Status.InsufficientBuffer:
- msg = string.Format("Insufficient buffer provided to complete operation [GDI+ status: {0}]", status);
-#if NETCORE
- throw new Exception(msg);
-#else
- throw new InternalBufferOverflowException (msg);
-#endif
- case Status.PropertyNotSupported:
- msg = string.Format("Property not supported [GDI+ status: {0}]", status);
- throw new NotSupportedException(msg);
- case Status.FileNotFound:
- msg = string.Format("Requested file was not found [GDI+ status: {0}]", status);
- throw new FileNotFoundException(msg);
- case Status.AccessDenied:
- msg = string.Format("Access to resource was denied [GDI+ status: {0}]", status);
- throw new UnauthorizedAccessException(msg);
- case Status.UnknownImageFormat:
- msg = string.Format("Either the image format is unknown or you don't have the required libraries to decode this format [GDI+ status: {0}]", status);
- throw new NotSupportedException(msg);
- case Status.NotImplemented:
- msg = string.Format("The requested feature is not implemented [GDI+ status: {0}]", status);
- throw new NotImplementedException(msg);
- case Status.WrongState:
- msg = string.Format("Object is not in a state that can allow this operation [GDI+ status: {0}]", status);
- throw new ArgumentException(msg);
- case Status.FontFamilyNotFound:
- msg = string.Format("The requested FontFamily could not be found [GDI+ status: {0}]", status);
- throw new ArgumentException(msg);
- case Status.ValueOverflow:
- msg = string.Format("Argument is out of range [GDI+ status: {0}]", status);
- throw new OverflowException(msg);
- case Status.Win32Error:
- msg = string.Format("The operation is invalid [GDI+ status: {0}]", status);
- throw new InvalidOperationException(msg);
- default:
- msg = string.Format("Unknown Error [GDI+ status: {0}]", status);
- throw new Exception(msg);
+ UseX11Drawable = true;
+ }
+ else
+ {
+ IntPtr buf = Marshal.AllocHGlobal(8192);
+ // This is kind of a hack but gets us sysname from uname (struct utsname *name) on
+ // linux and darwin
+ if (uname(buf) != 0)
+ {
+ // WTH: We couldn't detect the OS; lets default to X11
+ UseX11Drawable = true;
+ }
+ else
+ {
+ string os = Marshal.PtrToStringAnsi(buf);
+ if (os == "Darwin")
+ UseCarbonDrawable = true;
+ else
+ UseX11Drawable = true;
+ }
+ Marshal.FreeHGlobal(buf);
}
+
+ // under MS 1.x this event is raised only for the default application domain
+#if !NETSTANDARD1_6
+ AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProcessExit);
+#endif
+ }
+
+ [DllImport("libc")]
+ static extern int uname(IntPtr buf);
+
+ private static void ProcessExit(object sender, EventArgs e)
+ {
+ // Called all pending objects and claim any pending handle before
+ // shutting down
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
}
- private static void LoadPlatformFunctionPointers()
+ private static void LoadFunctionPointers()
{
GdiplusStartup_ptr = FunctionWrapper.Load(s_gdipModule, "GdiplusStartup");
GdiplusShutdown_ptr = FunctionWrapper.Load(s_gdipModule, "GdiplusShutdown");
@@ -200,8 +199,6 @@ private static void LoadPlatformFunctionPointers()
GdipBitmapGetPixel_ptr = FunctionWrapper.Load(s_gdipModule, "GdipBitmapGetPixel");
GdipBitmapSetPixel_ptr = FunctionWrapper.Load(s_gdipModule, "GdipBitmapSetPixel");
GdipLoadImageFromFile_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromFile");
- GdipLoadImageFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromStream");
- GdipSaveImageToStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipSaveImageToStream");
GdipCloneImage_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCloneImage");
GdipLoadImageFromFileICM_ptr = FunctionWrapper.Load(s_gdipModule, "GdipLoadImageFromFileICM");
GdipCreateBitmapFromHBITMAP_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateBitmapFromHBITMAP");
@@ -340,10 +337,6 @@ private static void LoadPlatformFunctionPointers()
GdipRecordMetafileI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileI");
GdipRecordMetafileFileName_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileFileName");
GdipRecordMetafileFileNameI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileFileNameI");
- GdipCreateMetafileFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateMetafileFromStream");
- GdipGetMetafileHeaderFromStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipGetMetafileHeaderFromStream");
- GdipRecordMetafileStream_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileStream");
- GdipRecordMetafileStreamI_ptr = FunctionWrapper.Load(s_gdipModule, "GdipRecordMetafileStreamI");
GdipCreateFromContext_macosx_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateFromContext_macosx");
GdipSetVisibleClip_linux_ptr = FunctionWrapper.Load(s_gdipModule, "GdipSetVisibleClip_linux");
GdipCreateFromXDrawable_linux_ptr = FunctionWrapper.Load(s_gdipModule, "GdipCreateFromXDrawable_linux");
@@ -359,7 +352,7 @@ private static void LoadPlatformFunctionPointers()
// Imported functions
- private delegate Status GdiplusStartup_delegate(out IntPtr token, ref StartupInput input, out StartupOutput output);
+ private delegate int GdiplusStartup_delegate(out IntPtr token, ref StartupInput input, out StartupOutput output);
private static FunctionWrapper GdiplusStartup_ptr;
internal static int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output) => (int)GdiplusStartup_ptr.Delegate(out token, ref input, out output);
@@ -375,1048 +368,1024 @@ private static void LoadPlatformFunctionPointers()
private static FunctionWrapper GdipFree_ptr;
internal static void GdipFree(IntPtr ptr) => GdipFree_ptr.Delegate(ptr);
- private delegate Status GdipDeleteBrush_delegate(IntPtr brush);
+ private delegate int GdipDeleteBrush_delegate(IntPtr brush);
private static FunctionWrapper GdipDeleteBrush_ptr;
- internal static Status GdipDeleteBrush(IntPtr brush) => GdipDeleteBrush_ptr.Delegate(brush);
+ internal static int GdipDeleteBrush(IntPtr brush) => GdipDeleteBrush_ptr.Delegate(brush);
internal static int IntGdipDeleteBrush(HandleRef brush) => (int)GdipDeleteBrush_ptr.Delegate(brush.Handle);
- private delegate Status GdipGetBrushType_delegate(IntPtr brush, out BrushType type);
+ private delegate int GdipGetBrushType_delegate(IntPtr brush, out BrushType type);
private static FunctionWrapper GdipGetBrushType_ptr;
- internal static Status GdipGetBrushType(IntPtr brush, out BrushType type) => GdipGetBrushType_ptr.Delegate(brush, out type);
+ internal static int GdipGetBrushType(IntPtr brush, out BrushType type) => GdipGetBrushType_ptr.Delegate(brush, out type);
- private delegate Status GdipCreateFromHDC_delegate(IntPtr hDC, out IntPtr graphics);
+ private delegate int GdipCreateFromHDC_delegate(IntPtr hDC, out IntPtr graphics);
private static FunctionWrapper GdipCreateFromHDC_ptr;
- internal static Status GdipCreateFromHDC(IntPtr hDC, out IntPtr graphics) => GdipCreateFromHDC_ptr.Delegate(hDC, out graphics);
+ internal static int GdipCreateFromHDC(IntPtr hDC, out IntPtr graphics) => GdipCreateFromHDC_ptr.Delegate(hDC, out graphics);
- private delegate Status GdipDeleteGraphics_delegate(IntPtr graphics);
+ private delegate int GdipDeleteGraphics_delegate(IntPtr graphics);
private static FunctionWrapper GdipDeleteGraphics_ptr;
- internal static Status GdipDeleteGraphics(IntPtr graphics) => GdipDeleteGraphics_ptr.Delegate(graphics);
+ internal static int GdipDeleteGraphics(IntPtr graphics) => GdipDeleteGraphics_ptr.Delegate(graphics);
internal static int IntGdipDeleteGraphics(HandleRef graphics) => (int)GdipDeleteGraphics_ptr.Delegate(graphics.Handle);
- private delegate Status GdipRestoreGraphics_delegate(IntPtr graphics, uint graphicsState);
+ private delegate int GdipRestoreGraphics_delegate(IntPtr graphics, uint graphicsState);
private static FunctionWrapper GdipRestoreGraphics_ptr;
- internal static Status GdipRestoreGraphics(IntPtr graphics, uint graphicsState) => GdipRestoreGraphics_ptr.Delegate(graphics, graphicsState);
+ internal static int GdipRestoreGraphics(IntPtr graphics, uint graphicsState) => GdipRestoreGraphics_ptr.Delegate(graphics, graphicsState);
- private delegate Status GdipSaveGraphics_delegate(IntPtr graphics, out uint state);
+ private delegate int GdipSaveGraphics_delegate(IntPtr graphics, out uint state);
private static FunctionWrapper GdipSaveGraphics_ptr;
- internal static Status GdipSaveGraphics(IntPtr graphics, out uint state) => GdipSaveGraphics_ptr.Delegate(graphics, out state);
+ internal static int GdipSaveGraphics(IntPtr graphics, out uint state) => GdipSaveGraphics_ptr.Delegate(graphics, out state);
- private delegate Status GdipDrawArc_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
+ private delegate int GdipDrawArc_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipDrawArc_ptr;
- internal static Status GdipDrawArc(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawArc_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipDrawArc(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawArc_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipDrawArcI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
+ private delegate int GdipDrawArcI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipDrawArcI_ptr;
- internal static Status GdipDrawArcI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawArcI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipDrawArcI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawArcI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipDrawBezier_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
+ private delegate int GdipDrawBezier_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
private static FunctionWrapper GdipDrawBezier_ptr;
- internal static Status GdipDrawBezier(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipDrawBezier_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
+ internal static int GdipDrawBezier(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipDrawBezier_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
- private delegate Status GdipDrawBezierI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
+ private delegate int GdipDrawBezierI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
private static FunctionWrapper GdipDrawBezierI_ptr;
- internal static Status GdipDrawBezierI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipDrawBezierI_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
+ internal static int GdipDrawBezierI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipDrawBezierI_ptr.Delegate(graphics, pen, x1, y1, x2, y2, x3, y3, x4, y4);
- private delegate Status GdipDrawEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
+ private delegate int GdipDrawEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
private static FunctionWrapper GdipDrawEllipseI_ptr;
- internal static Status GdipDrawEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawEllipseI_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipDrawEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawEllipseI_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipDrawEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
+ private delegate int GdipDrawEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
private static FunctionWrapper GdipDrawEllipse_ptr;
- internal static Status GdipDrawEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawEllipse_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipDrawEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawEllipse_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipDrawLine_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2);
+ private delegate int GdipDrawLine_delegate(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2);
private static FunctionWrapper GdipDrawLine_ptr;
- internal static Status GdipDrawLine(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2) => GdipDrawLine_ptr.Delegate(graphics, pen, x1, y1, x2, y2);
+ internal static int GdipDrawLine(IntPtr graphics, IntPtr pen, float x1, float y1, float x2, float y2) => GdipDrawLine_ptr.Delegate(graphics, pen, x1, y1, x2, y2);
- private delegate Status GdipDrawLineI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2);
+ private delegate int GdipDrawLineI_delegate(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2);
private static FunctionWrapper GdipDrawLineI_ptr;
- internal static Status GdipDrawLineI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2) => GdipDrawLineI_ptr.Delegate(graphics, pen, x1, y1, x2, y2);
+ internal static int GdipDrawLineI(IntPtr graphics, IntPtr pen, int x1, int y1, int x2, int y2) => GdipDrawLineI_ptr.Delegate(graphics, pen, x1, y1, x2, y2);
- private delegate Status GdipDrawLines_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
+ private delegate int GdipDrawLines_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
private static FunctionWrapper GdipDrawLines_ptr;
- internal static Status GdipDrawLines(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawLines_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawLines(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawLines_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawLinesI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
+ private delegate int GdipDrawLinesI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
private static FunctionWrapper GdipDrawLinesI_ptr;
- internal static Status GdipDrawLinesI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawLinesI_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawLinesI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawLinesI_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawPath_delegate(IntPtr graphics, IntPtr pen, IntPtr path);
+ private delegate int GdipDrawPath_delegate(IntPtr graphics, IntPtr pen, IntPtr path);
private static FunctionWrapper GdipDrawPath_ptr;
- internal static Status GdipDrawPath(IntPtr graphics, IntPtr pen, IntPtr path) => GdipDrawPath_ptr.Delegate(graphics, pen, path);
+ internal static int GdipDrawPath(IntPtr graphics, IntPtr pen, IntPtr path) => GdipDrawPath_ptr.Delegate(graphics, pen, path);
- private delegate Status GdipDrawPie_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
+ private delegate int GdipDrawPie_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipDrawPie_ptr;
- internal static Status GdipDrawPie(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawPie_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipDrawPie(IntPtr graphics, IntPtr pen, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipDrawPie_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipDrawPieI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
+ private delegate int GdipDrawPieI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipDrawPieI_ptr;
- internal static Status GdipDrawPieI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawPieI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipDrawPieI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipDrawPieI_ptr.Delegate(graphics, pen, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipDrawPolygon_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
+ private delegate int GdipDrawPolygon_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
private static FunctionWrapper GdipDrawPolygon_ptr;
- internal static Status GdipDrawPolygon(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawPolygon_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawPolygon(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawPolygon_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawPolygonI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
+ private delegate int GdipDrawPolygonI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
private static FunctionWrapper GdipDrawPolygonI_ptr;
- internal static Status GdipDrawPolygonI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawPolygonI_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawPolygonI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawPolygonI_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawRectangle_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
+ private delegate int GdipDrawRectangle_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
private static FunctionWrapper GdipDrawRectangle_ptr;
- internal static Status GdipDrawRectangle(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawRectangle_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipDrawRectangle(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipDrawRectangle_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipDrawRectangleI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
+ private delegate int GdipDrawRectangleI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
private static FunctionWrapper GdipDrawRectangleI_ptr;
- internal static Status GdipDrawRectangleI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawRectangleI_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipDrawRectangleI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipDrawRectangleI_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipDrawRectangles_delegate(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count);
+ private delegate int GdipDrawRectangles_delegate(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count);
private static FunctionWrapper GdipDrawRectangles_ptr;
- internal static Status GdipDrawRectangles(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count) => GdipDrawRectangles_ptr.Delegate(graphics, pen, rects, count);
+ internal static int GdipDrawRectangles(IntPtr graphics, IntPtr pen, RectangleF[] rects, int count) => GdipDrawRectangles_ptr.Delegate(graphics, pen, rects, count);
- private delegate Status GdipDrawRectanglesI_delegate(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count);
+ private delegate int GdipDrawRectanglesI_delegate(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count);
private static FunctionWrapper GdipDrawRectanglesI_ptr;
- internal static Status GdipDrawRectanglesI(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count) => GdipDrawRectanglesI_ptr.Delegate(graphics, pen, rects, count);
+ internal static int GdipDrawRectanglesI(IntPtr graphics, IntPtr pen, Rectangle[] rects, int count) => GdipDrawRectanglesI_ptr.Delegate(graphics, pen, rects, count);
- private delegate Status GdipFillEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
+ private delegate int GdipFillEllipseI_delegate(IntPtr graphics, IntPtr pen, int x, int y, int width, int height);
private static FunctionWrapper GdipFillEllipseI_ptr;
- internal static Status GdipFillEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipFillEllipseI_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipFillEllipseI(IntPtr graphics, IntPtr pen, int x, int y, int width, int height) => GdipFillEllipseI_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipFillEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
+ private delegate int GdipFillEllipse_delegate(IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
private static FunctionWrapper GdipFillEllipse_ptr;
- internal static Status GdipFillEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipFillEllipse_ptr.Delegate(graphics, pen, x, y, width, height);
+ internal static int GdipFillEllipse(IntPtr graphics, IntPtr pen, float x, float y, float width, float height) => GdipFillEllipse_ptr.Delegate(graphics, pen, x, y, width, height);
- private delegate Status GdipFillPolygon_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode);
+ private delegate int GdipFillPolygon_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode);
private static FunctionWrapper GdipFillPolygon_ptr;
- internal static Status GdipFillPolygon(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode) => GdipFillPolygon_ptr.Delegate(graphics, brush, points, count, fillMode);
+ internal static int GdipFillPolygon(IntPtr graphics, IntPtr brush, PointF[] points, int count, FillMode fillMode) => GdipFillPolygon_ptr.Delegate(graphics, brush, points, count, fillMode);
- private delegate Status GdipFillPolygonI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode);
+ private delegate int GdipFillPolygonI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode);
private static FunctionWrapper GdipFillPolygonI_ptr;
- internal static Status GdipFillPolygonI(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode) => GdipFillPolygonI_ptr.Delegate(graphics, brush, points, count, fillMode);
+ internal static int GdipFillPolygonI(IntPtr graphics, IntPtr brush, Point[] points, int count, FillMode fillMode) => GdipFillPolygonI_ptr.Delegate(graphics, brush, points, count, fillMode);
- private delegate Status GdipFillPolygon2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count);
+ private delegate int GdipFillPolygon2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count);
private static FunctionWrapper GdipFillPolygon2_ptr;
- internal static Status GdipFillPolygon2(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillPolygon2_ptr.Delegate(graphics, brush, points, count);
+ internal static int GdipFillPolygon2(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillPolygon2_ptr.Delegate(graphics, brush, points, count);
- private delegate Status GdipFillPolygon2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count);
+ private delegate int GdipFillPolygon2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count);
private static FunctionWrapper GdipFillPolygon2I_ptr;
- internal static Status GdipFillPolygon2I(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillPolygon2I_ptr.Delegate(graphics, brush, points, count);
+ internal static int GdipFillPolygon2I(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillPolygon2I_ptr.Delegate(graphics, brush, points, count);
- private delegate Status GdipFillRectangle_delegate(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2);
+ private delegate int GdipFillRectangle_delegate(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2);
private static FunctionWrapper GdipFillRectangle_ptr;
- internal static Status GdipFillRectangle(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2) => GdipFillRectangle_ptr.Delegate(graphics, brush, x1, y1, x2, y2);
+ internal static int GdipFillRectangle(IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2) => GdipFillRectangle_ptr.Delegate(graphics, brush, x1, y1, x2, y2);
- private delegate Status GdipFillRectangleI_delegate(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2);
+ private delegate int GdipFillRectangleI_delegate(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2);
private static FunctionWrapper GdipFillRectangleI_ptr;
- internal static Status GdipFillRectangleI(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2) => GdipFillRectangleI_ptr.Delegate(graphics, brush, x1, y1, x2, y2);
+ internal static int GdipFillRectangleI(IntPtr graphics, IntPtr brush, int x1, int y1, int x2, int y2) => GdipFillRectangleI_ptr.Delegate(graphics, brush, x1, y1, x2, y2);
- private delegate Status GdipFillRectangles_delegate(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count);
+ private delegate int GdipFillRectangles_delegate(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count);
private static FunctionWrapper GdipFillRectangles_ptr;
- internal static Status GdipFillRectangles(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count) => GdipFillRectangles_ptr.Delegate(graphics, brush, rects, count);
+ internal static int GdipFillRectangles(IntPtr graphics, IntPtr brush, RectangleF[] rects, int count) => GdipFillRectangles_ptr.Delegate(graphics, brush, rects, count);
- private delegate Status GdipFillRectanglesI_delegate(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count);
+ private delegate int GdipFillRectanglesI_delegate(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count);
private static FunctionWrapper GdipFillRectanglesI_ptr;
- internal static Status GdipFillRectanglesI(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count) => GdipFillRectanglesI_ptr.Delegate(graphics, brush, rects, count);
+ internal static int GdipFillRectanglesI(IntPtr graphics, IntPtr brush, Rectangle[] rects, int count) => GdipFillRectanglesI_ptr.Delegate(graphics, brush, rects, count);
- private delegate Status GdipDrawString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush);
+ private delegate int GdipDrawString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush);
private static FunctionWrapper GdipDrawString_ptr;
- internal static Status GdipDrawString(IntPtr graphics, string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush) => GdipDrawString_ptr.Delegate(graphics, text, len, font, ref rc, format, brush);
+ internal static int GdipDrawString(IntPtr graphics, string text, int len, IntPtr font, ref RectangleF rc, IntPtr format, IntPtr brush) => GdipDrawString_ptr.Delegate(graphics, text, len, font, ref rc, format, brush);
- private delegate Status GdipGetDC_delegate(IntPtr graphics, out IntPtr hdc);
+ private delegate int GdipGetDC_delegate(IntPtr graphics, out IntPtr hdc);
private static FunctionWrapper GdipGetDC_ptr;
- internal static Status GdipGetDC(IntPtr graphics, out IntPtr hdc) => GdipGetDC_ptr.Delegate(graphics, out hdc);
+ internal static int GdipGetDC(IntPtr graphics, out IntPtr hdc) => GdipGetDC_ptr.Delegate(graphics, out hdc);
- private delegate Status GdipReleaseDC_delegate(IntPtr graphics, IntPtr hdc);
+ private delegate int GdipReleaseDC_delegate(IntPtr graphics, IntPtr hdc);
private static FunctionWrapper GdipReleaseDC_ptr;
- internal static Status GdipReleaseDC(IntPtr graphics, IntPtr hdc) => GdipReleaseDC_ptr.Delegate(graphics, hdc);
+ internal static int GdipReleaseDC(IntPtr graphics, IntPtr hdc) => GdipReleaseDC_ptr.Delegate(graphics, hdc);
internal static int IntGdipReleaseDC(HandleRef graphics, HandleRef hdc) => (int)GdipReleaseDC_ptr.Delegate(graphics.Handle, hdc.Handle);
- private delegate Status GdipDrawImageRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int width, int height);
+ private delegate int GdipDrawImageRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int width, int height);
private static FunctionWrapper GdipDrawImageRectI_ptr;
- internal static Status GdipDrawImageRectI(IntPtr graphics, IntPtr image, int x, int y, int width, int height) => GdipDrawImageRectI_ptr.Delegate(graphics, image, x, y, width, height);
+ internal static int GdipDrawImageRectI(IntPtr graphics, IntPtr image, int x, int y, int width, int height) => GdipDrawImageRectI_ptr.Delegate(graphics, image, x, y, width, height);
- private delegate Status GdipGetRenderingOrigin_delegate(IntPtr graphics, out int x, out int y);
+ private delegate int GdipGetRenderingOrigin_delegate(IntPtr graphics, out int x, out int y);
private static FunctionWrapper GdipGetRenderingOrigin_ptr;
- internal static Status GdipGetRenderingOrigin(IntPtr graphics, out int x, out int y) => GdipGetRenderingOrigin_ptr.Delegate(graphics, out x, out y);
+ internal static int GdipGetRenderingOrigin(IntPtr graphics, out int x, out int y) => GdipGetRenderingOrigin_ptr.Delegate(graphics, out x, out y);
- private delegate Status GdipSetRenderingOrigin_delegate(IntPtr graphics, int x, int y);
+ private delegate int GdipSetRenderingOrigin_delegate(IntPtr graphics, int x, int y);
private static FunctionWrapper GdipSetRenderingOrigin_ptr;
- internal static Status GdipSetRenderingOrigin(IntPtr graphics, int x, int y) => GdipSetRenderingOrigin_ptr.Delegate(graphics, x, y);
+ internal static int GdipSetRenderingOrigin(IntPtr graphics, int x, int y) => GdipSetRenderingOrigin_ptr.Delegate(graphics, x, y);
- private delegate Status GdipCloneBitmapArea_delegate(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap);
+ private delegate int GdipCloneBitmapArea_delegate(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap);
private static FunctionWrapper GdipCloneBitmapArea_ptr;
- internal static Status GdipCloneBitmapArea(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapArea_ptr.Delegate(x, y, width, height, format, original, out bitmap);
+ internal static int GdipCloneBitmapArea(float x, float y, float width, float height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapArea_ptr.Delegate(x, y, width, height, format, original, out bitmap);
- private delegate Status GdipCloneBitmapAreaI_delegate(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap);
+ private delegate int GdipCloneBitmapAreaI_delegate(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap);
private static FunctionWrapper GdipCloneBitmapAreaI_ptr;
- internal static Status GdipCloneBitmapAreaI(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapAreaI_ptr.Delegate(x, y, width, height, format, original, out bitmap);
+ internal static int GdipCloneBitmapAreaI(int x, int y, int width, int height, PixelFormat format, IntPtr original, out IntPtr bitmap) => GdipCloneBitmapAreaI_ptr.Delegate(x, y, width, height, format, original, out bitmap);
- private delegate Status GdipGraphicsClear_delegate(IntPtr graphics, int argb);
+ private delegate int GdipGraphicsClear_delegate(IntPtr graphics, int argb);
private static FunctionWrapper GdipGraphicsClear_ptr;
- internal static Status GdipGraphicsClear(IntPtr graphics, int argb) => GdipGraphicsClear_ptr.Delegate(graphics, argb);
+ internal static int GdipGraphicsClear(IntPtr graphics, int argb) => GdipGraphicsClear_ptr.Delegate(graphics, argb);
- private delegate Status GdipDrawClosedCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
+ private delegate int GdipDrawClosedCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
private static FunctionWrapper GdipDrawClosedCurve_ptr;
- internal static Status GdipDrawClosedCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawClosedCurve_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawClosedCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawClosedCurve_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawClosedCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
+ private delegate int GdipDrawClosedCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
private static FunctionWrapper GdipDrawClosedCurveI_ptr;
- internal static Status GdipDrawClosedCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawClosedCurveI_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawClosedCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawClosedCurveI_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawClosedCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension);
+ private delegate int GdipDrawClosedCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension);
private static FunctionWrapper GdipDrawClosedCurve2_ptr;
- internal static Status GdipDrawClosedCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawClosedCurve2_ptr.Delegate(graphics, pen, points, count, tension);
+ internal static int GdipDrawClosedCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawClosedCurve2_ptr.Delegate(graphics, pen, points, count, tension);
- private delegate Status GdipDrawClosedCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension);
+ private delegate int GdipDrawClosedCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension);
private static FunctionWrapper GdipDrawClosedCurve2I_ptr;
- internal static Status GdipDrawClosedCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawClosedCurve2I_ptr.Delegate(graphics, pen, points, count, tension);
+ internal static int GdipDrawClosedCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawClosedCurve2I_ptr.Delegate(graphics, pen, points, count, tension);
- private delegate Status GdipDrawCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
+ private delegate int GdipDrawCurve_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count);
private static FunctionWrapper GdipDrawCurve_ptr;
- internal static Status GdipDrawCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawCurve_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawCurve(IntPtr graphics, IntPtr pen, PointF[] points, int count) => GdipDrawCurve_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
+ private delegate int GdipDrawCurveI_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count);
private static FunctionWrapper GdipDrawCurveI_ptr;
- internal static Status GdipDrawCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawCurveI_ptr.Delegate(graphics, pen, points, count);
+ internal static int GdipDrawCurveI(IntPtr graphics, IntPtr pen, Point[] points, int count) => GdipDrawCurveI_ptr.Delegate(graphics, pen, points, count);
- private delegate Status GdipDrawCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension);
+ private delegate int GdipDrawCurve2_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension);
private static FunctionWrapper GdipDrawCurve2_ptr;
- internal static Status GdipDrawCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawCurve2_ptr.Delegate(graphics, pen, points, count, tension);
+ internal static int GdipDrawCurve2(IntPtr graphics, IntPtr pen, PointF[] points, int count, float tension) => GdipDrawCurve2_ptr.Delegate(graphics, pen, points, count, tension);
- private delegate Status GdipDrawCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension);
+ private delegate int GdipDrawCurve2I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension);
private static FunctionWrapper GdipDrawCurve2I_ptr;
- internal static Status GdipDrawCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawCurve2I_ptr.Delegate(graphics, pen, points, count, tension);
+ internal static int GdipDrawCurve2I(IntPtr graphics, IntPtr pen, Point[] points, int count, float tension) => GdipDrawCurve2I_ptr.Delegate(graphics, pen, points, count, tension);
- private delegate Status GdipDrawCurve3_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension);
+ private delegate int GdipDrawCurve3_delegate(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension);
private static FunctionWrapper GdipDrawCurve3_ptr;
- internal static Status GdipDrawCurve3(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension);
+ internal static int GdipDrawCurve3(IntPtr graphics, IntPtr pen, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension);
- private delegate Status GdipDrawCurve3I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension);
+ private delegate int GdipDrawCurve3I_delegate(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension);
private static FunctionWrapper GdipDrawCurve3I_ptr;
- internal static Status GdipDrawCurve3I(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3I_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension);
+ internal static int GdipDrawCurve3I(IntPtr graphics, IntPtr pen, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipDrawCurve3I_ptr.Delegate(graphics, pen, points, count, offset, numberOfSegments, tension);
- private delegate Status GdipFillClosedCurve_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count);
+ private delegate int GdipFillClosedCurve_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count);
private static FunctionWrapper GdipFillClosedCurve_ptr;
- internal static Status GdipFillClosedCurve(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillClosedCurve_ptr.Delegate(graphics, brush, points, count);
+ internal static int GdipFillClosedCurve(IntPtr graphics, IntPtr brush, PointF[] points, int count) => GdipFillClosedCurve_ptr.Delegate(graphics, brush, points, count);
- private delegate Status GdipFillClosedCurveI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count);
+ private delegate int GdipFillClosedCurveI_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count);
private static FunctionWrapper GdipFillClosedCurveI_ptr;
- internal static Status GdipFillClosedCurveI(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillClosedCurveI_ptr.Delegate(graphics, brush, points, count);
+ internal static int GdipFillClosedCurveI(IntPtr graphics, IntPtr brush, Point[] points, int count) => GdipFillClosedCurveI_ptr.Delegate(graphics, brush, points, count);
- private delegate Status GdipFillClosedCurve2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode);
+ private delegate int GdipFillClosedCurve2_delegate(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode);
private static FunctionWrapper GdipFillClosedCurve2_ptr;
- internal static Status GdipFillClosedCurve2(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2_ptr.Delegate(graphics, brush, points, count, tension, fillMode);
+ internal static int GdipFillClosedCurve2(IntPtr graphics, IntPtr brush, PointF[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2_ptr.Delegate(graphics, brush, points, count, tension, fillMode);
- private delegate Status GdipFillClosedCurve2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode);
+ private delegate int GdipFillClosedCurve2I_delegate(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode);
private static FunctionWrapper GdipFillClosedCurve2I_ptr;
- internal static Status GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2I_ptr.Delegate(graphics, brush, points, count, tension, fillMode);
+ internal static int GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush, Point[] points, int count, float tension, FillMode fillMode) => GdipFillClosedCurve2I_ptr.Delegate(graphics, brush, points, count, tension, fillMode);
- private delegate Status GdipFillPie_delegate(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle);
+ private delegate int GdipFillPie_delegate(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipFillPie_ptr;
- internal static Status GdipFillPie(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipFillPie_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipFillPie(IntPtr graphics, IntPtr brush, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipFillPie_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipFillPieI_delegate(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle);
+ private delegate int GdipFillPieI_delegate(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipFillPieI_ptr;
- internal static Status GdipFillPieI(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipFillPieI_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipFillPieI(IntPtr graphics, IntPtr brush, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipFillPieI_ptr.Delegate(graphics, brush, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipFillPath_delegate(IntPtr graphics, IntPtr brush, IntPtr path);
+ private delegate int GdipFillPath_delegate(IntPtr graphics, IntPtr brush, IntPtr path);
private static FunctionWrapper GdipFillPath_ptr;
- internal static Status GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path) => GdipFillPath_ptr.Delegate(graphics, brush, path);
+ internal static int GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path) => GdipFillPath_ptr.Delegate(graphics, brush, path);
- private delegate Status GdipGetNearestColor_delegate(IntPtr graphics, out int argb);
+ private delegate int GdipGetNearestColor_delegate(IntPtr graphics, out int argb);
private static FunctionWrapper GdipGetNearestColor_ptr;
- internal static Status GdipGetNearestColor(IntPtr graphics, out int argb) => GdipGetNearestColor_ptr.Delegate(graphics, out argb);
+ internal static int GdipGetNearestColor(IntPtr graphics, out int argb) => GdipGetNearestColor_ptr.Delegate(graphics, out argb);
- private delegate Status GdipTransformPoints_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count);
+ private delegate int GdipTransformPoints_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count);
private static FunctionWrapper GdipTransformPoints_ptr;
- internal static Status GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPoints_ptr.Delegate(graphics, destSpace, srcSpace, points, count);
+ internal static int GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPoints_ptr.Delegate(graphics, destSpace, srcSpace, points, count);
- private delegate Status GdipTransformPointsI_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count);
+ private delegate int GdipTransformPointsI_delegate(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count);
private static FunctionWrapper GdipTransformPointsI_ptr;
- internal static Status GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPointsI_ptr.Delegate(graphics, destSpace, srcSpace, points, count);
+ internal static int GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace, CoordinateSpace srcSpace, IntPtr points, int count) => GdipTransformPointsI_ptr.Delegate(graphics, destSpace, srcSpace, points, count);
- private delegate Status GdipSetCompositingMode_delegate(IntPtr graphics, CompositingMode compositingMode);
+ private delegate int GdipSetCompositingMode_delegate(IntPtr graphics, CompositingMode compositingMode);
private static FunctionWrapper GdipSetCompositingMode_ptr;
- internal static Status GdipSetCompositingMode(IntPtr graphics, CompositingMode compositingMode) => GdipSetCompositingMode_ptr.Delegate(graphics, compositingMode);
+ internal static int GdipSetCompositingMode(IntPtr graphics, CompositingMode compositingMode) => GdipSetCompositingMode_ptr.Delegate(graphics, compositingMode);
- private delegate Status GdipGetCompositingMode_delegate(IntPtr graphics, out CompositingMode compositingMode);
+ private delegate int GdipGetCompositingMode_delegate(IntPtr graphics, out CompositingMode compositingMode);
private static FunctionWrapper GdipGetCompositingMode_ptr;
- internal static Status GdipGetCompositingMode(IntPtr graphics, out CompositingMode compositingMode) => GdipGetCompositingMode_ptr.Delegate(graphics, out compositingMode);
+ internal static int GdipGetCompositingMode(IntPtr graphics, out CompositingMode compositingMode) => GdipGetCompositingMode_ptr.Delegate(graphics, out compositingMode);
- private delegate Status GdipSetCompositingQuality_delegate(IntPtr graphics, CompositingQuality compositingQuality);
+ private delegate int GdipSetCompositingQuality_delegate(IntPtr graphics, CompositingQuality compositingQuality);
private static FunctionWrapper GdipSetCompositingQuality_ptr;
- internal static Status GdipSetCompositingQuality(IntPtr graphics, CompositingQuality compositingQuality) => GdipSetCompositingQuality_ptr.Delegate(graphics, compositingQuality);
+ internal static int GdipSetCompositingQuality(IntPtr graphics, CompositingQuality compositingQuality) => GdipSetCompositingQuality_ptr.Delegate(graphics, compositingQuality);
- private delegate Status GdipGetCompositingQuality_delegate(IntPtr graphics, out CompositingQuality compositingQuality);
+ private delegate int GdipGetCompositingQuality_delegate(IntPtr graphics, out CompositingQuality compositingQuality);
private static FunctionWrapper GdipGetCompositingQuality_ptr;
- internal static Status GdipGetCompositingQuality(IntPtr graphics, out CompositingQuality compositingQuality) => GdipGetCompositingQuality_ptr.Delegate(graphics, out compositingQuality);
+ internal static int GdipGetCompositingQuality(IntPtr graphics, out CompositingQuality compositingQuality) => GdipGetCompositingQuality_ptr.Delegate(graphics, out compositingQuality);
- private delegate Status GdipSetInterpolationMode_delegate(IntPtr graphics, InterpolationMode interpolationMode);
+ private delegate int GdipSetInterpolationMode_delegate(IntPtr graphics, InterpolationMode interpolationMode);
private static FunctionWrapper GdipSetInterpolationMode_ptr;
- internal static Status GdipSetInterpolationMode(IntPtr graphics, InterpolationMode interpolationMode) => GdipSetInterpolationMode_ptr.Delegate(graphics, interpolationMode);
+ internal static int GdipSetInterpolationMode(IntPtr graphics, InterpolationMode interpolationMode) => GdipSetInterpolationMode_ptr.Delegate(graphics, interpolationMode);
- private delegate Status GdipGetInterpolationMode_delegate(IntPtr graphics, out InterpolationMode interpolationMode);
+ private delegate int GdipGetInterpolationMode_delegate(IntPtr graphics, out InterpolationMode interpolationMode);
private static FunctionWrapper GdipGetInterpolationMode_ptr;
- internal static Status GdipGetInterpolationMode(IntPtr graphics, out InterpolationMode interpolationMode) => GdipGetInterpolationMode_ptr.Delegate(graphics, out interpolationMode);
+ internal static int GdipGetInterpolationMode(IntPtr graphics, out InterpolationMode interpolationMode) => GdipGetInterpolationMode_ptr.Delegate(graphics, out interpolationMode);
- private delegate Status GdipGetDpiX_delegate(IntPtr graphics, out float dpi);
+ private delegate int GdipGetDpiX_delegate(IntPtr graphics, out float dpi);
private static FunctionWrapper GdipGetDpiX_ptr;
- internal static Status GdipGetDpiX(IntPtr graphics, out float dpi) => GdipGetDpiX_ptr.Delegate(graphics, out dpi);
+ internal static int GdipGetDpiX(IntPtr graphics, out float dpi) => GdipGetDpiX_ptr.Delegate(graphics, out dpi);
- private delegate Status GdipGetDpiY_delegate(IntPtr graphics, out float dpi);
+ private delegate int GdipGetDpiY_delegate(IntPtr graphics, out float dpi);
private static FunctionWrapper GdipGetDpiY_ptr;
- internal static Status GdipGetDpiY(IntPtr graphics, out float dpi) => GdipGetDpiY_ptr.Delegate(graphics, out dpi);
+ internal static int GdipGetDpiY(IntPtr graphics, out float dpi) => GdipGetDpiY_ptr.Delegate(graphics, out dpi);
- private delegate Status GdipGetPageUnit_delegate(IntPtr graphics, out GraphicsUnit unit);
+ private delegate int GdipGetPageUnit_delegate(IntPtr graphics, out GraphicsUnit unit);
private static FunctionWrapper GdipGetPageUnit_ptr;
- internal static Status GdipGetPageUnit(IntPtr graphics, out GraphicsUnit unit) => GdipGetPageUnit_ptr.Delegate(graphics, out unit);
+ internal static int GdipGetPageUnit(IntPtr graphics, out GraphicsUnit unit) => GdipGetPageUnit_ptr.Delegate(graphics, out unit);
- private delegate Status GdipGetPageScale_delegate(IntPtr graphics, out float scale);
+ private delegate int GdipGetPageScale_delegate(IntPtr graphics, out float scale);
private static FunctionWrapper GdipGetPageScale_ptr;
- internal static Status GdipGetPageScale(IntPtr graphics, out float scale) => GdipGetPageScale_ptr.Delegate(graphics, out scale);
+ internal static int GdipGetPageScale(IntPtr graphics, out float scale) => GdipGetPageScale_ptr.Delegate(graphics, out scale);
- private delegate Status GdipSetPageUnit_delegate(IntPtr graphics, GraphicsUnit unit);
+ private delegate int GdipSetPageUnit_delegate(IntPtr graphics, GraphicsUnit unit);
private static FunctionWrapper GdipSetPageUnit_ptr;
- internal static Status GdipSetPageUnit(IntPtr graphics, GraphicsUnit unit) => GdipSetPageUnit_ptr.Delegate(graphics, unit);
+ internal static int GdipSetPageUnit(IntPtr graphics, GraphicsUnit unit) => GdipSetPageUnit_ptr.Delegate(graphics, unit);
- private delegate Status GdipSetPageScale_delegate(IntPtr graphics, float scale);
+ private delegate int GdipSetPageScale_delegate(IntPtr graphics, float scale);
private static FunctionWrapper GdipSetPageScale_ptr;
- internal static Status GdipSetPageScale(IntPtr graphics, float scale) => GdipSetPageScale_ptr.Delegate(graphics, scale);
+ internal static int GdipSetPageScale(IntPtr graphics, float scale) => GdipSetPageScale_ptr.Delegate(graphics, scale);
- private delegate Status GdipSetPixelOffsetMode_delegate(IntPtr graphics, PixelOffsetMode pixelOffsetMode);
+ private delegate int GdipSetPixelOffsetMode_delegate(IntPtr graphics, PixelOffsetMode pixelOffsetMode);
private static FunctionWrapper GdipSetPixelOffsetMode_ptr;
- internal static Status GdipSetPixelOffsetMode(IntPtr graphics, PixelOffsetMode pixelOffsetMode) => GdipSetPixelOffsetMode_ptr.Delegate(graphics, pixelOffsetMode);
+ internal static int GdipSetPixelOffsetMode(IntPtr graphics, PixelOffsetMode pixelOffsetMode) => GdipSetPixelOffsetMode_ptr.Delegate(graphics, pixelOffsetMode);
- private delegate Status GdipGetPixelOffsetMode_delegate(IntPtr graphics, out PixelOffsetMode pixelOffsetMode);
+ private delegate int GdipGetPixelOffsetMode_delegate(IntPtr graphics, out PixelOffsetMode pixelOffsetMode);
private static FunctionWrapper GdipGetPixelOffsetMode_ptr;
- internal static Status GdipGetPixelOffsetMode(IntPtr graphics, out PixelOffsetMode pixelOffsetMode) => GdipGetPixelOffsetMode_ptr.Delegate(graphics, out pixelOffsetMode);
+ internal static int GdipGetPixelOffsetMode(IntPtr graphics, out PixelOffsetMode pixelOffsetMode) => GdipGetPixelOffsetMode_ptr.Delegate(graphics, out pixelOffsetMode);
- private delegate Status GdipSetSmoothingMode_delegate(IntPtr graphics, SmoothingMode smoothingMode);
+ private delegate int GdipSetSmoothingMode_delegate(IntPtr graphics, SmoothingMode smoothingMode);
private static FunctionWrapper GdipSetSmoothingMode_ptr;
- internal static Status GdipSetSmoothingMode(IntPtr graphics, SmoothingMode smoothingMode) => GdipSetSmoothingMode_ptr.Delegate(graphics, smoothingMode);
+ internal static int GdipSetSmoothingMode(IntPtr graphics, SmoothingMode smoothingMode) => GdipSetSmoothingMode_ptr.Delegate(graphics, smoothingMode);
- private delegate Status GdipGetSmoothingMode_delegate(IntPtr graphics, out SmoothingMode smoothingMode);
+ private delegate int GdipGetSmoothingMode_delegate(IntPtr graphics, out SmoothingMode smoothingMode);
private static FunctionWrapper GdipGetSmoothingMode_ptr;
- internal static Status GdipGetSmoothingMode(IntPtr graphics, out SmoothingMode smoothingMode) => GdipGetSmoothingMode_ptr.Delegate(graphics, out smoothingMode);
+ internal static int GdipGetSmoothingMode(IntPtr graphics, out SmoothingMode smoothingMode) => GdipGetSmoothingMode_ptr.Delegate(graphics, out smoothingMode);
- private delegate Status GdipSetTextContrast_delegate(IntPtr graphics, int contrast);
+ private delegate int GdipSetTextContrast_delegate(IntPtr graphics, int contrast);
private static FunctionWrapper GdipSetTextContrast_ptr;
- internal static Status GdipSetTextContrast(IntPtr graphics, int contrast) => GdipSetTextContrast_ptr.Delegate(graphics, contrast);
+ internal static int GdipSetTextContrast(IntPtr graphics, int contrast) => GdipSetTextContrast_ptr.Delegate(graphics, contrast);
- private delegate Status GdipGetTextContrast_delegate(IntPtr graphics, out int contrast);
+ private delegate int GdipGetTextContrast_delegate(IntPtr graphics, out int contrast);
private static FunctionWrapper GdipGetTextContrast_ptr;
- internal static Status GdipGetTextContrast(IntPtr graphics, out int contrast) => GdipGetTextContrast_ptr.Delegate(graphics, out contrast);
+ internal static int GdipGetTextContrast(IntPtr graphics, out int contrast) => GdipGetTextContrast_ptr.Delegate(graphics, out contrast);
- private delegate Status GdipSetTextRenderingHint_delegate(IntPtr graphics, TextRenderingHint mode);
+ private delegate int GdipSetTextRenderingHint_delegate(IntPtr graphics, TextRenderingHint mode);
private static FunctionWrapper GdipSetTextRenderingHint_ptr;
- internal static Status GdipSetTextRenderingHint(IntPtr graphics, TextRenderingHint mode) => GdipSetTextRenderingHint_ptr.Delegate(graphics, mode);
+ internal static int GdipSetTextRenderingHint(IntPtr graphics, TextRenderingHint mode) => GdipSetTextRenderingHint_ptr.Delegate(graphics, mode);
- private delegate Status GdipGetTextRenderingHint_delegate(IntPtr graphics, out TextRenderingHint mode);
+ private delegate int GdipGetTextRenderingHint_delegate(IntPtr graphics, out TextRenderingHint mode);
private static FunctionWrapper GdipGetTextRenderingHint_ptr;
- internal static Status GdipGetTextRenderingHint(IntPtr graphics, out TextRenderingHint mode) => GdipGetTextRenderingHint_ptr.Delegate(graphics, out mode);
+ internal static int GdipGetTextRenderingHint(IntPtr graphics, out TextRenderingHint mode) => GdipGetTextRenderingHint_ptr.Delegate(graphics, out mode);
- private delegate Status GdipFlush_delegate(IntPtr graphics, FlushIntention intention);
+ private delegate int GdipFlush_delegate(IntPtr graphics, FlushIntention intention);
private static FunctionWrapper GdipFlush_ptr;
- internal static Status GdipFlush(IntPtr graphics, FlushIntention intention) => GdipFlush_ptr.Delegate(graphics, intention);
+ internal static int GdipFlush(IntPtr graphics, FlushIntention intention) => GdipFlush_ptr.Delegate(graphics, intention);
- private delegate Status GdipAddPathString_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format);
+ private delegate int GdipAddPathString_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format);
private static FunctionWrapper GdipAddPathString_ptr;
- internal static Status GdipAddPathString(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format) => GdipAddPathString_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format);
+ internal static int GdipAddPathString(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref RectangleF layoutRect, IntPtr format) => GdipAddPathString_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format);
- private delegate Status GdipAddPathStringI_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format);
+ private delegate int GdipAddPathStringI_delegate(IntPtr path, [MarshalAs(UnmanagedType.LPWStr)]string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format);
private static FunctionWrapper GdipAddPathStringI_ptr;
- internal static Status GdipAddPathStringI(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format) => GdipAddPathStringI_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format);
+ internal static int GdipAddPathStringI(IntPtr path, string s, int lenght, IntPtr family, int style, float emSize, ref Rectangle layoutRect, IntPtr format) => GdipAddPathStringI_ptr.Delegate(path, s, lenght, family, style, emSize, ref layoutRect, format);
- private delegate Status GdipCreateFromHWND_delegate(IntPtr hwnd, out IntPtr graphics);
+ private delegate int GdipCreateFromHWND_delegate(IntPtr hwnd, out IntPtr graphics);
private static FunctionWrapper GdipCreateFromHWND_ptr;
- internal static Status GdipCreateFromHWND(IntPtr hwnd, out IntPtr graphics) => GdipCreateFromHWND_ptr.Delegate(hwnd, out graphics);
+ internal static int GdipCreateFromHWND(IntPtr hwnd, out IntPtr graphics) => GdipCreateFromHWND_ptr.Delegate(hwnd, out graphics);
- private delegate Status GdipMeasureString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled);
+ private delegate int GdipMeasureString_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled);
private static FunctionWrapper GdipMeasureString_ptr;
- internal static Status GdipMeasureString(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled) => GdipMeasureString_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, out boundingBox, codepointsFitted, linesFilled);
+ internal static int GdipMeasureString(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, out RectangleF boundingBox, int* codepointsFitted, int* linesFilled) => GdipMeasureString_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, out boundingBox, codepointsFitted, linesFilled);
- private delegate Status GdipMeasureCharacterRanges_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions);
+ private delegate int GdipMeasureCharacterRanges_delegate(IntPtr graphics, [MarshalAs(UnmanagedType.LPWStr)]string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions);
private static FunctionWrapper GdipMeasureCharacterRanges_ptr;
- internal static Status GdipMeasureCharacterRanges(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions) => GdipMeasureCharacterRanges_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, regcount, out regions);
+ internal static int GdipMeasureCharacterRanges(IntPtr graphics, string str, int length, IntPtr font, ref RectangleF layoutRect, IntPtr stringFormat, int regcount, out IntPtr regions) => GdipMeasureCharacterRanges_ptr.Delegate(graphics, str, length, font, ref layoutRect, stringFormat, regcount, out regions);
- private delegate Status GdipCreateBitmapFromScan0_delegate(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp);
+ private delegate int GdipCreateBitmapFromScan0_delegate(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp);
private static FunctionWrapper GdipCreateBitmapFromScan0_ptr;
- internal static Status GdipCreateBitmapFromScan0(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp) => GdipCreateBitmapFromScan0_ptr.Delegate(width, height, stride, format, scan0, out bmp);
+ internal static int GdipCreateBitmapFromScan0(int width, int height, int stride, PixelFormat format, IntPtr scan0, out IntPtr bmp) => GdipCreateBitmapFromScan0_ptr.Delegate(width, height, stride, format, scan0, out bmp);
- private delegate Status GdipCreateBitmapFromGraphics_delegate(int width, int height, IntPtr target, out IntPtr bitmap);
+ private delegate int GdipCreateBitmapFromGraphics_delegate(int width, int height, IntPtr target, out IntPtr bitmap);
private static FunctionWrapper GdipCreateBitmapFromGraphics_ptr;
- internal static Status GdipCreateBitmapFromGraphics(int width, int height, IntPtr target, out IntPtr bitmap) => GdipCreateBitmapFromGraphics_ptr.Delegate(width, height, target, out bitmap);
+ internal static int GdipCreateBitmapFromGraphics(int width, int height, IntPtr target, out IntPtr bitmap) => GdipCreateBitmapFromGraphics_ptr.Delegate(width, height, target, out bitmap);
- private delegate Status GdipBitmapLockBits_delegate(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData);
+ private delegate int GdipBitmapLockBits_delegate(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData);
private static FunctionWrapper GdipBitmapLockBits_ptr;
- internal static Status GdipBitmapLockBits(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData) => GdipBitmapLockBits_ptr.Delegate(bmp, ref rc, flags, format, bmpData);
+ internal static int GdipBitmapLockBits(IntPtr bmp, ref Rectangle rc, ImageLockMode flags, PixelFormat format, [In] [Out] BitmapData bmpData) => GdipBitmapLockBits_ptr.Delegate(bmp, ref rc, flags, format, bmpData);
- private delegate Status GdipBitmapSetResolution_delegate(IntPtr bmp, float xdpi, float ydpi);
+ private delegate int GdipBitmapSetResolution_delegate(IntPtr bmp, float xdpi, float ydpi);
private static FunctionWrapper GdipBitmapSetResolution_ptr;
- internal static Status GdipBitmapSetResolution(IntPtr bmp, float xdpi, float ydpi) => GdipBitmapSetResolution_ptr.Delegate(bmp, xdpi, ydpi);
+ internal static int GdipBitmapSetResolution(IntPtr bmp, float xdpi, float ydpi) => GdipBitmapSetResolution_ptr.Delegate(bmp, xdpi, ydpi);
- private delegate Status GdipBitmapUnlockBits_delegate(IntPtr bmp, [In] [Out] BitmapData bmpData);
+ private delegate int GdipBitmapUnlockBits_delegate(IntPtr bmp, [In] [Out] BitmapData bmpData);
private static FunctionWrapper GdipBitmapUnlockBits_ptr;
- internal static Status GdipBitmapUnlockBits(IntPtr bmp, [In] [Out] BitmapData bmpData) => GdipBitmapUnlockBits_ptr.Delegate(bmp, bmpData);
+ internal static int GdipBitmapUnlockBits(IntPtr bmp, [In] [Out] BitmapData bmpData) => GdipBitmapUnlockBits_ptr.Delegate(bmp, bmpData);
- private delegate Status GdipBitmapGetPixel_delegate(IntPtr bmp, int x, int y, out int argb);
+ private delegate int GdipBitmapGetPixel_delegate(IntPtr bmp, int x, int y, out int argb);
private static FunctionWrapper GdipBitmapGetPixel_ptr;
- internal static Status GdipBitmapGetPixel(IntPtr bmp, int x, int y, out int argb) => GdipBitmapGetPixel_ptr.Delegate(bmp, x, y, out argb);
+ internal static int GdipBitmapGetPixel(IntPtr bmp, int x, int y, out int argb) => GdipBitmapGetPixel_ptr.Delegate(bmp, x, y, out argb);
- private delegate Status GdipBitmapSetPixel_delegate(IntPtr bmp, int x, int y, int argb);
+ private delegate int GdipBitmapSetPixel_delegate(IntPtr bmp, int x, int y, int argb);
private static FunctionWrapper GdipBitmapSetPixel_ptr;
- internal static Status GdipBitmapSetPixel(IntPtr bmp, int x, int y, int argb) => GdipBitmapSetPixel_ptr.Delegate(bmp, x, y, argb);
+ internal static int GdipBitmapSetPixel(IntPtr bmp, int x, int y, int argb) => GdipBitmapSetPixel_ptr.Delegate(bmp, x, y, argb);
- private delegate Status GdipLoadImageFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image);
+ private delegate int GdipLoadImageFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image);
private static FunctionWrapper GdipLoadImageFromFile_ptr;
- internal static Status GdipLoadImageFromFile(string filename, out IntPtr image) => GdipLoadImageFromFile_ptr.Delegate(filename, out image);
+ internal static int GdipLoadImageFromFile(string filename, out IntPtr image) => GdipLoadImageFromFile_ptr.Delegate(filename, out image);
- private delegate Status GdipLoadImageFromStream_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, out IntPtr image);
- private static FunctionWrapper GdipLoadImageFromStream_ptr;
- internal static Status GdipLoadImageFromStream(IStream stream, out IntPtr image) => GdipLoadImageFromStream_ptr.Delegate(stream, out image);
-
- private delegate Status GdipSaveImageToStream_delegate(HandleRef image, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(ComIStreamMarshaler))]IStream stream, ref Guid clsidEncoder, HandleRef encoderParams);
- private static FunctionWrapper GdipSaveImageToStream_ptr;
- internal static Status GdipSaveImageToStream(HandleRef image, IStream stream, ref Guid clsidEncoder, HandleRef encoderParams) => GdipSaveImageToStream_ptr.Delegate(image, stream, ref clsidEncoder, encoderParams);
-
- private delegate Status GdipCloneImage_delegate(IntPtr image, out IntPtr imageclone);
+ private delegate int GdipCloneImage_delegate(IntPtr image, out IntPtr imageclone);
private static FunctionWrapper GdipCloneImage_ptr;
- internal static Status GdipCloneImage(IntPtr image, out IntPtr imageclone) => GdipCloneImage_ptr.Delegate(image, out imageclone);
+ internal static int GdipCloneImage(IntPtr image, out IntPtr imageclone) => GdipCloneImage_ptr.Delegate(image, out imageclone);
- private delegate Status GdipLoadImageFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image);
+ private delegate int GdipLoadImageFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr image);
private static FunctionWrapper GdipLoadImageFromFileICM_ptr;
- internal static Status GdipLoadImageFromFileICM(string filename, out IntPtr image) => GdipLoadImageFromFileICM_ptr.Delegate(filename, out image);
+ internal static int GdipLoadImageFromFileICM(string filename, out IntPtr image) => GdipLoadImageFromFileICM_ptr.Delegate(filename, out image);
- private delegate Status GdipCreateBitmapFromHBITMAP_delegate(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image);
+ private delegate int GdipCreateBitmapFromHBITMAP_delegate(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image);
private static FunctionWrapper GdipCreateBitmapFromHBITMAP_ptr;
- internal static Status GdipCreateBitmapFromHBITMAP(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image) => GdipCreateBitmapFromHBITMAP_ptr.Delegate(hBitMap, gdiPalette, out image);
+ internal static int GdipCreateBitmapFromHBITMAP(IntPtr hBitMap, IntPtr gdiPalette, out IntPtr image) => GdipCreateBitmapFromHBITMAP_ptr.Delegate(hBitMap, gdiPalette, out image);
- private delegate Status GdipDisposeImage_delegate(IntPtr image);
+ private delegate int GdipDisposeImage_delegate(IntPtr image);
private static FunctionWrapper GdipDisposeImage_ptr;
- internal static Status GdipDisposeImage(IntPtr image) => GdipDisposeImage_ptr.Delegate(image);
+ internal static int GdipDisposeImage(IntPtr image) => GdipDisposeImage_ptr.Delegate(image);
internal static int IntGdipDisposeImage(HandleRef image) => (int)GdipDisposeImage_ptr.Delegate(image.Handle);
- private delegate Status GdipGetImageFlags_delegate(IntPtr image, out int flag);
+ private delegate int GdipGetImageFlags_delegate(IntPtr image, out int flag);
private static FunctionWrapper GdipGetImageFlags_ptr;
- internal static Status GdipGetImageFlags(IntPtr image, out int flag) => GdipGetImageFlags_ptr.Delegate(image, out flag);
+ internal static int GdipGetImageFlags(IntPtr image, out int flag) => GdipGetImageFlags_ptr.Delegate(image, out flag);
- private delegate Status GdipGetImageType_delegate(IntPtr image, out ImageType type);
+ private delegate int GdipGetImageType_delegate(IntPtr image, out ImageType type);
private static FunctionWrapper GdipGetImageType_ptr;
- internal static Status GdipGetImageType(IntPtr image, out ImageType type) => GdipGetImageType_ptr.Delegate(image, out type);
+ internal static int GdipGetImageType(IntPtr image, out ImageType type) => GdipGetImageType_ptr.Delegate(image, out type);
- private delegate Status GdipImageGetFrameDimensionsCount_delegate(IntPtr image, out uint count);
+ private delegate int GdipImageGetFrameDimensionsCount_delegate(IntPtr image, out uint count);
private static FunctionWrapper GdipImageGetFrameDimensionsCount_ptr;
- internal static Status GdipImageGetFrameDimensionsCount(IntPtr image, out uint count) => GdipImageGetFrameDimensionsCount_ptr.Delegate(image, out count);
+ internal static int GdipImageGetFrameDimensionsCount(IntPtr image, out uint count) => GdipImageGetFrameDimensionsCount_ptr.Delegate(image, out count);
- private delegate Status GdipImageGetFrameDimensionsList_delegate(IntPtr image, [Out] Guid[] dimensionIDs, uint count);
+ private delegate int GdipImageGetFrameDimensionsList_delegate(IntPtr image, [Out] Guid[] dimensionIDs, uint count);
private static FunctionWrapper GdipImageGetFrameDimensionsList_ptr;
- internal static Status GdipImageGetFrameDimensionsList(IntPtr image, [Out] Guid[] dimensionIDs, uint count) => GdipImageGetFrameDimensionsList_ptr.Delegate(image, dimensionIDs, count);
+ internal static int GdipImageGetFrameDimensionsList(IntPtr image, [Out] Guid[] dimensionIDs, uint count) => GdipImageGetFrameDimensionsList_ptr.Delegate(image, dimensionIDs, count);
- private delegate Status GdipGetImageHeight_delegate(IntPtr image, out uint height);
+ private delegate int GdipGetImageHeight_delegate(IntPtr image, out uint height);
private static FunctionWrapper GdipGetImageHeight_ptr;
- internal static Status GdipGetImageHeight(IntPtr image, out uint height) => GdipGetImageHeight_ptr.Delegate(image, out height);
+ internal static int GdipGetImageHeight(IntPtr image, out uint height) => GdipGetImageHeight_ptr.Delegate(image, out height);
- private delegate Status GdipGetImageHorizontalResolution_delegate(IntPtr image, out float resolution);
+ private delegate int GdipGetImageHorizontalResolution_delegate(IntPtr image, out float resolution);
private static FunctionWrapper GdipGetImageHorizontalResolution_ptr;
- internal static Status GdipGetImageHorizontalResolution(IntPtr image, out float resolution) => GdipGetImageHorizontalResolution_ptr.Delegate(image, out resolution);
+ internal static int GdipGetImageHorizontalResolution(IntPtr image, out float resolution) => GdipGetImageHorizontalResolution_ptr.Delegate(image, out resolution);
- private delegate Status GdipGetImagePaletteSize_delegate(IntPtr image, out int size);
+ private delegate int GdipGetImagePaletteSize_delegate(IntPtr image, out int size);
private static FunctionWrapper GdipGetImagePaletteSize_ptr;
- internal static Status GdipGetImagePaletteSize(IntPtr image, out int size) => GdipGetImagePaletteSize_ptr.Delegate(image, out size);
+ internal static int GdipGetImagePaletteSize(IntPtr image, out int size) => GdipGetImagePaletteSize_ptr.Delegate(image, out size);
- private delegate Status GdipGetImagePalette_delegate(IntPtr image, IntPtr palette, int size);
+ private delegate int GdipGetImagePalette_delegate(IntPtr image, IntPtr palette, int size);
private static FunctionWrapper GdipGetImagePalette_ptr;
- internal static Status GdipGetImagePalette(IntPtr image, IntPtr palette, int size) => GdipGetImagePalette_ptr.Delegate(image, palette, size);
+ internal static int GdipGetImagePalette(IntPtr image, IntPtr palette, int size) => GdipGetImagePalette_ptr.Delegate(image, palette, size);
- private delegate Status GdipSetImagePalette_delegate(IntPtr image, IntPtr palette);
+ private delegate int GdipSetImagePalette_delegate(IntPtr image, IntPtr palette);
private static FunctionWrapper GdipSetImagePalette_ptr;
- internal static Status GdipSetImagePalette(IntPtr image, IntPtr palette) => GdipSetImagePalette_ptr.Delegate(image, palette);
+ internal static int GdipSetImagePalette(IntPtr image, IntPtr palette) => GdipSetImagePalette_ptr.Delegate(image, palette);
- private delegate Status GdipGetImageDimension_delegate(IntPtr image, out float width, out float height);
+ private delegate int GdipGetImageDimension_delegate(IntPtr image, out float width, out float height);
private static FunctionWrapper GdipGetImageDimension_ptr;
- internal static Status GdipGetImageDimension(IntPtr image, out float width, out float height) => GdipGetImageDimension_ptr.Delegate(image, out width, out height);
+ internal static int GdipGetImageDimension(IntPtr image, out float width, out float height) => GdipGetImageDimension_ptr.Delegate(image, out width, out height);
- private delegate Status GdipGetImagePixelFormat_delegate(IntPtr image, out PixelFormat format);
+ private delegate int GdipGetImagePixelFormat_delegate(IntPtr image, out PixelFormat format);
private static FunctionWrapper GdipGetImagePixelFormat_ptr;
- internal static Status GdipGetImagePixelFormat(IntPtr image, out PixelFormat format) => GdipGetImagePixelFormat_ptr.Delegate(image, out format);
+ internal static int GdipGetImagePixelFormat(IntPtr image, out PixelFormat format) => GdipGetImagePixelFormat_ptr.Delegate(image, out format);
- private delegate Status GdipGetPropertyCount_delegate(IntPtr image, out uint propNumbers);
+ private delegate int GdipGetPropertyCount_delegate(IntPtr image, out uint propNumbers);
private static FunctionWrapper GdipGetPropertyCount_ptr;
- internal static Status GdipGetPropertyCount(IntPtr image, out uint propNumbers) => GdipGetPropertyCount_ptr.Delegate(image, out propNumbers);
+ internal static int GdipGetPropertyCount(IntPtr image, out uint propNumbers) => GdipGetPropertyCount_ptr.Delegate(image, out propNumbers);
- private delegate Status GdipGetPropertyIdList_delegate(IntPtr image, uint propNumbers, [Out] int[] list);
+ private delegate int GdipGetPropertyIdList_delegate(IntPtr image, uint propNumbers, [Out] int[] list);
private static FunctionWrapper GdipGetPropertyIdList_ptr;
- internal static Status GdipGetPropertyIdList(IntPtr image, uint propNumbers, [Out] int[] list) => GdipGetPropertyIdList_ptr.Delegate(image, propNumbers, list);
+ internal static int GdipGetPropertyIdList(IntPtr image, uint propNumbers, [Out] int[] list) => GdipGetPropertyIdList_ptr.Delegate(image, propNumbers, list);
- private delegate Status GdipGetPropertySize_delegate(IntPtr image, out int bufferSize, out int propNumbers);
+ private delegate int GdipGetPropertySize_delegate(IntPtr image, out int bufferSize, out int propNumbers);
private static FunctionWrapper GdipGetPropertySize_ptr;
- internal static Status GdipGetPropertySize(IntPtr image, out int bufferSize, out int propNumbers) => GdipGetPropertySize_ptr.Delegate(image, out bufferSize, out propNumbers);
+ internal static int GdipGetPropertySize(IntPtr image, out int bufferSize, out int propNumbers) => GdipGetPropertySize_ptr.Delegate(image, out bufferSize, out propNumbers);
- private delegate Status GdipGetAllPropertyItems_delegate(IntPtr image, int bufferSize, int propNumbers, IntPtr items);
+ private delegate int GdipGetAllPropertyItems_delegate(IntPtr image, int bufferSize, int propNumbers, IntPtr items);
private static FunctionWrapper GdipGetAllPropertyItems_ptr;
- internal static Status GdipGetAllPropertyItems(IntPtr image, int bufferSize, int propNumbers, IntPtr items) => GdipGetAllPropertyItems_ptr.Delegate(image, bufferSize, propNumbers, items);
+ internal static int GdipGetAllPropertyItems(IntPtr image, int bufferSize, int propNumbers, IntPtr items) => GdipGetAllPropertyItems_ptr.Delegate(image, bufferSize, propNumbers, items);
- private delegate Status GdipGetImageRawFormat_delegate(IntPtr image, out Guid format);
+ private delegate int GdipGetImageRawFormat_delegate(IntPtr image, out Guid format);
private static FunctionWrapper GdipGetImageRawFormat_ptr;
- internal static Status GdipGetImageRawFormat(IntPtr image, out Guid format) => GdipGetImageRawFormat_ptr.Delegate(image, out format);
+ internal static int GdipGetImageRawFormat(IntPtr image, out Guid format) => GdipGetImageRawFormat_ptr.Delegate(image, out format);
- private delegate Status GdipGetImageVerticalResolution_delegate(IntPtr image, out float resolution);
+ private delegate int GdipGetImageVerticalResolution_delegate(IntPtr image, out float resolution);
private static FunctionWrapper GdipGetImageVerticalResolution_ptr;
- internal static Status GdipGetImageVerticalResolution(IntPtr image, out float resolution) => GdipGetImageVerticalResolution_ptr.Delegate(image, out resolution);
+ internal static int GdipGetImageVerticalResolution(IntPtr image, out float resolution) => GdipGetImageVerticalResolution_ptr.Delegate(image, out resolution);
- private delegate Status GdipGetImageWidth_delegate(IntPtr image, out uint width);
+ private delegate int GdipGetImageWidth_delegate(IntPtr image, out uint width);
private static FunctionWrapper GdipGetImageWidth_ptr;
- internal static Status GdipGetImageWidth(IntPtr image, out uint width) => GdipGetImageWidth_ptr.Delegate(image, out width);
+ internal static int GdipGetImageWidth(IntPtr image, out uint width) => GdipGetImageWidth_ptr.Delegate(image, out width);
- private delegate Status GdipGetImageBounds_delegate(IntPtr image, out RectangleF source, ref GraphicsUnit unit);
+ private delegate int GdipGetImageBounds_delegate(IntPtr image, out RectangleF source, ref GraphicsUnit unit);
private static FunctionWrapper GdipGetImageBounds_ptr;
- internal static Status GdipGetImageBounds(IntPtr image, out RectangleF source, ref GraphicsUnit unit) => GdipGetImageBounds_ptr.Delegate(image, out source, ref unit);
+ internal static int GdipGetImageBounds(IntPtr image, out RectangleF source, ref GraphicsUnit unit) => GdipGetImageBounds_ptr.Delegate(image, out source, ref unit);
- private delegate Status GdipGetEncoderParameterListSize_delegate(IntPtr image, ref Guid encoder, out uint size);
+ private delegate int GdipGetEncoderParameterListSize_delegate(IntPtr image, ref Guid encoder, out uint size);
private static FunctionWrapper GdipGetEncoderParameterListSize_ptr;
- internal static Status GdipGetEncoderParameterListSize(IntPtr image, ref Guid encoder, out uint size) => GdipGetEncoderParameterListSize_ptr.Delegate(image, ref encoder, out size);
+ internal static int GdipGetEncoderParameterListSize(IntPtr image, ref Guid encoder, out uint size) => GdipGetEncoderParameterListSize_ptr.Delegate(image, ref encoder, out size);
- private delegate Status GdipGetEncoderParameterList_delegate(IntPtr image, ref Guid encoder, uint size, IntPtr buffer);
+ private delegate int GdipGetEncoderParameterList_delegate(IntPtr image, ref Guid encoder, uint size, IntPtr buffer);
private static FunctionWrapper GdipGetEncoderParameterList_ptr;
- internal static Status GdipGetEncoderParameterList(IntPtr image, ref Guid encoder, uint size, IntPtr buffer) => GdipGetEncoderParameterList_ptr.Delegate(image, ref encoder, size, buffer);
+ internal static int GdipGetEncoderParameterList(IntPtr image, ref Guid encoder, uint size, IntPtr buffer) => GdipGetEncoderParameterList_ptr.Delegate(image, ref encoder, size, buffer);
- private delegate Status GdipImageGetFrameCount_delegate(IntPtr image, ref Guid guidDimension, out uint count);
+ private delegate int GdipImageGetFrameCount_delegate(IntPtr image, ref Guid guidDimension, out uint count);
private static FunctionWrapper GdipImageGetFrameCount_ptr;
- internal static Status GdipImageGetFrameCount(IntPtr image, ref Guid guidDimension, out uint count) => GdipImageGetFrameCount_ptr.Delegate(image, ref guidDimension, out count);
+ internal static int GdipImageGetFrameCount(IntPtr image, ref Guid guidDimension, out uint count) => GdipImageGetFrameCount_ptr.Delegate(image, ref guidDimension, out count);
- private delegate Status GdipImageSelectActiveFrame_delegate(IntPtr image, ref Guid guidDimension, int frameIndex);
+ private delegate int GdipImageSelectActiveFrame_delegate(IntPtr image, ref Guid guidDimension, int frameIndex);
private static FunctionWrapper GdipImageSelectActiveFrame_ptr;
- internal static Status GdipImageSelectActiveFrame(IntPtr image, ref Guid guidDimension, int frameIndex) => GdipImageSelectActiveFrame_ptr.Delegate(image, ref guidDimension, frameIndex);
+ internal static int GdipImageSelectActiveFrame(IntPtr image, ref Guid guidDimension, int frameIndex) => GdipImageSelectActiveFrame_ptr.Delegate(image, ref guidDimension, frameIndex);
- private delegate Status GdipGetPropertyItemSize_delegate(IntPtr image, int propertyID, out int propertySize);
+ private delegate int GdipGetPropertyItemSize_delegate(IntPtr image, int propertyID, out int propertySize);
private static FunctionWrapper GdipGetPropertyItemSize_ptr;
- internal static Status GdipGetPropertyItemSize(IntPtr image, int propertyID, out int propertySize) => GdipGetPropertyItemSize_ptr.Delegate(image, propertyID, out propertySize);
+ internal static int GdipGetPropertyItemSize(IntPtr image, int propertyID, out int propertySize) => GdipGetPropertyItemSize_ptr.Delegate(image, propertyID, out propertySize);
- private delegate Status GdipGetPropertyItem_delegate(IntPtr image, int propertyID, int propertySize, IntPtr buffer);
+ private delegate int GdipGetPropertyItem_delegate(IntPtr image, int propertyID, int propertySize, IntPtr buffer);
private static FunctionWrapper GdipGetPropertyItem_ptr;
- internal static Status GdipGetPropertyItem(IntPtr image, int propertyID, int propertySize, IntPtr buffer) => GdipGetPropertyItem_ptr.Delegate(image, propertyID, propertySize, buffer);
+ internal static int GdipGetPropertyItem(IntPtr image, int propertyID, int propertySize, IntPtr buffer) => GdipGetPropertyItem_ptr.Delegate(image, propertyID, propertySize, buffer);
- private delegate Status GdipRemovePropertyItem_delegate(IntPtr image, int propertyId);
+ private delegate int GdipRemovePropertyItem_delegate(IntPtr image, int propertyId);
private static FunctionWrapper GdipRemovePropertyItem_ptr;
- internal static Status GdipRemovePropertyItem(IntPtr image, int propertyId) => GdipRemovePropertyItem_ptr.Delegate(image, propertyId);
+ internal static int GdipRemovePropertyItem(IntPtr image, int propertyId) => GdipRemovePropertyItem_ptr.Delegate(image, propertyId);
- private delegate Status GdipSetPropertyItem_delegate(IntPtr image, GdipPropertyItem* propertyItem);
+ private delegate int GdipSetPropertyItem_delegate(IntPtr image, GdipPropertyItem* propertyItem);
private static FunctionWrapper GdipSetPropertyItem_ptr;
- internal static Status GdipSetPropertyItem(IntPtr image, GdipPropertyItem* propertyItem) => GdipSetPropertyItem_ptr.Delegate(image, propertyItem);
+ internal static int GdipSetPropertyItem(IntPtr image, GdipPropertyItem* propertyItem) => GdipSetPropertyItem_ptr.Delegate(image, propertyItem);
- private delegate Status GdipGetImageThumbnail_delegate(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData);
+ private delegate int GdipGetImageThumbnail_delegate(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData);
private static FunctionWrapper GdipGetImageThumbnail_ptr;
- internal static Status GdipGetImageThumbnail(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData) => GdipGetImageThumbnail_ptr.Delegate(image, width, height, out thumbImage, callback, callBackData);
+ internal static int GdipGetImageThumbnail(IntPtr image, uint width, uint height, out IntPtr thumbImage, IntPtr callback, IntPtr callBackData) => GdipGetImageThumbnail_ptr.Delegate(image, width, height, out thumbImage, callback, callBackData);
- private delegate Status GdipImageRotateFlip_delegate(IntPtr image, RotateFlipType rotateFlipType);
+ private delegate int GdipImageRotateFlip_delegate(IntPtr image, RotateFlipType rotateFlipType);
private static FunctionWrapper GdipImageRotateFlip_ptr;
- internal static Status GdipImageRotateFlip(IntPtr image, RotateFlipType rotateFlipType) => GdipImageRotateFlip_ptr.Delegate(image, rotateFlipType);
+ internal static int GdipImageRotateFlip(IntPtr image, RotateFlipType rotateFlipType) => GdipImageRotateFlip_ptr.Delegate(image, rotateFlipType);
- private delegate Status GdipSaveImageToFile_delegate(IntPtr image, [MarshalAs(UnmanagedType.LPWStr)]string filename, ref Guid encoderClsID, IntPtr encoderParameters);
+ private delegate int GdipSaveImageToFile_delegate(IntPtr image, [MarshalAs(UnmanagedType.LPWStr)]string filename, ref Guid encoderClsID, IntPtr encoderParameters);
private static FunctionWrapper GdipSaveImageToFile_ptr;
- internal static Status GdipSaveImageToFile(IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters) => GdipSaveImageToFile_ptr.Delegate(image, filename, ref encoderClsID, encoderParameters);
+ internal static int GdipSaveImageToFile(IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters) => GdipSaveImageToFile_ptr.Delegate(image, filename, ref encoderClsID, encoderParameters);
- private delegate Status GdipSaveAdd_delegate(IntPtr image, IntPtr encoderParameters);
+ private delegate int GdipSaveAdd_delegate(IntPtr image, IntPtr encoderParameters);
private static FunctionWrapper GdipSaveAdd_ptr;
- internal static Status GdipSaveAdd(IntPtr image, IntPtr encoderParameters) => GdipSaveAdd_ptr.Delegate(image, encoderParameters);
+ internal static int GdipSaveAdd(IntPtr image, IntPtr encoderParameters) => GdipSaveAdd_ptr.Delegate(image, encoderParameters);
- private delegate Status GdipSaveAddImage_delegate(IntPtr image, IntPtr imagenew, IntPtr encoderParameters);
+ private delegate int GdipSaveAddImage_delegate(IntPtr image, IntPtr imagenew, IntPtr encoderParameters);
private static FunctionWrapper GdipSaveAddImage_ptr;
- internal static Status GdipSaveAddImage(IntPtr image, IntPtr imagenew, IntPtr encoderParameters) => GdipSaveAddImage_ptr.Delegate(image, imagenew, encoderParameters);
+ internal static int GdipSaveAddImage(IntPtr image, IntPtr imagenew, IntPtr encoderParameters) => GdipSaveAddImage_ptr.Delegate(image, imagenew, encoderParameters);
- private delegate Status GdipDrawImageI_delegate(IntPtr graphics, IntPtr image, int x, int y);
+ private delegate int GdipDrawImageI_delegate(IntPtr graphics, IntPtr image, int x, int y);
private static FunctionWrapper GdipDrawImageI_ptr;
- internal static Status GdipDrawImageI(IntPtr graphics, IntPtr image, int x, int y) => GdipDrawImageI_ptr.Delegate(graphics, image, x, y);
+ internal static int GdipDrawImageI(IntPtr graphics, IntPtr image, int x, int y) => GdipDrawImageI_ptr.Delegate(graphics, image, x, y);
- private delegate Status GdipGetImageGraphicsContext_delegate(IntPtr image, out IntPtr graphics);
+ private delegate int GdipGetImageGraphicsContext_delegate(IntPtr image, out IntPtr graphics);
private static FunctionWrapper GdipGetImageGraphicsContext_ptr;
- internal static Status GdipGetImageGraphicsContext(IntPtr image, out IntPtr graphics) => GdipGetImageGraphicsContext_ptr.Delegate(image, out graphics);
+ internal static int GdipGetImageGraphicsContext(IntPtr image, out IntPtr graphics) => GdipGetImageGraphicsContext_ptr.Delegate(image, out graphics);
- private delegate Status GdipDrawImage_delegate(IntPtr graphics, IntPtr image, float x, float y);
+ private delegate int GdipDrawImage_delegate(IntPtr graphics, IntPtr image, float x, float y);
private static FunctionWrapper GdipDrawImage_ptr;
- internal static Status GdipDrawImage(IntPtr graphics, IntPtr image, float x, float y) => GdipDrawImage_ptr.Delegate(graphics, image, x, y);
+ internal static int GdipDrawImage(IntPtr graphics, IntPtr image, float x, float y) => GdipDrawImage_ptr.Delegate(graphics, image, x, y);
- private delegate Status GdipDrawImagePoints_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count);
+ private delegate int GdipDrawImagePoints_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count);
private static FunctionWrapper GdipDrawImagePoints_ptr;
- internal static Status GdipDrawImagePoints(IntPtr graphics, IntPtr image, PointF[] destPoints, int count) => GdipDrawImagePoints_ptr.Delegate(graphics, image, destPoints, count);
+ internal static int GdipDrawImagePoints(IntPtr graphics, IntPtr image, PointF[] destPoints, int count) => GdipDrawImagePoints_ptr.Delegate(graphics, image, destPoints, count);
- private delegate Status GdipDrawImagePointsI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count);
+ private delegate int GdipDrawImagePointsI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count);
private static FunctionWrapper GdipDrawImagePointsI_ptr;
- internal static Status GdipDrawImagePointsI(IntPtr graphics, IntPtr image, Point[] destPoints, int count) => GdipDrawImagePointsI_ptr.Delegate(graphics, image, destPoints, count);
+ internal static int GdipDrawImagePointsI(IntPtr graphics, IntPtr image, Point[] destPoints, int count) => GdipDrawImagePointsI_ptr.Delegate(graphics, image, destPoints, count);
- private delegate Status GdipDrawImageRectRectI_delegate(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
+ private delegate int GdipDrawImageRectRectI_delegate(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
private static FunctionWrapper GdipDrawImageRectRectI_ptr;
- internal static Status GdipDrawImageRectRectI(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRectI_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
+ internal static int GdipDrawImageRectRectI(IntPtr graphics, IntPtr image, int dstx, int dsty, int dstwidth, int dstheight, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRectI_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
- private delegate Status GdipDrawImageRectRect_delegate(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
+ private delegate int GdipDrawImageRectRect_delegate(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
private static FunctionWrapper GdipDrawImageRectRect_ptr;
- internal static Status GdipDrawImageRectRect(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRect_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
+ internal static int GdipDrawImageRectRect(IntPtr graphics, IntPtr image, float dstx, float dsty, float dstwidth, float dstheight, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImageRectRect_ptr.Delegate(graphics, image, dstx, dsty, dstwidth, dstheight, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
- private delegate Status GdipDrawImagePointsRectI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
+ private delegate int GdipDrawImagePointsRectI_delegate(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
private static FunctionWrapper GdipDrawImagePointsRectI_ptr;
- internal static Status GdipDrawImagePointsRectI(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRectI_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
+ internal static int GdipDrawImagePointsRectI(IntPtr graphics, IntPtr image, Point[] destPoints, int count, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRectI_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
- private delegate Status GdipDrawImagePointsRect_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
+ private delegate int GdipDrawImagePointsRect_delegate(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData);
private static FunctionWrapper GdipDrawImagePointsRect_ptr;
- internal static Status GdipDrawImagePointsRect(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRect_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
+ internal static int GdipDrawImagePointsRect(IntPtr graphics, IntPtr image, PointF[] destPoints, int count, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit, IntPtr imageattr, Graphics.DrawImageAbort callback, IntPtr callbackData) => GdipDrawImagePointsRect_ptr.Delegate(graphics, image, destPoints, count, srcx, srcy, srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
- private delegate Status GdipDrawImageRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float width, float height);
+ private delegate int GdipDrawImageRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float width, float height);
private static FunctionWrapper GdipDrawImageRect_ptr;
- internal static Status GdipDrawImageRect(IntPtr graphics, IntPtr image, float x, float y, float width, float height) => GdipDrawImageRect_ptr.Delegate(graphics, image, x, y, width, height);
+ internal static int GdipDrawImageRect(IntPtr graphics, IntPtr image, float x, float y, float width, float height) => GdipDrawImageRect_ptr.Delegate(graphics, image, x, y, width, height);
- private delegate Status GdipDrawImagePointRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit);
+ private delegate int GdipDrawImagePointRect_delegate(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit);
private static FunctionWrapper GdipDrawImagePointRect_ptr;
- internal static Status GdipDrawImagePointRect(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRect_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
+ internal static int GdipDrawImagePointRect(IntPtr graphics, IntPtr image, float x, float y, float srcx, float srcy, float srcwidth, float srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRect_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
- private delegate Status GdipDrawImagePointRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit);
+ private delegate int GdipDrawImagePointRectI_delegate(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit);
private static FunctionWrapper GdipDrawImagePointRectI_ptr;
- internal static Status GdipDrawImagePointRectI(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRectI_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
+ internal static int GdipDrawImagePointRectI(IntPtr graphics, IntPtr image, int x, int y, int srcx, int srcy, int srcwidth, int srcheight, GraphicsUnit srcUnit) => GdipDrawImagePointRectI_ptr.Delegate(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
- private delegate Status GdipCreateHBITMAPFromBitmap_delegate(IntPtr bmp, out IntPtr HandleBmp, int clrbackground);
+ private delegate int GdipCreateHBITMAPFromBitmap_delegate(IntPtr bmp, out IntPtr HandleBmp, int clrbackground);
private static FunctionWrapper GdipCreateHBITMAPFromBitmap_ptr;
- internal static Status GdipCreateHBITMAPFromBitmap(IntPtr bmp, out IntPtr HandleBmp, int clrbackground) => GdipCreateHBITMAPFromBitmap_ptr.Delegate(bmp, out HandleBmp, clrbackground);
+ internal static int GdipCreateHBITMAPFromBitmap(IntPtr bmp, out IntPtr HandleBmp, int clrbackground) => GdipCreateHBITMAPFromBitmap_ptr.Delegate(bmp, out HandleBmp, clrbackground);
- private delegate Status GdipCreateBitmapFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap);
+ private delegate int GdipCreateBitmapFromFile_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap);
private static FunctionWrapper GdipCreateBitmapFromFile_ptr;
- internal static Status GdipCreateBitmapFromFile(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFile_ptr.Delegate(filename, out bitmap);
+ internal static int GdipCreateBitmapFromFile(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFile_ptr.Delegate(filename, out bitmap);
- private delegate Status GdipCreateBitmapFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap);
+ private delegate int GdipCreateBitmapFromFileICM_delegate([MarshalAs(UnmanagedType.LPWStr)]string filename, out IntPtr bitmap);
private static FunctionWrapper GdipCreateBitmapFromFileICM_ptr;
- internal static Status GdipCreateBitmapFromFileICM(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFileICM_ptr.Delegate(filename, out bitmap);
+ internal static int GdipCreateBitmapFromFileICM(string filename, out IntPtr bitmap) => GdipCreateBitmapFromFileICM_ptr.Delegate(filename, out bitmap);
- private delegate Status GdipCreateHICONFromBitmap_delegate(IntPtr bmp, out IntPtr HandleIcon);
+ private delegate int GdipCreateHICONFromBitmap_delegate(IntPtr bmp, out IntPtr HandleIcon);
private static FunctionWrapper GdipCreateHICONFromBitmap_ptr;
- internal static Status GdipCreateHICONFromBitmap(IntPtr bmp, out IntPtr HandleIcon) => GdipCreateHICONFromBitmap_ptr.Delegate(bmp, out HandleIcon);
+ internal static int GdipCreateHICONFromBitmap(IntPtr bmp, out IntPtr HandleIcon) => GdipCreateHICONFromBitmap_ptr.Delegate(bmp, out HandleIcon);
- private delegate Status GdipCreateBitmapFromHICON_delegate(IntPtr hicon, out IntPtr bitmap);
+ private delegate int GdipCreateBitmapFromHICON_delegate(IntPtr hicon, out IntPtr bitmap);
private static FunctionWrapper GdipCreateBitmapFromHICON_ptr;
- internal static Status GdipCreateBitmapFromHICON(IntPtr hicon, out IntPtr bitmap) => GdipCreateBitmapFromHICON_ptr.Delegate(hicon, out bitmap);
+ internal static int GdipCreateBitmapFromHICON(IntPtr hicon, out IntPtr bitmap) => GdipCreateBitmapFromHICON_ptr.Delegate(hicon, out bitmap);
- private delegate Status GdipCreateBitmapFromResource_delegate(IntPtr hInstance, [MarshalAs(UnmanagedType.LPWStr)]string lpBitmapName, out IntPtr bitmap);
+ private delegate int GdipCreateBitmapFromResource_delegate(IntPtr hInstance, [MarshalAs(UnmanagedType.LPWStr)]string lpBitmapName, out IntPtr bitmap);
private static FunctionWrapper GdipCreateBitmapFromResource_ptr;
- internal static Status GdipCreateBitmapFromResource(IntPtr hInstance, string lpBitmapName, out IntPtr bitmap) => GdipCreateBitmapFromResource_ptr.Delegate(hInstance, lpBitmapName, out bitmap);
+ internal static int GdipCreateBitmapFromResource(IntPtr hInstance, string lpBitmapName, out IntPtr bitmap) => GdipCreateBitmapFromResource_ptr.Delegate(hInstance, lpBitmapName, out bitmap);
- private delegate Status GdipCreatePath_delegate(FillMode brushMode, out IntPtr path);
+ private delegate int GdipCreatePath_delegate(FillMode brushMode, out IntPtr path);
private static FunctionWrapper GdipCreatePath_ptr;
- internal static Status GdipCreatePath(FillMode brushMode, out IntPtr path) => GdipCreatePath_ptr.Delegate(brushMode, out path);
+ internal static int GdipCreatePath(FillMode brushMode, out IntPtr path) => GdipCreatePath_ptr.Delegate(brushMode, out path);
- private delegate Status GdipCreatePath2_delegate(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path);
+ private delegate int GdipCreatePath2_delegate(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path);
private static FunctionWrapper GdipCreatePath2_ptr;
- internal static Status GdipCreatePath2(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2_ptr.Delegate(points, types, count, brushMode, out path);
+ internal static int GdipCreatePath2(PointF[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2_ptr.Delegate(points, types, count, brushMode, out path);
- private delegate Status GdipCreatePath2I_delegate(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path);
+ private delegate int GdipCreatePath2I_delegate(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path);
private static FunctionWrapper GdipCreatePath2I_ptr;
- internal static Status GdipCreatePath2I(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2I_ptr.Delegate(points, types, count, brushMode, out path);
+ internal static int GdipCreatePath2I(Point[] points, byte[] types, int count, FillMode brushMode, out IntPtr path) => GdipCreatePath2I_ptr.Delegate(points, types, count, brushMode, out path);
- private delegate Status GdipClonePath_delegate(IntPtr path, out IntPtr clonePath);
+ private delegate int GdipClonePath_delegate(IntPtr path, out IntPtr clonePath);
private static FunctionWrapper GdipClonePath_ptr;
- internal static Status GdipClonePath(IntPtr path, out IntPtr clonePath) => GdipClonePath_ptr.Delegate(path, out clonePath);
+ internal static int GdipClonePath(IntPtr path, out IntPtr clonePath) => GdipClonePath_ptr.Delegate(path, out clonePath);
- private delegate Status GdipDeletePath_delegate(IntPtr path);
+ private delegate int GdipDeletePath_delegate(IntPtr path);
private static FunctionWrapper GdipDeletePath_ptr;
- internal static Status GdipDeletePath(IntPtr path) => GdipDeletePath_ptr.Delegate(path);
+ internal static int GdipDeletePath(IntPtr path) => GdipDeletePath_ptr.Delegate(path);
internal static int IntGdipDeletePath(HandleRef path) => (int)GdipDeletePath_ptr.Delegate(path.Handle);
- private delegate Status GdipResetPath_delegate(IntPtr path);
+ private delegate int GdipResetPath_delegate(IntPtr path);
private static FunctionWrapper GdipResetPath_ptr;
- internal static Status GdipResetPath(IntPtr path) => GdipResetPath_ptr.Delegate(path);
+ internal static int GdipResetPath(IntPtr path) => GdipResetPath_ptr.Delegate(path);
- private delegate Status GdipGetPointCount_delegate(IntPtr path, out int count);
+ private delegate int GdipGetPointCount_delegate(IntPtr path, out int count);
private static FunctionWrapper GdipGetPointCount_ptr;
- internal static Status GdipGetPointCount(IntPtr path, out int count) => GdipGetPointCount_ptr.Delegate(path, out count);
+ internal static int GdipGetPointCount(IntPtr path, out int count) => GdipGetPointCount_ptr.Delegate(path, out count);
- private delegate Status GdipGetPathTypes_delegate(IntPtr path, [Out] byte[] types, int count);
+ private delegate int GdipGetPathTypes_delegate(IntPtr path, [Out] byte[] types, int count);
private static FunctionWrapper GdipGetPathTypes_ptr;
- internal static Status GdipGetPathTypes(IntPtr path, [Out] byte[] types, int count) => GdipGetPathTypes_ptr.Delegate(path, types, count);
+ internal static int GdipGetPathTypes(IntPtr path, [Out] byte[] types, int count) => GdipGetPathTypes_ptr.Delegate(path, types, count);
- private delegate Status GdipGetPathPoints_delegate(IntPtr path, [Out] PointF[] points, int count);
+ private delegate int GdipGetPathPoints_delegate(IntPtr path, [Out] PointF[] points, int count);
private static FunctionWrapper GdipGetPathPoints_ptr;
- internal static Status GdipGetPathPoints(IntPtr path, [Out] PointF[] points, int count) => GdipGetPathPoints_ptr.Delegate(path, points, count);
+ internal static int GdipGetPathPoints(IntPtr path, [Out] PointF[] points, int count) => GdipGetPathPoints_ptr.Delegate(path, points, count);
- private delegate Status GdipGetPathPointsI_delegate(IntPtr path, [Out] Point[] points, int count);
+ private delegate int GdipGetPathPointsI_delegate(IntPtr path, [Out] Point[] points, int count);
private static FunctionWrapper GdipGetPathPointsI_ptr;
- internal static Status GdipGetPathPointsI(IntPtr path, [Out] Point[] points, int count) => GdipGetPathPointsI_ptr.Delegate(path, points, count);
+ internal static int GdipGetPathPointsI(IntPtr path, [Out] Point[] points, int count) => GdipGetPathPointsI_ptr.Delegate(path, points, count);
- private delegate Status GdipGetPathFillMode_delegate(IntPtr path, out FillMode fillMode);
+ private delegate int GdipGetPathFillMode_delegate(IntPtr path, out FillMode fillMode);
private static FunctionWrapper GdipGetPathFillMode_ptr;
- internal static Status GdipGetPathFillMode(IntPtr path, out FillMode fillMode) => GdipGetPathFillMode_ptr.Delegate(path, out fillMode);
+ internal static int GdipGetPathFillMode(IntPtr path, out FillMode fillMode) => GdipGetPathFillMode_ptr.Delegate(path, out fillMode);
- private delegate Status GdipSetPathFillMode_delegate(IntPtr path, FillMode fillMode);
+ private delegate int GdipSetPathFillMode_delegate(IntPtr path, FillMode fillMode);
private static FunctionWrapper GdipSetPathFillMode_ptr;
- internal static Status GdipSetPathFillMode(IntPtr path, FillMode fillMode) => GdipSetPathFillMode_ptr.Delegate(path, fillMode);
+ internal static int GdipSetPathFillMode(IntPtr path, FillMode fillMode) => GdipSetPathFillMode_ptr.Delegate(path, fillMode);
- private delegate Status GdipStartPathFigure_delegate(IntPtr path);
+ private delegate int GdipStartPathFigure_delegate(IntPtr path);
private static FunctionWrapper GdipStartPathFigure_ptr;
- internal static Status GdipStartPathFigure(IntPtr path) => GdipStartPathFigure_ptr.Delegate(path);
+ internal static int GdipStartPathFigure(IntPtr path) => GdipStartPathFigure_ptr.Delegate(path);
- private delegate Status GdipClosePathFigure_delegate(IntPtr path);
+ private delegate int GdipClosePathFigure_delegate(IntPtr path);
private static FunctionWrapper GdipClosePathFigure_ptr;
- internal static Status GdipClosePathFigure(IntPtr path) => GdipClosePathFigure_ptr.Delegate(path);
+ internal static int GdipClosePathFigure(IntPtr path) => GdipClosePathFigure_ptr.Delegate(path);
- private delegate Status GdipClosePathFigures_delegate(IntPtr path);
+ private delegate int GdipClosePathFigures_delegate(IntPtr path);
private static FunctionWrapper GdipClosePathFigures_ptr;
- internal static Status GdipClosePathFigures(IntPtr path) => GdipClosePathFigures_ptr.Delegate(path);
+ internal static int GdipClosePathFigures(IntPtr path) => GdipClosePathFigures_ptr.Delegate(path);
- private delegate Status GdipSetPathMarker_delegate(IntPtr path);
+ private delegate int GdipSetPathMarker_delegate(IntPtr path);
private static FunctionWrapper GdipSetPathMarker_ptr;
- internal static Status GdipSetPathMarker(IntPtr path) => GdipSetPathMarker_ptr.Delegate(path);
+ internal static int GdipSetPathMarker(IntPtr path) => GdipSetPathMarker_ptr.Delegate(path);
- private delegate Status GdipClearPathMarkers_delegate(IntPtr path);
+ private delegate int GdipClearPathMarkers_delegate(IntPtr path);
private static FunctionWrapper GdipClearPathMarkers_ptr;
- internal static Status GdipClearPathMarkers(IntPtr path) => GdipClearPathMarkers_ptr.Delegate(path);
+ internal static int GdipClearPathMarkers(IntPtr path) => GdipClearPathMarkers_ptr.Delegate(path);
- private delegate Status GdipReversePath_delegate(IntPtr path);
+ private delegate int GdipReversePath_delegate(IntPtr path);
private static FunctionWrapper GdipReversePath_ptr;
- internal static Status GdipReversePath(IntPtr path) => GdipReversePath_ptr.Delegate(path);
+ internal static int GdipReversePath(IntPtr path) => GdipReversePath_ptr.Delegate(path);
- private delegate Status GdipGetPathLastPoint_delegate(IntPtr path, out PointF lastPoint);
+ private delegate int GdipGetPathLastPoint_delegate(IntPtr path, out PointF lastPoint);
private static FunctionWrapper GdipGetPathLastPoint_ptr;
- internal static Status GdipGetPathLastPoint(IntPtr path, out PointF lastPoint) => GdipGetPathLastPoint_ptr.Delegate(path, out lastPoint);
+ internal static int GdipGetPathLastPoint(IntPtr path, out PointF lastPoint) => GdipGetPathLastPoint_ptr.Delegate(path, out lastPoint);
- private delegate Status GdipAddPathLine_delegate(IntPtr path, float x1, float y1, float x2, float y2);
+ private delegate int GdipAddPathLine_delegate(IntPtr path, float x1, float y1, float x2, float y2);
private static FunctionWrapper GdipAddPathLine_ptr;
- internal static Status GdipAddPathLine(IntPtr path, float x1, float y1, float x2, float y2) => GdipAddPathLine_ptr.Delegate(path, x1, y1, x2, y2);
+ internal static int GdipAddPathLine(IntPtr path, float x1, float y1, float x2, float y2) => GdipAddPathLine_ptr.Delegate(path, x1, y1, x2, y2);
- private delegate Status GdipAddPathLine2_delegate(IntPtr path, PointF[] points, int count);
+ private delegate int GdipAddPathLine2_delegate(IntPtr path, PointF[] points, int count);
private static FunctionWrapper GdipAddPathLine2_ptr;
- internal static Status GdipAddPathLine2(IntPtr path, PointF[] points, int count) => GdipAddPathLine2_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathLine2(IntPtr path, PointF[] points, int count) => GdipAddPathLine2_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathLine2I_delegate(IntPtr path, Point[] points, int count);
+ private delegate int GdipAddPathLine2I_delegate(IntPtr path, Point[] points, int count);
private static FunctionWrapper GdipAddPathLine2I_ptr;
- internal static Status GdipAddPathLine2I(IntPtr path, Point[] points, int count) => GdipAddPathLine2I_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathLine2I(IntPtr path, Point[] points, int count) => GdipAddPathLine2I_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathArc_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle);
+ private delegate int GdipAddPathArc_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipAddPathArc_ptr;
- internal static Status GdipAddPathArc(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathArc_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipAddPathArc(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathArc_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipAddPathBezier_delegate(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
+ private delegate int GdipAddPathBezier_delegate(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4);
private static FunctionWrapper GdipAddPathBezier_ptr;
- internal static Status GdipAddPathBezier(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipAddPathBezier_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4);
+ internal static int GdipAddPathBezier(IntPtr path, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) => GdipAddPathBezier_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4);
- private delegate Status GdipAddPathBeziers_delegate(IntPtr path, PointF[] points, int count);
+ private delegate int GdipAddPathBeziers_delegate(IntPtr path, PointF[] points, int count);
private static FunctionWrapper GdipAddPathBeziers_ptr;
- internal static Status GdipAddPathBeziers(IntPtr path, PointF[] points, int count) => GdipAddPathBeziers_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathBeziers(IntPtr path, PointF[] points, int count) => GdipAddPathBeziers_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathCurve_delegate(IntPtr path, PointF[] points, int count);
+ private delegate int GdipAddPathCurve_delegate(IntPtr path, PointF[] points, int count);
private static FunctionWrapper GdipAddPathCurve_ptr;
- internal static Status GdipAddPathCurve(IntPtr path, PointF[] points, int count) => GdipAddPathCurve_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathCurve(IntPtr path, PointF[] points, int count) => GdipAddPathCurve_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathCurveI_delegate(IntPtr path, Point[] points, int count);
+ private delegate int GdipAddPathCurveI_delegate(IntPtr path, Point[] points, int count);
private static FunctionWrapper GdipAddPathCurveI_ptr;
- internal static Status GdipAddPathCurveI(IntPtr path, Point[] points, int count) => GdipAddPathCurveI_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathCurveI(IntPtr path, Point[] points, int count) => GdipAddPathCurveI_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathCurve2_delegate(IntPtr path, PointF[] points, int count, float tension);
+ private delegate int GdipAddPathCurve2_delegate(IntPtr path, PointF[] points, int count, float tension);
private static FunctionWrapper GdipAddPathCurve2_ptr;
- internal static Status GdipAddPathCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathCurve2_ptr.Delegate(path, points, count, tension);
+ internal static int GdipAddPathCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathCurve2_ptr.Delegate(path, points, count, tension);
- private delegate Status GdipAddPathCurve2I_delegate(IntPtr path, Point[] points, int count, float tension);
+ private delegate int GdipAddPathCurve2I_delegate(IntPtr path, Point[] points, int count, float tension);
private static FunctionWrapper GdipAddPathCurve2I_ptr;
- internal static Status GdipAddPathCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathCurve2I_ptr.Delegate(path, points, count, tension);
+ internal static int GdipAddPathCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathCurve2I_ptr.Delegate(path, points, count, tension);
- private delegate Status GdipAddPathCurve3_delegate(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension);
+ private delegate int GdipAddPathCurve3_delegate(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension);
private static FunctionWrapper GdipAddPathCurve3_ptr;
- internal static Status GdipAddPathCurve3(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3_ptr.Delegate(path, points, count, offset, numberOfSegments, tension);
+ internal static int GdipAddPathCurve3(IntPtr path, PointF[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3_ptr.Delegate(path, points, count, offset, numberOfSegments, tension);
- private delegate Status GdipAddPathCurve3I_delegate(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension);
+ private delegate int GdipAddPathCurve3I_delegate(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension);
private static FunctionWrapper GdipAddPathCurve3I_ptr;
- internal static Status GdipAddPathCurve3I(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3I_ptr.Delegate(path, points, count, offset, numberOfSegments, tension);
+ internal static int GdipAddPathCurve3I(IntPtr path, Point[] points, int count, int offset, int numberOfSegments, float tension) => GdipAddPathCurve3I_ptr.Delegate(path, points, count, offset, numberOfSegments, tension);
- private delegate Status GdipAddPathClosedCurve_delegate(IntPtr path, PointF[] points, int count);
+ private delegate int GdipAddPathClosedCurve_delegate(IntPtr path, PointF[] points, int count);
private static FunctionWrapper GdipAddPathClosedCurve_ptr;
- internal static Status GdipAddPathClosedCurve(IntPtr path, PointF[] points, int count) => GdipAddPathClosedCurve_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathClosedCurve(IntPtr path, PointF[] points, int count) => GdipAddPathClosedCurve_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathClosedCurveI_delegate(IntPtr path, Point[] points, int count);
+ private delegate int GdipAddPathClosedCurveI_delegate(IntPtr path, Point[] points, int count);
private static FunctionWrapper GdipAddPathClosedCurveI_ptr;
- internal static Status GdipAddPathClosedCurveI(IntPtr path, Point[] points, int count) => GdipAddPathClosedCurveI_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathClosedCurveI(IntPtr path, Point[] points, int count) => GdipAddPathClosedCurveI_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathClosedCurve2_delegate(IntPtr path, PointF[] points, int count, float tension);
+ private delegate int GdipAddPathClosedCurve2_delegate(IntPtr path, PointF[] points, int count, float tension);
private static FunctionWrapper GdipAddPathClosedCurve2_ptr;
- internal static Status GdipAddPathClosedCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathClosedCurve2_ptr.Delegate(path, points, count, tension);
+ internal static int GdipAddPathClosedCurve2(IntPtr path, PointF[] points, int count, float tension) => GdipAddPathClosedCurve2_ptr.Delegate(path, points, count, tension);
- private delegate Status GdipAddPathClosedCurve2I_delegate(IntPtr path, Point[] points, int count, float tension);
+ private delegate int GdipAddPathClosedCurve2I_delegate(IntPtr path, Point[] points, int count, float tension);
private static FunctionWrapper GdipAddPathClosedCurve2I_ptr;
- internal static Status GdipAddPathClosedCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathClosedCurve2I_ptr.Delegate(path, points, count, tension);
+ internal static int GdipAddPathClosedCurve2I(IntPtr path, Point[] points, int count, float tension) => GdipAddPathClosedCurve2I_ptr.Delegate(path, points, count, tension);
- private delegate Status GdipAddPathRectangle_delegate(IntPtr path, float x, float y, float width, float height);
+ private delegate int GdipAddPathRectangle_delegate(IntPtr path, float x, float y, float width, float height);
private static FunctionWrapper GdipAddPathRectangle_ptr;
- internal static Status GdipAddPathRectangle(IntPtr path, float x, float y, float width, float height) => GdipAddPathRectangle_ptr.Delegate(path, x, y, width, height);
+ internal static int GdipAddPathRectangle(IntPtr path, float x, float y, float width, float height) => GdipAddPathRectangle_ptr.Delegate(path, x, y, width, height);
- private delegate Status GdipAddPathRectangles_delegate(IntPtr path, RectangleF[] rects, int count);
+ private delegate int GdipAddPathRectangles_delegate(IntPtr path, RectangleF[] rects, int count);
private static FunctionWrapper GdipAddPathRectangles_ptr;
- internal static Status GdipAddPathRectangles(IntPtr path, RectangleF[] rects, int count) => GdipAddPathRectangles_ptr.Delegate(path, rects, count);
+ internal static int GdipAddPathRectangles(IntPtr path, RectangleF[] rects, int count) => GdipAddPathRectangles_ptr.Delegate(path, rects, count);
- private delegate Status GdipAddPathEllipse_delegate(IntPtr path, float x, float y, float width, float height);
+ private delegate int GdipAddPathEllipse_delegate(IntPtr path, float x, float y, float width, float height);
private static FunctionWrapper GdipAddPathEllipse_ptr;
- internal static Status GdipAddPathEllipse(IntPtr path, float x, float y, float width, float height) => GdipAddPathEllipse_ptr.Delegate(path, x, y, width, height);
+ internal static int GdipAddPathEllipse(IntPtr path, float x, float y, float width, float height) => GdipAddPathEllipse_ptr.Delegate(path, x, y, width, height);
- private delegate Status GdipAddPathEllipseI_delegate(IntPtr path, int x, int y, int width, int height);
+ private delegate int GdipAddPathEllipseI_delegate(IntPtr path, int x, int y, int width, int height);
private static FunctionWrapper GdipAddPathEllipseI_ptr;
- internal static Status GdipAddPathEllipseI(IntPtr path, int x, int y, int width, int height) => GdipAddPathEllipseI_ptr.Delegate(path, x, y, width, height);
+ internal static int GdipAddPathEllipseI(IntPtr path, int x, int y, int width, int height) => GdipAddPathEllipseI_ptr.Delegate(path, x, y, width, height);
- private delegate Status GdipAddPathPie_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle);
+ private delegate int GdipAddPathPie_delegate(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipAddPathPie_ptr;
- internal static Status GdipAddPathPie(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathPie_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipAddPathPie(IntPtr path, float x, float y, float width, float height, float startAngle, float sweepAngle) => GdipAddPathPie_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipAddPathPieI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle);
+ private delegate int GdipAddPathPieI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipAddPathPieI_ptr;
- internal static Status GdipAddPathPieI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathPieI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipAddPathPieI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathPieI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipAddPathPolygon_delegate(IntPtr path, PointF[] points, int count);
+ private delegate int GdipAddPathPolygon_delegate(IntPtr path, PointF[] points, int count);
private static FunctionWrapper GdipAddPathPolygon_ptr;
- internal static Status GdipAddPathPolygon(IntPtr path, PointF[] points, int count) => GdipAddPathPolygon_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathPolygon(IntPtr path, PointF[] points, int count) => GdipAddPathPolygon_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathPath_delegate(IntPtr path, IntPtr addingPath, bool connect);
+ private delegate int GdipAddPathPath_delegate(IntPtr path, IntPtr addingPath, bool connect);
private static FunctionWrapper GdipAddPathPath_ptr;
- internal static Status GdipAddPathPath(IntPtr path, IntPtr addingPath, bool connect) => GdipAddPathPath_ptr.Delegate(path, addingPath, connect);
+ internal static int GdipAddPathPath(IntPtr path, IntPtr addingPath, bool connect) => GdipAddPathPath_ptr.Delegate(path, addingPath, connect);
- private delegate Status GdipAddPathLineI_delegate(IntPtr path, int x1, int y1, int x2, int y2);
+ private delegate int GdipAddPathLineI_delegate(IntPtr path, int x1, int y1, int x2, int y2);
private static FunctionWrapper GdipAddPathLineI_ptr;
- internal static Status GdipAddPathLineI(IntPtr path, int x1, int y1, int x2, int y2) => GdipAddPathLineI_ptr.Delegate(path, x1, y1, x2, y2);
+ internal static int GdipAddPathLineI(IntPtr path, int x1, int y1, int x2, int y2) => GdipAddPathLineI_ptr.Delegate(path, x1, y1, x2, y2);
- private delegate Status GdipAddPathArcI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle);
+ private delegate int GdipAddPathArcI_delegate(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle);
private static FunctionWrapper GdipAddPathArcI_ptr;
- internal static Status GdipAddPathArcI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathArcI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
+ internal static int GdipAddPathArcI(IntPtr path, int x, int y, int width, int height, float startAngle, float sweepAngle) => GdipAddPathArcI_ptr.Delegate(path, x, y, width, height, startAngle, sweepAngle);
- private delegate Status GdipAddPathBezierI_delegate(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
+ private delegate int GdipAddPathBezierI_delegate(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4);
private static FunctionWrapper GdipAddPathBezierI_ptr;
- internal static Status GdipAddPathBezierI(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipAddPathBezierI_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4);
+ internal static int GdipAddPathBezierI(IntPtr path, int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) => GdipAddPathBezierI_ptr.Delegate(path, x1, y1, x2, y2, x3, y3, x4, y4);
- private delegate Status GdipAddPathBeziersI_delegate(IntPtr path, Point[] points, int count);
+ private delegate int GdipAddPathBeziersI_delegate(IntPtr path, Point[] points, int count);
private static FunctionWrapper GdipAddPathBeziersI_ptr;
- internal static Status GdipAddPathBeziersI(IntPtr path, Point[] points, int count) => GdipAddPathBeziersI_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathBeziersI(IntPtr path, Point[] points, int count) => GdipAddPathBeziersI_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathPolygonI_delegate(IntPtr path, Point[] points, int count);
+ private delegate int GdipAddPathPolygonI_delegate(IntPtr path, Point[] points, int count);
private static FunctionWrapper GdipAddPathPolygonI_ptr;
- internal static Status GdipAddPathPolygonI(IntPtr path, Point[] points, int count) => GdipAddPathPolygonI_ptr.Delegate(path, points, count);
+ internal static int GdipAddPathPolygonI(IntPtr path, Point[] points, int count) => GdipAddPathPolygonI_ptr.Delegate(path, points, count);
- private delegate Status GdipAddPathRectangleI_delegate(IntPtr path, int x, int y, int width, int height);
+ private delegate int GdipAddPathRectangleI_delegate(IntPtr path, int x, int y, int width, int height);
private static FunctionWrapper GdipAddPathRectangleI_ptr;
- internal static Status GdipAddPathRectangleI(IntPtr path, int x, int y, int width, int height) => GdipAddPathRectangleI_ptr.Delegate(path, x, y, width, height);
+ internal static int GdipAddPathRectangleI(IntPtr path, int x, int y, int width, int height) => GdipAddPathRectangleI_ptr.Delegate(path, x, y, width, height);
- private delegate Status GdipAddPathRectanglesI_delegate(IntPtr path, Rectangle[] rects, int count);
+ private delegate int GdipAddPathRectanglesI_delegate(IntPtr path, Rectangle[] rects, int count);
private static FunctionWrapper GdipAddPathRectanglesI_ptr;
- internal static Status GdipAddPathRectanglesI(IntPtr path, Rectangle[] rects, int count) => GdipAddPathRectanglesI_ptr.Delegate(path, rects, count);
+ internal static int GdipAddPathRectanglesI(IntPtr path, Rectangle[] rects, int count) => GdipAddPathRectanglesI_ptr.Delegate(path, rects, count);
- private delegate Status GdipFlattenPath_delegate(IntPtr path, IntPtr matrix, float floatness);
+ private delegate int GdipFlattenPath_delegate(IntPtr path, IntPtr matrix, float floatness);
private static FunctionWrapper GdipFlattenPath_ptr;
- internal static Status GdipFlattenPath(IntPtr path, IntPtr matrix, float floatness) => GdipFlattenPath_ptr.Delegate(path, matrix, floatness);
+ internal static int GdipFlattenPath(IntPtr path, IntPtr matrix, float floatness) => GdipFlattenPath_ptr.Delegate(path, matrix, floatness);
- private delegate Status GdipTransformPath_delegate(IntPtr path, IntPtr matrix);
+ private delegate int GdipTransformPath_delegate(IntPtr path, IntPtr matrix);
private static FunctionWrapper GdipTransformPath_ptr;
- internal static Status GdipTransformPath(IntPtr path, IntPtr matrix) => GdipTransformPath_ptr.Delegate(path, matrix);
+ internal static int GdipTransformPath(IntPtr path, IntPtr matrix) => GdipTransformPath_ptr.Delegate(path, matrix);
- private delegate Status GdipWarpPath_delegate(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness);
+ private delegate int GdipWarpPath_delegate(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness);
private static FunctionWrapper GdipWarpPath_ptr;
- internal static Status GdipWarpPath(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness) => GdipWarpPath_ptr.Delegate(path, matrix, points, count, srcx, srcy, srcwidth, srcheight, mode, flatness);
+ internal static int GdipWarpPath(IntPtr path, IntPtr matrix, PointF[] points, int count, float srcx, float srcy, float srcwidth, float srcheight, WarpMode mode, float flatness) => GdipWarpPath_ptr.Delegate(path, matrix, points, count, srcx, srcy, srcwidth, srcheight, mode, flatness);
- private delegate Status GdipWidenPath_delegate(IntPtr path, IntPtr pen, IntPtr matrix, float flatness);
+ private delegate int GdipWidenPath_delegate(IntPtr path, IntPtr pen, IntPtr matrix, float flatness);
private static FunctionWrapper GdipWidenPath_ptr;
- internal static Status GdipWidenPath(IntPtr path, IntPtr pen, IntPtr matrix, float flatness) => GdipWidenPath_ptr.Delegate(path, pen, matrix, flatness);
+ internal static int GdipWidenPath(IntPtr path, IntPtr pen, IntPtr matrix, float flatness) => GdipWidenPath_ptr.Delegate(path, pen, matrix, flatness);
- private delegate Status GdipGetPathWorldBounds_delegate(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen);
+ private delegate int GdipGetPathWorldBounds_delegate(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen);
private static FunctionWrapper GdipGetPathWorldBounds_ptr;
- internal static Status GdipGetPathWorldBounds(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBounds_ptr.Delegate(path, out bounds, matrix, pen);
+ internal static int GdipGetPathWorldBounds(IntPtr path, out RectangleF bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBounds_ptr.Delegate(path, out bounds, matrix, pen);
- private delegate Status GdipGetPathWorldBoundsI_delegate(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen);
+ private delegate int GdipGetPathWorldBoundsI_delegate(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen);
private static FunctionWrapper GdipGetPathWorldBoundsI_ptr;
- internal static Status GdipGetPathWorldBoundsI(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBoundsI_ptr.Delegate(path, out bounds, matrix, pen);
+ internal static int GdipGetPathWorldBoundsI(IntPtr path, out Rectangle bounds, IntPtr matrix, IntPtr pen) => GdipGetPathWorldBoundsI_ptr.Delegate(path, out bounds, matrix, pen);
- private delegate Status GdipIsVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr graphics, out bool result);
+ private delegate int GdipIsVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr graphics, out bool result);
private static FunctionWrapper GdipIsVisiblePathPoint_ptr;
- internal static Status GdipIsVisiblePathPoint(IntPtr path, float x, float y, IntPtr graphics, out bool result) => GdipIsVisiblePathPoint_ptr.Delegate(path, x, y, graphics, out result);
+ internal static int GdipIsVisiblePathPoint(IntPtr path, float x, float y, IntPtr graphics, out bool result) => GdipIsVisiblePathPoint_ptr.Delegate(path, x, y, graphics, out result);
- private delegate Status GdipIsVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr graphics, out bool result);
+ private delegate int GdipIsVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr graphics, out bool result);
private static FunctionWrapper GdipIsVisiblePathPointI_ptr;
- internal static Status GdipIsVisiblePathPointI(IntPtr path, int x, int y, IntPtr graphics, out bool result) => GdipIsVisiblePathPointI_ptr.Delegate(path, x, y, graphics, out result);
+ internal static int GdipIsVisiblePathPointI(IntPtr path, int x, int y, IntPtr graphics, out bool result) => GdipIsVisiblePathPointI_ptr.Delegate(path, x, y, graphics, out result);
- private delegate Status GdipIsOutlineVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result);
+ private delegate int GdipIsOutlineVisiblePathPoint_delegate(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result);
private static FunctionWrapper GdipIsOutlineVisiblePathPoint_ptr;
- internal static Status GdipIsOutlineVisiblePathPoint(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPoint_ptr.Delegate(path, x, y, pen, graphics, out result);
+ internal static int GdipIsOutlineVisiblePathPoint(IntPtr path, float x, float y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPoint_ptr.Delegate(path, x, y, pen, graphics, out result);
- private delegate Status GdipIsOutlineVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result);
+ private delegate int GdipIsOutlineVisiblePathPointI_delegate(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result);
private static FunctionWrapper GdipIsOutlineVisiblePathPointI_ptr;
- internal static Status GdipIsOutlineVisiblePathPointI(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPointI_ptr.Delegate(path, x, y, pen, graphics, out result);
+ internal static int GdipIsOutlineVisiblePathPointI(IntPtr path, int x, int y, IntPtr pen, IntPtr graphics, out bool result) => GdipIsOutlineVisiblePathPointI_ptr.Delegate(path, x, y, pen, graphics, out result);
- private delegate Status GdipCreateFont_delegate(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font);
+ private delegate int GdipCreateFont_delegate(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font);
private static FunctionWrapper GdipCreateFont_ptr;
- internal static Status GdipCreateFont(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font) => GdipCreateFont_ptr.Delegate(fontFamily, emSize, style, unit, out font);
+ internal static int GdipCreateFont(IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font) => GdipCreateFont_ptr.Delegate(fontFamily, emSize, style, unit, out font);
- private delegate Status GdipDeleteFont_delegate(IntPtr font);
+ private delegate int GdipDeleteFont_delegate(IntPtr font);
private static FunctionWrapper