From 87ab64f727aa33daff7cb01c9908d4a01500258b Mon Sep 17 00:00:00 2001 From: "H. Utku Maden" Date: Sun, 19 Jan 2025 16:48:15 +0300 Subject: [PATCH] Add IDpiAwareGLContext. --- Dashboard.Drawing.OpenGL/IGLContext.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Dashboard.Drawing.OpenGL/IGLContext.cs b/Dashboard.Drawing.OpenGL/IGLContext.cs index b326622..d38330e 100644 --- a/Dashboard.Drawing.OpenGL/IGLContext.cs +++ b/Dashboard.Drawing.OpenGL/IGLContext.cs @@ -23,4 +23,20 @@ namespace Dashboard.Drawing.OpenGL /// event Action Disposed; } + + /// + /// Extension interface for GL contexts in a DPI-aware environment. + /// + public interface IDpiAwareGLContext : IGLContext + { + /// + /// Dpi for current context. + /// + public float Dpi { get; } + + /// + /// Scale for the current context. This will be used to scale drawn geometry. + /// + public float Scale { get; } + } }