2026-01-08 21:07:15 +08:00

2534 lines
70 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class DispEngine | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class DispEngine | HiAPI-C# 2025 ">
<meta name="description" content="HiAPI display engine.">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.Disp.DispEngine">
<h1 id="Hi_Disp_DispEngine" data-uid="Hi.Disp.DispEngine" class="text-break">
Class DispEngine
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.Disp.html">Disp</a></dd></dl>
<dl><dt>Assembly</dt><dd>HiDisp.dll</dd></dl>
</div>
<div class="markdown summary"><p>HiAPI display engine.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class DispEngine : IDisposable, IGetDispEngine</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">DispEngine</span></div>
</dd>
</dl>
<dl class="typelist implements">
<dt>Implements</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
<div><a class="xref" href="Hi.Disp.IGetDispEngine.html">IGetDispEngine</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<dl class="typelist extensionMethods">
<dt>Extension Methods</dt>
<dd>
<div>
<a class="xref" href="Hi.Common.DuplicateUtil.html#Hi_Common_DuplicateUtil_TryDuplicate__1___0_System_Object___">DuplicateUtil.TryDuplicate&lt;TSelf&gt;(TSelf, params object[])</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__1___0_System_Action___0__">InvokeUtil.SelfInvoke&lt;TSrc&gt;(TSrc, Action&lt;TSrc&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Common.InvokeUtil.html#Hi_Common_InvokeUtil_SelfInvoke__2___0_System_Func___0___1__">InvokeUtil.SelfInvoke&lt;TSrc, TDst&gt;(TSrc, Func&lt;TSrc, TDst&gt;)</a>
</div>
<div>
<a class="xref" href="Hi.Coloring.ColorUtil.html#Hi_Coloring_ColorUtil_GetGloomyColor_System_Object_System_Double_System_Double_">ColorUtil.GetGloomyColor(object, double, double)</a>
</div>
<div>
<a class="xref" href="Hi.Common.NameUtil.html#Hi_Common_NameUtil_GetSelectionName_System_Object_">NameUtil.GetSelectionName(object)</a>
</div>
<div>
<a class="xref" href="Hi.Common.StringUtil.html#Hi_Common_StringUtil_GetPropertyStringIfToStringNotOverloaded_System_Object_System_Boolean_System_Boolean_">StringUtil.GetPropertyStringIfToStringNotOverloaded(object, bool, bool)</a>
</div>
<div>
<a class="xref" href="Hi.Parallels.LockUtil.html#Hi_Parallels_LockUtil_Lock_System_Object_">LockUtil.Lock(object)</a>
</div>
</dd></dl>
<h2 id="Hi_Disp_DispEngine_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>The <code>DispEngine</code> is the core rendering and interaction engine for HiAPI applications.</p>
<h2 id="related-documentation">Related Documentation</h2>
<ul>
<li><a href="../dev-doc/basic/rendering/rendering-canvas/index.html">Using RenderingCanvas with DispEngine</a></li>
<li><a href="../dev-doc/basic/rendering/rendering-canvas/custom-implementation.html">Building Your Own Rendering Canvas</a></li>
</ul>
<p>The DispEngine provides a unified API for handling rendering, user interaction, and touch gestures across different UI frameworks.</p>
</div>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="Hi_Disp_DispEngine__ctor_" data-uid="Hi.Disp.DispEngine.#ctor*"></a>
<h3 id="Hi_Disp_DispEngine__ctor_Hi_Disp_IDisplayee_" data-uid="Hi.Disp.DispEngine.#ctor(Hi.Disp.IDisplayee)">
DispEngine(IDisplayee)
</h3>
<div class="markdown level1 summary"><p>Ctor.
The <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToHomeView">SetViewToHomeView()</a> is called in this function.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public DispEngine(IDisplayee displayee)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>displayee</code> <a class="xref" href="Hi.Disp.IDisplayee.html">IDisplayee</a></dt>
<dd><p>The displayee to render.</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine__ctor_" data-uid="Hi.Disp.DispEngine.#ctor*"></a>
<h3 id="Hi_Disp_DispEngine__ctor_Hi_Disp_IDisplayee___" data-uid="Hi.Disp.DispEngine.#ctor(Hi.Disp.IDisplayee[])">
DispEngine(params IDisplayee[])
</h3>
<div class="markdown level1 summary"><p>Ctor.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public DispEngine(params IDisplayee[] displayees)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>displayees</code> <a class="xref" href="Hi.Disp.IDisplayee.html">IDisplayee</a>[]</dt>
<dd><p>displayees to render.</p>
</dd>
</dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="Hi_Disp_DispEngine_CoreDll" data-uid="Hi.Disp.DispEngine.CoreDll">
CoreDll
</h3>
<div class="markdown level1 summary"><p>Core dll path.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string CoreDll = &quot;core.dll&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_Disp_DispEngine_defaultFontFile" data-uid="Hi.Disp.DispEngine.defaultFontFile">
defaultFontFile
</h3>
<div class="markdown level1 summary"><p>The default font file path used by the display engine.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string defaultFontFile = &quot;Font/WCL06.ttf&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="Hi_Disp_DispEngine_BackgroundColor_" data-uid="Hi.Disp.DispEngine.BackgroundColor*"></a>
<h3 id="Hi_Disp_DispEngine_BackgroundColor" data-uid="Hi.Disp.DispEngine.BackgroundColor">
BackgroundColor
</h3>
<div class="markdown level1 summary"><p>Background color</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Vec3d BackgroundColor { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Vec3d.html">Vec3d</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_BackgroundOpacity_" data-uid="Hi.Disp.DispEngine.BackgroundOpacity*"></a>
<h3 id="Hi_Disp_DispEngine_BackgroundOpacity" data-uid="Hi.Disp.DispEngine.BackgroundOpacity">
BackgroundOpacity
</h3>
<div class="markdown level1 summary"><p>Background opacity. Range is from 0 to 1.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public double BackgroundOpacity { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_ContextProjDepth_" data-uid="Hi.Disp.DispEngine.ContextProjDepth*"></a>
<h3 id="Hi_Disp_DispEngine_ContextProjDepth" data-uid="Hi.Disp.DispEngine.ContextProjDepth">
ContextProjDepth
</h3>
<div class="markdown level1 summary"><p>Gets the projection depth of the current context.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static double ContextProjDepth { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_CursorOffsetX_" data-uid="Hi.Disp.DispEngine.CursorOffsetX*"></a>
<h3 id="Hi_Disp_DispEngine_CursorOffsetX" data-uid="Hi.Disp.DispEngine.CursorOffsetX">
CursorOffsetX
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CursorOffsetX { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_CursorOffsetY_" data-uid="Hi.Disp.DispEngine.CursorOffsetY*"></a>
<h3 id="Hi_Disp_DispEngine_CursorOffsetY" data-uid="Hi.Disp.DispEngine.CursorOffsetY">
CursorOffsetY
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CursorOffsetY { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_CursorX_" data-uid="Hi.Disp.DispEngine.CursorX*"></a>
<h3 id="Hi_Disp_DispEngine_CursorX" data-uid="Hi.Disp.DispEngine.CursorX">
CursorX
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CursorX { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_CursorY_" data-uid="Hi.Disp.DispEngine.CursorY*"></a>
<h3 id="Hi_Disp_DispEngine_CursorY" data-uid="Hi.Disp.DispEngine.CursorY">
CursorY
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int CursorY { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_Displayee_" data-uid="Hi.Disp.DispEngine.Displayee*"></a>
<h3 id="Hi_Disp_DispEngine_Displayee" data-uid="Hi.Disp.DispEngine.Displayee">
Displayee
</h3>
<div class="markdown level1 summary"><p>Displayee to be rendered in the rendering loop.
The <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToHomeView">SetViewToHomeView()</a> is called in this function.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IDisplayee Displayee { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Disp.IDisplayee.html">IDisplayee</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_EnableSuppressDefaultLogo_" data-uid="Hi.Disp.DispEngine.EnableSuppressDefaultLogo*"></a>
<h3 id="Hi_Disp_DispEngine_EnableSuppressDefaultLogo" data-uid="Hi.Disp.DispEngine.EnableSuppressDefaultLogo">
EnableSuppressDefaultLogo
</h3>
<div class="markdown level1 summary"><p>Get or Set to Enable Suppress Default Logo.
The set take no effect if the license <a class="xref" href="Hi.Licenses.AuthFeature.html#Hi_Licenses_AuthFeature_SuppressDefaultLogo">SuppressDefaultLogo</a> is not login.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool EnableSuppressDefaultLogo { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_FontFile_" data-uid="Hi.Disp.DispEngine.FontFile*"></a>
<h3 id="Hi_Disp_DispEngine_FontFile" data-uid="Hi.Disp.DispEngine.FontFile">
FontFile
</h3>
<div class="markdown level1 summary"><p>Font file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static string FontFile { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_IsOnDispThread_" data-uid="Hi.Disp.DispEngine.IsOnDispThread*"></a>
<h3 id="Hi_Disp_DispEngine_IsOnDispThread" data-uid="Hi.Disp.DispEngine.IsOnDispThread">
IsOnDispThread
</h3>
<div class="markdown level1 summary"><p>Gets a value indicating whether the current thread is the display thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static bool IsOnDispThread { get; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_IsVisible_" data-uid="Hi.Disp.DispEngine.IsVisible*"></a>
<h3 id="Hi_Disp_DispEngine_IsVisible" data-uid="Hi.Disp.DispEngine.IsVisible">
IsVisible
</h3>
<div class="markdown level1 summary"><p>The anime stop running if the value is false;
otherwise, the anime starts or keeps running.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool IsVisible { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_Model_" data-uid="Hi.Disp.DispEngine.Model*"></a>
<h3 id="Hi_Disp_DispEngine_Model" data-uid="Hi.Disp.DispEngine.Model">
Model
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Mat4d Model { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a></dt>
<dd><p>Model matrix in MVP convention.
This Model matrix is the first matrix in <span class="xref">Hi.Disp.Bind.modelMatStack</span>.</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_PixelProj_" data-uid="Hi.Disp.DispEngine.PixelProj*"></a>
<h3 id="Hi_Disp_DispEngine_PixelProj" data-uid="Hi.Disp.DispEngine.PixelProj">
PixelProj
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Mat4d PixelProj { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a></dt>
<dd><p>Pixel part of Projection matrix in MVP convention.
Projection matrix = <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_ScaleProj">ScaleProj</a> * <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_PixelProj">PixelProj</a>;</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_PreCursorX_" data-uid="Hi.Disp.DispEngine.PreCursorX*"></a>
<h3 id="Hi_Disp_DispEngine_PreCursorX" data-uid="Hi.Disp.DispEngine.PreCursorX">
PreCursorX
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int PreCursorX { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_PreCursorY_" data-uid="Hi.Disp.DispEngine.PreCursorY*"></a>
<h3 id="Hi_Disp_DispEngine_PreCursorY" data-uid="Hi.Disp.DispEngine.PreCursorY">
PreCursorY
</h3>
<div class="markdown level1 summary"><p>Internal Use.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int PreCursorY { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_PrincipleView_" data-uid="Hi.Disp.DispEngine.PrincipleView*"></a>
<h3 id="Hi_Disp_DispEngine_PrincipleView" data-uid="Hi.Disp.DispEngine.PrincipleView">
PrincipleView
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Mat4d PrincipleView { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a></dt>
<dd><p>view = <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_PrincipleView">PrincipleView</a> * <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
Where view matrix is in MVP convention.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_PrincipleView_remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>The default value is new Mat4d(new Vec3d(1, 0, 0), -Math.PI / 2).
This make the 2D plane from xy plane to xz plane.
The xz plane is much suit for 3D engineering display.</p>
</div>
<a id="Hi_Disp_DispEngine_RefreshingPeriod_" data-uid="Hi.Disp.DispEngine.RefreshingPeriod*"></a>
<h3 id="Hi_Disp_DispEngine_RefreshingPeriod" data-uid="Hi.Disp.DispEngine.RefreshingPeriod">
RefreshingPeriod
</h3>
<div class="markdown level1 summary"><p>Image refreshing period.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public TimeSpan RefreshingPeriod { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.timespan">TimeSpan</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_ScaleProj_" data-uid="Hi.Disp.DispEngine.ScaleProj*"></a>
<h3 id="Hi_Disp_DispEngine_ScaleProj" data-uid="Hi.Disp.DispEngine.ScaleProj">
ScaleProj
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Mat4d ScaleProj { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a></dt>
<dd><p>Scale part of Projection matrix in MVP convention.
Projection matrix = <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_ScaleProj">ScaleProj</a> * <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_PixelProj">PixelProj</a>;</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_SketchView_" data-uid="Hi.Disp.DispEngine.SketchView*"></a>
<h3 id="Hi_Disp_DispEngine_SketchView" data-uid="Hi.Disp.DispEngine.SketchView">
SketchView
</h3>
<div class="markdown level1 summary"><p>view = <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_PrincipleView">PrincipleView</a> * <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
Where view matrix is in MVP convention.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Mat4d SketchView { get; set; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="Hi_Disp_DispEngine_ClearCache_" data-uid="Hi.Disp.DispEngine.ClearCache*"></a>
<h3 id="Hi_Disp_DispEngine_ClearCache" data-uid="Hi.Disp.DispEngine.ClearCache">
ClearCache()
</h3>
<div class="markdown level1 summary"><p>Clears the display engine cache.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearCache()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_DeleteDispContext_" data-uid="Hi.Disp.DispEngine.DeleteDispContext*"></a>
<h3 id="Hi_Disp_DispEngine_DeleteDispContext" data-uid="Hi.Disp.DispEngine.DeleteDispContext">
DeleteDispContext()
</h3>
<div class="markdown level1 summary"><p>Deletes the current display context.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void DeleteDispContext()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_Dispose_" data-uid="Hi.Disp.DispEngine.Dispose*"></a>
<h3 id="Hi_Disp_DispEngine_Dispose" data-uid="Hi.Disp.DispEngine.Dispose">
Dispose()
</h3>
<div class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_Dispose_" data-uid="Hi.Disp.DispEngine.Dispose*"></a>
<h3 id="Hi_Disp_DispEngine_Dispose_System_Boolean_" data-uid="Hi.Disp.DispEngine.Dispose(System.Boolean)">
Dispose(bool)
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected virtual void Dispose(bool disposing)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>disposing</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_EnqueueDispose_" data-uid="Hi.Disp.DispEngine.EnqueueDispose*"></a>
<h3 id="Hi_Disp_DispEngine_EnqueueDispose_System_IDisposable_" data-uid="Hi.Disp.DispEngine.EnqueueDispose(System.IDisposable)">
EnqueueDispose(IDisposable)
</h3>
<div class="markdown level1 summary"><p>Enqueues a disposable object to be disposed on the display thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Task EnqueueDispose(IDisposable disposable)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>disposable</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></dt>
<dd><p>The disposable object to be disposed</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
<dd><p>A task representing the disposal operation</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_EnqueueTask_" data-uid="Hi.Disp.DispEngine.EnqueueTask*"></a>
<h3 id="Hi_Disp_DispEngine_EnqueueTask_System_Threading_Tasks_Task_" data-uid="Hi.Disp.DispEngine.EnqueueTask(System.Threading.Tasks.Task)">
EnqueueTask(Task)
</h3>
<div class="markdown level1 summary"><p>Enqueues a task to be executed on the display thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Task EnqueueTask(Task task)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>task</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
<dd><p>The task to be executed</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task">Task</a></dt>
<dd><p>The enqueued task</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_EnqueueTask_" data-uid="Hi.Disp.DispEngine.EnqueueTask*"></a>
<h3 id="Hi_Disp_DispEngine_EnqueueTask__1_System_Threading_Tasks_Task___0__" data-uid="Hi.Disp.DispEngine.EnqueueTask``1(System.Threading.Tasks.Task{``0})">
EnqueueTask&lt;T&gt;(Task&lt;T&gt;)
</h3>
<div class="markdown level1 summary"><p>Enqueues a task to be executed on the display thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static Task&lt;T&gt; EnqueueTask&lt;T&gt;(Task&lt;T&gt; task)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>task</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;T&gt;</dt>
<dd><p>The task to be executed</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;T&gt;</dt>
<dd><p>The enqueued task</p>
</dd>
</dl>
<h4 class="section">Type Parameters</h4>
<dl class="parameters">
<dt><code>T</code></dt>
<dd><p>The type of the task result</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_Finalize_" data-uid="Hi.Disp.DispEngine.Finalize*"></a>
<h3 id="Hi_Disp_DispEngine_Finalize" data-uid="Hi.Disp.DispEngine.Finalize">
~DispEngine()
</h3>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">protected ~DispEngine()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_FinishDisp_" data-uid="Hi.Disp.DispEngine.FinishDisp*"></a>
<h3 id="Hi_Disp_DispEngine_FinishDisp" data-uid="Hi.Disp.DispEngine.FinishDisp">
FinishDisp()
</h3>
<div class="markdown level1 summary"><p>Elegantly end the rendering core.
Probably not essential.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void FinishDisp()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_GetDispEngine_" data-uid="Hi.Disp.DispEngine.GetDispEngine*"></a>
<h3 id="Hi_Disp_DispEngine_GetDispEngine" data-uid="Hi.Disp.DispEngine.GetDispEngine">
GetDispEngine()
</h3>
<div class="markdown level1 summary"><p>Get <a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public DispEngine GetDispEngine()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a></dt>
<dd><p><a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a></p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_Init_" data-uid="Hi.Disp.DispEngine.Init*"></a>
<h3 id="Hi_Disp_DispEngine_Init_System_String_" data-uid="Hi.Disp.DispEngine.Init(System.String)">
Init(string)
</h3>
<div class="markdown level1 summary"><p>Initializes the display engine system.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void Init(string fontFile = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>fontFile</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The font file to use. If null, the default font file will be used.</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_IsMouseButtonPressed_" data-uid="Hi.Disp.DispEngine.IsMouseButtonPressed*"></a>
<h3 id="Hi_Disp_DispEngine_IsMouseButtonPressed_System_Int64_" data-uid="Hi.Disp.DispEngine.IsMouseButtonPressed(System.Int64)">
IsMouseButtonPressed(long)
</h3>
<div class="markdown level1 summary"><p>Checks if a specific mouse button is currently pressed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool IsMouseButtonPressed(long mouseButton)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>mouseButton</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>The mouse button to check, typically a value from the <a class="xref" href="Hi.PanelModels.HiMouseButton.html">HiMouseButton</a> enumeration.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd><p>True if the specified mouse button is pressed; otherwise, false.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_IsMouseButtonPressed_System_Int64__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>This method is useful for implementing conditional UI behaviors based on mouse button state:</p>
<pre><code class="lang-csharp">// Check if left mouse button is pressed
if (dispEngine.IsMouseButtonPressed((long)HiMouseButton.Left))
{
// Perform special action while left button is held down
}</code></pre>
</div>
<a id="Hi_Disp_DispEngine_KeyDown_" data-uid="Hi.Disp.DispEngine.KeyDown*"></a>
<h3 id="Hi_Disp_DispEngine_KeyDown_System_Int64_" data-uid="Hi.Disp.DispEngine.KeyDown(System.Int64)">
KeyDown(long)
</h3>
<div class="markdown level1 summary"><p>Key down.
This function is typically called in the GUI implementation for keyboard interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void KeyDown(long key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>key</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_KeyDownTransform_" data-uid="Hi.Disp.DispEngine.KeyDownTransform*"></a>
<h3 id="Hi_Disp_DispEngine_KeyDownTransform_System_Int64_Hi_Native_key_table__transform_view_by_key_pressing_t_" data-uid="Hi.Disp.DispEngine.KeyDownTransform(System.Int64,Hi.Native.key_table__transform_view_by_key_pressing_t)">
KeyDownTransform(long, key_table__transform_view_by_key_pressing_t)
</h3>
<div class="markdown level1 summary"><p>Transform <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> by key.
<a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_Home">Home</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_F1">F1</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_F2">F2</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_F3">F3</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_F4">F4</a>
call <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToHomeView">SetViewToHomeView()</a>, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToFrontView">SetViewToFrontView()</a>, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToRightView">SetViewToRightView()</a>, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToTopView">SetViewToTopView()</a>, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToIsometricView">SetViewToIsometricView()</a> respectively.
<a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_PageDown">PageDown</a> and <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_PageUp">PageUp</a> scale the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
<a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_Left">Left</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_Right">Right</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_Down">Down</a>, <a class="xref" href="Hi.PanelModels.HiKey.html#Hi_PanelModels_HiKey_Up">Up</a> translate the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>;
Press <a class="xref" href="Hi.PanelModels.HiModifierKeys.html#Hi_PanelModels_HiModifierKeys_Shift">Shift</a> make these keys to rotate the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void KeyDownTransform(long key, key_table__transform_view_by_key_pressing_t table)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>The key that was pressed, typically a value from the <a class="xref" href="Hi.PanelModels.HiKey.html">HiKey</a> enumeration.</p>
</dd>
<dt><code>table</code> <a class="xref" href="Hi.Native.key_table__transform_view_by_key_pressing_t.html">key_table__transform_view_by_key_pressing_t</a></dt>
<dd><p>A table defining which keys trigger different transformation operations.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_KeyDownTransform_System_Int64_Hi_Native_key_table__transform_view_by_key_pressing_t__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>This method is typically called from key down event handlers in the GUI implementation.</p>
</div>
<a id="Hi_Disp_DispEngine_KeyUp_" data-uid="Hi.Disp.DispEngine.KeyUp*"></a>
<h3 id="Hi_Disp_DispEngine_KeyUp_System_Int64_" data-uid="Hi.Disp.DispEngine.KeyUp(System.Int64)">
KeyUp(long)
</h3>
<div class="markdown level1 summary"><p>Key up.
This function is typically called in the GUI implementation for keyboard interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void KeyUp(long key)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>key</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>key</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_LockGlContext_" data-uid="Hi.Disp.DispEngine.LockGlContext*"></a>
<h3 id="Hi_Disp_DispEngine_LockGlContext" data-uid="Hi.Disp.DispEngine.LockGlContext">
LockGlContext()
</h3>
<div class="markdown level1 summary"><p>Lock a opengl context.
The function is only used for native OpenGL rendering.
After lock the gl context, It should be unlock by <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_UnlockGlContext_System_IntPtr_">UnlockGlContext(nint)</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static nint LockGlContext()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a></dt>
<dd></dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_LockGlContext_remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>If any other lock requires LockGlContext,
the lock should better set inside LockGlContext.
or it is easy to occur race condition.
see design pattern of &ldquo;Solid&rdquo; class for reference.</p>
</div>
<a id="Hi_Disp_DispEngine_MouseButtonDown_" data-uid="Hi.Disp.DispEngine.MouseButtonDown*"></a>
<h3 id="Hi_Disp_DispEngine_MouseButtonDown_System_Int64_" data-uid="Hi.Disp.DispEngine.MouseButtonDown(System.Int64)">
MouseButtonDown(long)
</h3>
<div class="markdown level1 summary"><p>Mouse button down.
This function is typically called in the GUI implementation for mouse interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseButtonDown(long button)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>button</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>button</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_MouseButtonUp_" data-uid="Hi.Disp.DispEngine.MouseButtonUp*"></a>
<h3 id="Hi_Disp_DispEngine_MouseButtonUp_System_Int64_" data-uid="Hi.Disp.DispEngine.MouseButtonUp(System.Int64)">
MouseButtonUp(long)
</h3>
<div class="markdown level1 summary"><p>Mouse button up.
This function is typically called in the GUI implementation for mouse interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseButtonUp(long button)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>button</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></dt>
<dd><p>button</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_MouseDragTransform_" data-uid="Hi.Disp.DispEngine.MouseDragTransform*"></a>
<h3 id="Hi_Disp_DispEngine_MouseDragTransform_System_Int32_System_Int32_Hi_Native_mouse_button_table__transform_view_by_mouse_drag_t_" data-uid="Hi.Disp.DispEngine.MouseDragTransform(System.Int32,System.Int32,Hi.Native.mouse_button_table__transform_view_by_mouse_drag_t)">
MouseDragTransform(int, int, mouse_button_table__transform_view_by_mouse_drag_t)
</h3>
<div class="markdown level1 summary"><p>Transform the view by mouse drag.
If drag by left mouse button, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Translate_System_Double_System_Double_">Translate(double, double)</a> is performed;
If drag by right mouse button, <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Rotate_System_Double_System_Double_">Rotate(double, double)</a> is performed.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseDragTransform(int x, int y, mouse_button_table__transform_view_by_mouse_drag_t mouse_button_table)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The current x-coordinate of the mouse cursor.</p>
</dd>
<dt><code>y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The current y-coordinate of the mouse cursor.</p>
</dd>
<dt><code>mouse_button_table</code> <a class="xref" href="Hi.Native.mouse_button_table__transform_view_by_mouse_drag_t.html">mouse_button_table__transform_view_by_mouse_drag_t</a></dt>
<dd><p>A table defining which mouse buttons trigger different transformation operations.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_MouseDragTransform_System_Int32_System_Int32_Hi_Native_mouse_button_table__transform_view_by_mouse_drag_t__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>The <a class="xref" href="Hi.Native.mouse_button_table__transform_view_by_mouse_drag_t.html">mouse_button_table__transform_view_by_mouse_drag_t</a> structure allows you to configure
which mouse buttons perform which transformations:</p>
<pre><code class="lang-csharp">var buttonTable = new mouse_button_table__transform_view_by_mouse_drag_t
{
LEFT_BUTTON = (long)HiMouseButton.Left, // For translation
RIGHT_BUTTON = (long)HiMouseButton.Right // For rotation
};</code></pre>
<p>This method is typically called from mouse move event handlers when buttons are pressed.</p>
</div>
<a id="Hi_Disp_DispEngine_MouseMove_" data-uid="Hi.Disp.DispEngine.MouseMove*"></a>
<h3 id="Hi_Disp_DispEngine_MouseMove_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.MouseMove(System.Int32,System.Int32)">
MouseMove(int, int)
</h3>
<div class="markdown level1 summary"><p>Mouse move.
This function is typically called in the GUI implementation for mouse interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseMove(int x, int y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>cursor X position</p>
</dd>
<dt><code>y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>cursor Y position</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_MouseWheel_" data-uid="Hi.Disp.DispEngine.MouseWheel*"></a>
<h3 id="Hi_Disp_DispEngine_MouseWheel_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.MouseWheel(System.Int32,System.Int32)">
MouseWheel(int, int)
</h3>
<div class="markdown level1 summary"><p>Mouse wheel move.
This function is typically called in the GUI implementation for mouse interaction.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseWheel(int deltaX, int deltaY)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>deltaX</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>mouse wheel delta X</p>
</dd>
<dt><code>deltaY</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>mouse wheel delta Y. The traditional mouse wheel.</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_MouseWheelTransform_" data-uid="Hi.Disp.DispEngine.MouseWheelTransform*"></a>
<h3 id="Hi_Disp_DispEngine_MouseWheelTransform_System_Int32_System_Int32_System_Double_" data-uid="Hi.Disp.DispEngine.MouseWheelTransform(System.Int32,System.Int32,System.Double)">
MouseWheelTransform(int, int, double)
</h3>
<div class="markdown level1 summary"><p>Scale <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> by mouse wheel.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void MouseWheelTransform(int deltaX, int deltaY, double zooming_ratio = 0.2)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>deltaX</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>mouse wheel delta X</p>
</dd>
<dt><code>deltaY</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>mouse wheel delta Y. The traditional mouse wheel.</p>
</dd>
<dt><code>zooming_ratio</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>The ratio used for zooming. Default is 0.2.</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_Resize_" data-uid="Hi.Disp.DispEngine.Resize*"></a>
<h3 id="Hi_Disp_DispEngine_Resize_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.Resize(System.Int32,System.Int32)">
Resize(int, int)
</h3>
<div class="markdown level1 summary"><p>Resize the opengl context.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Resize(int w, int h)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>w</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>width of the viewport</p>
</dd>
<dt><code>h</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>height of the viewport</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_Rotate_" data-uid="Hi.Disp.DispEngine.Rotate*"></a>
<h3 id="Hi_Disp_DispEngine_Rotate_System_Double_System_Double_" data-uid="Hi.Disp.DispEngine.Rotate(System.Double,System.Double)">
Rotate(double, double)
</h3>
<div class="markdown level1 summary"><p>Rotate the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
Usually used by mouse drag on window.
The rotation axis is along (delta_y, 0, delta_x).
The rotation rad is 5 * Math.Sqrt(delta_y * delta_y + delta_x * delta_x) / window_height.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Rotate(double delta_x, double delta_y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>delta_x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta x in window coordinate</p>
</dd>
<dt><code>delta_y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta y in window coordinate</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_RotateAndScaleByTouchPad_" data-uid="Hi.Disp.DispEngine.RotateAndScaleByTouchPad*"></a>
<h3 id="Hi_Disp_DispEngine_RotateAndScaleByTouchPad_Hi_Geom_Vec2d_Hi_Geom_Vec2d_Hi_Geom_Vec2d_Hi_Geom_Vec2d_" data-uid="Hi.Disp.DispEngine.RotateAndScaleByTouchPad(Hi.Geom.Vec2d,Hi.Geom.Vec2d,Hi.Geom.Vec2d,Hi.Geom.Vec2d)">
RotateAndScaleByTouchPad(Vec2d, Vec2d, Vec2d, Vec2d)
</h3>
<div class="markdown level1 summary"><p>Rotate and scale the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> based on touch pad gestures.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RotateAndScaleByTouchPad(Vec2d prePosA, Vec2d curPosA, Vec2d prePosB, Vec2d curPosB)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>prePosA</code> <a class="xref" href="Hi.Geom.Vec2d.html">Vec2d</a></dt>
<dd><p>The previous position of the first touch point.</p>
</dd>
<dt><code>curPosA</code> <a class="xref" href="Hi.Geom.Vec2d.html">Vec2d</a></dt>
<dd><p>The current position of the first touch point.</p>
</dd>
<dt><code>prePosB</code> <a class="xref" href="Hi.Geom.Vec2d.html">Vec2d</a></dt>
<dd><p>The previous position of the second touch point.</p>
</dd>
<dt><code>curPosB</code> <a class="xref" href="Hi.Geom.Vec2d.html">Vec2d</a></dt>
<dd><p>The current position of the second touch point.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_RotateAndScaleByTouchPad_Hi_Geom_Vec2d_Hi_Geom_Vec2d_Hi_Geom_Vec2d_Hi_Geom_Vec2d__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>The method detects two types of gestures:</p>
<ol>
<li>Pinch gesture: When the distance between touch points changes, it triggers zooming via <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_MouseWheelTransform_System_Int32_System_Int32_System_Double_">MouseWheelTransform(int, int, double)</a></li>
<li>Rotation/Pan gesture: When touch points move together, it triggers rotation via <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Rotate_System_Double_System_Double_">Rotate(double, double)</a></li>
</ol>
<p>This method is typically used to implement touchpad or multi-touch gestures in custom UI implementations.</p>
</div>
<a id="Hi_Disp_DispEngine_RotateWithoutHeightAdjustment_" data-uid="Hi.Disp.DispEngine.RotateWithoutHeightAdjustment*"></a>
<h3 id="Hi_Disp_DispEngine_RotateWithoutHeightAdjustment_System_Double_System_Double_" data-uid="Hi.Disp.DispEngine.RotateWithoutHeightAdjustment(System.Double,System.Double)">
RotateWithoutHeightAdjustment(double, double)
</h3>
<div class="markdown level1 summary"><p>Rotate the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
Usually used by keyboard command.
The rotation axis is along (delta_y, 0, delta_x).
The rotation rad is Math.ToRad(Math.Sqrt(delta_y * delta_y + delta_x * delta_x)).</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RotateWithoutHeightAdjustment(double delta_x, double delta_y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>delta_x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta x in window coordinate</p>
</dd>
<dt><code>delta_y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta y in window coordinate</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_SetViewToFrontView_" data-uid="Hi.Disp.DispEngine.SetViewToFrontView*"></a>
<h3 id="Hi_Disp_DispEngine_SetViewToFrontView" data-uid="Hi.Disp.DispEngine.SetViewToFrontView">
SetViewToFrontView()
</h3>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> to front view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetViewToFrontView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_SetViewToHomeView_" data-uid="Hi.Disp.DispEngine.SetViewToHomeView*"></a>
<h3 id="Hi_Disp_DispEngine_SetViewToHomeView" data-uid="Hi.Disp.DispEngine.SetViewToHomeView">
SetViewToHomeView()
</h3>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> to home view(front view).
This is the same as <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SetViewToFrontView">SetViewToFrontView()</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetViewToHomeView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_SetViewToIsometricView_" data-uid="Hi.Disp.DispEngine.SetViewToIsometricView*"></a>
<h3 id="Hi_Disp_DispEngine_SetViewToIsometricView" data-uid="Hi.Disp.DispEngine.SetViewToIsometricView">
SetViewToIsometricView()
</h3>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> to isometric view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetViewToIsometricView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_SetViewToRightView_" data-uid="Hi.Disp.DispEngine.SetViewToRightView*"></a>
<h3 id="Hi_Disp_DispEngine_SetViewToRightView" data-uid="Hi.Disp.DispEngine.SetViewToRightView">
SetViewToRightView()
</h3>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> to side view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetViewToRightView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_SetViewToTopView_" data-uid="Hi.Disp.DispEngine.SetViewToTopView*"></a>
<h3 id="Hi_Disp_DispEngine_SetViewToTopView" data-uid="Hi.Disp.DispEngine.SetViewToTopView">
SetViewToTopView()
</h3>
<div class="markdown level1 summary"><p>Set the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a> to top view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void SetViewToTopView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_Snapshot_" data-uid="Hi.Disp.DispEngine.Snapshot*"></a>
<h3 id="Hi_Disp_DispEngine_Snapshot_System_String_" data-uid="Hi.Disp.DispEngine.Snapshot(System.String)">
Snapshot(string)
</h3>
<div class="markdown level1 summary"><p>Snapshot to BMP file with current canvas size.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Snapshot(string filePath)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_Snapshot_" data-uid="Hi.Disp.DispEngine.Snapshot*"></a>
<h3 id="Hi_Disp_DispEngine_Snapshot_System_String_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.Snapshot(System.String,System.Int32,System.Int32)">
Snapshot(string, int, int)
</h3>
<div class="markdown level1 summary"><p>Snapshot to BMP file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Snapshot(string filePath, int panelWidth, int panelHeight)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>filePath</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
<dt><code>panelWidth</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
<dt><code>panelHeight</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="Hi_Disp_DispEngine_Start_" data-uid="Hi.Disp.DispEngine.Start*"></a>
<h3 id="Hi_Disp_DispEngine_Start_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.Start(System.Int32,System.Int32)">
Start(int, int)
</h3>
<div class="markdown level1 summary"><p>Start a thread of keeping Swapping buffers of OpenGL context.
If the thread has running, this function does nothing.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Start(int panelWidth, int panelHeight)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>panelWidth</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>panel width</p>
</dd>
<dt><code>panelHeight</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>panel height</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_Terminate_" data-uid="Hi.Disp.DispEngine.Terminate*"></a>
<h3 id="Hi_Disp_DispEngine_Terminate" data-uid="Hi.Disp.DispEngine.Terminate">
Terminate()
</h3>
<div class="markdown level1 summary"><p>Terminate the opengl context swapping buffers thread from <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_Start_System_Int32_System_Int32_">Start(int, int)</a>.
If the thread has not running, this function does nothing.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Terminate()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_TouchDown_" data-uid="Hi.Disp.DispEngine.TouchDown*"></a>
<h3 id="Hi_Disp_DispEngine_TouchDown_System_Int32_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.TouchDown(System.Int32,System.Int32,System.Int32)">
TouchDown(int, int, int)
</h3>
<div class="markdown level1 summary"><p>Tracks a new touch point in the DispEngine's touch gesture system.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TouchDown(int touchId, int x, int y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>touchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>A unique identifier for the touch point.</p>
</dd>
<dt><code>x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The x-coordinate of the touch point in screen coordinates.</p>
</dd>
<dt><code>y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The y-coordinate of the touch point in screen coordinates.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_TouchDown_System_Int32_System_Int32_System_Int32__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>When a touch point is added, the method:</p>
<ol>
<li>Stores the touch point in the internal tracking dictionary</li>
<li>If this is the first touch point, simulates a mouse move and left button press</li>
</ol>
</div>
<a id="Hi_Disp_DispEngine_TouchMove_" data-uid="Hi.Disp.DispEngine.TouchMove*"></a>
<h3 id="Hi_Disp_DispEngine_TouchMove_System_Int32_System_Int32_System_Int32_" data-uid="Hi.Disp.DispEngine.TouchMove(System.Int32,System.Int32,System.Int32)">
TouchMove(int, int, int)
</h3>
<div class="markdown level1 summary"><p>Updates the position of an existing touch point.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TouchMove(int touchId, int x, int y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>touchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The unique identifier of the touch point to update.</p>
</dd>
<dt><code>x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The new x-coordinate of the touch point in screen coordinates.</p>
</dd>
<dt><code>y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The new y-coordinate of the touch point in screen coordinates.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_TouchMove_System_Int32_System_Int32_System_Int32__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>The method handles different gestures based on the number of active touch points:</p>
<ul>
<li>Single touch: Performs panning (translation) like mouse dragging</li>
<li>Two touches: Performs pinch-to-zoom and rotation gestures</li>
</ul>
</div>
<a id="Hi_Disp_DispEngine_TouchUp_" data-uid="Hi.Disp.DispEngine.TouchUp*"></a>
<h3 id="Hi_Disp_DispEngine_TouchUp_System_Int32_" data-uid="Hi.Disp.DispEngine.TouchUp(System.Int32)">
TouchUp(int)
</h3>
<div class="markdown level1 summary"><p>Removes a touch point from tracking when the touch is released.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TouchUp(int touchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>touchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The unique identifier of the touch point to remove.</p>
</dd>
</dl>
<h4 class="section" id="Hi_Disp_DispEngine_TouchUp_System_Int32__remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>When a touch point is released, the method:</p>
<ol>
<li>Removes the touch point from internal tracking dictionaries</li>
<li>If all touch points are released, simulates a mouse button release</li>
<li>If transitioning from multi-touch to single-touch, updates the mouse position to prevent &ldquo;teleportation&rdquo;</li>
</ol>
</div>
<a id="Hi_Disp_DispEngine_Translate_" data-uid="Hi.Disp.DispEngine.Translate*"></a>
<h3 id="Hi_Disp_DispEngine_Translate_System_Double_System_Double_" data-uid="Hi.Disp.DispEngine.Translate(System.Double,System.Double)">
Translate(double, double)
</h3>
<div class="markdown level1 summary"><p>Translate the <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_SketchView">SketchView</a>.
Usually used by mouse drag on window.
The translation is (delta_x * 2.0 / h, 0, -delta_y* 2.0 / h).
Where h is window height.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void Translate(double delta_x, double delta_y)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>delta_x</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta x in window coordinate</p>
</dd>
<dt><code>delta_y</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
<dd><p>delta y in window coordinate</p>
</dd>
</dl>
<a id="Hi_Disp_DispEngine_TurnBackView_" data-uid="Hi.Disp.DispEngine.TurnBackView*"></a>
<h3 id="Hi_Disp_DispEngine_TurnBackView" data-uid="Hi.Disp.DispEngine.TurnBackView">
TurnBackView()
</h3>
<div class="markdown level1 summary"><p>Rotate view 180 degrees around Z axis to switch to back view.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void TurnBackView()</code></pre>
</div>
<a id="Hi_Disp_DispEngine_UnlockGlContext_" data-uid="Hi.Disp.DispEngine.UnlockGlContext*"></a>
<h3 id="Hi_Disp_DispEngine_UnlockGlContext_System_IntPtr_" data-uid="Hi.Disp.DispEngine.UnlockGlContext(System.IntPtr)">
UnlockGlContext(nint)
</h3>
<div class="markdown level1 summary"><p>Unlock opengl context.
The function is only used for native OpenGL rendering.
The function unlock the opengl context for <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_LockGlContext">LockGlContext()</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static void UnlockGlContext(nint disp_torch_p)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>disp_torch_p</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="events">Events
</h2>
<h3 id="Hi_Disp_DispEngine_FinishingDisp" data-uid="Hi.Disp.DispEngine.FinishingDisp">
FinishingDisp
</h3>
<div class="markdown level1 summary"><p>Event at the begining of <a class="xref" href="Hi.Disp.DispEngine.html#Hi_Disp_DispEngine_FinishDisp">FinishDisp()</a></p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static event Action FinishingDisp</code></pre>
</div>
<h4 class="section">Event Type</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.action">Action</a></dt>
<dd></dd>
</dl>
<h3 id="Hi_Disp_DispEngine_ImageRequestAfterBufferSwapped" data-uid="Hi.Disp.DispEngine.ImageRequestAfterBufferSwapped">
ImageRequestAfterBufferSwapped
</h3>
<div class="markdown level1 summary"><p>Triggered after swap buffer of gl context.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public event DispEngine.ImageRequestedDelegate ImageRequestAfterBufferSwapped</code></pre>
</div>
<h4 class="section">Event Type</h4>
<dl class="parameters">
<dt><a class="xref" href="Hi.Disp.DispEngine.html">DispEngine</a>.<a class="xref" href="Hi.Disp.DispEngine.ImageRequestedDelegate.html">ImageRequestedDelegate</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>