aboutsummaryrefslogtreecommitdiffstatsci
path: root/Backends/VkvgBackend/src/TextRun.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/TextRun.cs
parentc18fc4cc77a62dda69a4335f5cd51f53ae802995 (diff)
vkvg.net for vkvg backend
Diffstat (limited to 'Backends/VkvgBackend/src/TextRun.cs')
-rw-r--r--Backends/VkvgBackend/src/TextRun.cs56
1 files changed, 0 insertions, 56 deletions
diff --git a/Backends/VkvgBackend/src/TextRun.cs b/Backends/VkvgBackend/src/TextRun.cs
deleted file mode 100644
index 94b94f56..00000000
--- a/Backends/VkvgBackend/src/TextRun.cs
+++ /dev/null
@@ -1,56 +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 TextRun : IDisposable {
-
- IntPtr handle = IntPtr.Zero;
-
- #region CTORS & DTOR
- protected TextRun(IntPtr handle) {
- this.handle = handle;
- }
- public TextRun(string text) {
- handle = NativeMethods.vkvg_text_run_create (handle, Context.TerminateUtf8(text));
- }
-
- ~TextRun() {
- Dispose (false);
- }
- #endregion
-
- //public void AddReference () {
- // NativeMethods.vkvg_pattern_reference (handle);
- //}
- //public uint References () => NativeMethods.vkvg_pattern_get_reference_count (handle);
-
- public IntPtr Handle { get { return handle; } }
-
- public Drawing2D.TextExtents Extents {
- get {
- NativeMethods.vkvg_text_run_get_extents (handle, out TextExtents e);
- return new Drawing2D.TextExtents (e.XBearing, e.YBearing, e.Width, e.Height, e.XAdvance, e.YAdvance);
- }
- }
-
- #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_text_run_destroy (handle);
- handle = IntPtr.Zero;
- }
- #endregion
- }
-} \ No newline at end of file