-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the GraphicsPath type to SafeHandles.
And rename some parameter names in the manually marshalled P/Invoke definitions.
- Loading branch information
1 parent
6d596f7
commit 6b60b9c
Showing
16 changed files
with
465 additions
and
408 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...libraries/System.Drawing.Common/src/Microsoft/Win32/SafeHandles/SafeGraphicsPathHandle.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using Gdip = System.Drawing.SafeNativeMethods.Gdip; | ||
|
||
namespace Microsoft.Win32.SafeHandles | ||
{ | ||
internal class SafeGraphicsPathHandle : SafeGdiPlusHandle | ||
{ | ||
public SafeGraphicsPathHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) | ||
{ | ||
SetHandle(preexistingHandle); | ||
} | ||
|
||
public SafeGraphicsPathHandle() : base(true) | ||
{ | ||
} | ||
|
||
protected override int ReleaseHandleImpl() => Gdip.GdipDeletePath(handle); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.