diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-12 15:38:57 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-12 15:38:57 +0100 |
| commit | 57daad000aa31c7bcfa1f76b90d40da5a21da041 (patch) | |
| tree | 9ff710c123337e407b77d39adafa4b65067db5d1 /Backends/VkvgBackend/src/Pattern.cs | |
| parent | 5784f8dca22600b25569ede999cdc795bc8bb8ef (diff) | |
remove old classes
Diffstat (limited to 'Backends/VkvgBackend/src/Pattern.cs')
| -rw-r--r-- | Backends/VkvgBackend/src/Pattern.cs | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/Backends/VkvgBackend/src/Pattern.cs b/Backends/VkvgBackend/src/Pattern.cs deleted file mode 100644 index d324b2af..00000000 --- a/Backends/VkvgBackend/src/Pattern.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2018-2021 Jean-Philippe Bruyère <jp_bruyere@hotmail.com> -// -// This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) - -using System; -using Drawing2D; - -namespace Crow.VkvgBackend -{ - public class Pattern : IPattern - { - internal IntPtr handle = IntPtr.Zero; - - #region CTORS & DTOR - protected Pattern(IntPtr handle) - { - this.handle = handle; - } - public Pattern(float r, float g, float b) - { - handle = NativeMethods.vkvg_pattern_create_rgb(r, g, b); - } - public Pattern(float r, float g, float b, float a) - { - handle = NativeMethods.vkvg_pattern_create_rgba(r, g, b, a); - } - public Pattern(Surface surf) - { - handle = NativeMethods.vkvg_pattern_create_for_surface(surf.handle); - } - - ~Pattern() - { - Dispose(false); - } - #endregion - - public void AddReference() - { - NativeMethods.vkvg_pattern_reference(handle); - } - public uint References() => NativeMethods.vkvg_pattern_get_reference_count(handle); - - public Extend Extend - { - get => NativeMethods.vkvg_pattern_get_extend(handle); - set { NativeMethods.vkvg_pattern_set_extend(handle, value); } - } - public Filter Filter - { - get => NativeMethods.vkvg_pattern_get_filter(handle); - set { NativeMethods.vkvg_pattern_set_filter(handle, value); } - } - - #region IDisposable implementation - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (!disposing || handle == IntPtr.Zero) - return; - - NativeMethods.vkvg_pattern_destroy(handle); - handle = IntPtr.Zero; - } - #endregion - } -}
\ No newline at end of file |