aboutsummaryrefslogtreecommitdiffstatsci
path: root/Backends/VkvgBackend/src/Gradient.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-12 15:06:17 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2022-01-12 15:06:17 +0100
commit5784f8dca22600b25569ede999cdc795bc8bb8ef (patch)
tree3b4a37f840c513b44902ec6c4a5485d9edd9b577 /Backends/VkvgBackend/src/Gradient.cs
parentc18fc4cc77a62dda69a4335f5cd51f53ae802995 (diff)
vkvg.net for vkvg backend
Diffstat (limited to 'Backends/VkvgBackend/src/Gradient.cs')
-rw-r--r--Backends/VkvgBackend/src/Gradient.cs31
1 files changed, 0 insertions, 31 deletions
diff --git a/Backends/VkvgBackend/src/Gradient.cs b/Backends/VkvgBackend/src/Gradient.cs
deleted file mode 100644
index d2432d66..00000000
--- a/Backends/VkvgBackend/src/Gradient.cs
+++ /dev/null
@@ -1,31 +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 Gradient : Pattern, IGradient
- {
- protected Gradient(IntPtr handle) : base (handle) { }
- public void AddColorStop (double offset, Color c)
- => NativeMethods.vkvg_pattern_add_color_stop(handle, (float)offset, c.R / 255f, c.G / 255f, c.B / 255f, c.A / 255f);
- public void AddColorStop(float offset, float r, float g, float b, float a = 1f)
- => NativeMethods.vkvg_pattern_add_color_stop(handle, offset, r, g, b, a);
- }
- public class LinearGradient : Gradient {
- public LinearGradient (float x0, float y0, float x1, float y1)
- : base (NativeMethods.vkvg_pattern_create_linear(x0, y0, x1, y1)) {
-
- }
- }
- public class RadialGradient : Gradient {
- public RadialGradient ( float cx0, float cy0, float radius0,
- float cx1, float cy1, float radius1)
- : base (NativeMethods.vkvg_pattern_create_radial(cx0, cy0, radius0, cx1, cy1, radius1)) {
-
- }
- }
-} \ No newline at end of file