THWildau.GdPr.Dekta
1.0.122
dotnet add package THWildau.GdPr.Dekta --version 1.0.122
NuGet\Install-Package THWildau.GdPr.Dekta -Version 1.0.122
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="THWildau.GdPr.Dekta" Version="1.0.122" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="THWildau.GdPr.Dekta" Version="1.0.122" />
<PackageReference Include="THWildau.GdPr.Dekta" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add THWildau.GdPr.Dekta --version 1.0.122
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: THWildau.GdPr.Dekta, 1.0.122"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package THWildau.GdPr.Dekta@1.0.122
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=THWildau.GdPr.Dekta&version=1.0.122
#tool nuget:?package=THWildau.GdPr.Dekta&version=1.0.122
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Dekta - Simple 2D Graphics for C# Beginners
A minimalist graphics library with a static API for 2D graphics, input, image processing, audio, and text.
🚀 Quick Start
using Dekta;
Graphics.Open(800, 600, "My Program");
Graphics.Clear(Color.Black);
Graphics.DrawFilledCircle(0.0, 0.0, 0.2, Color.Red);
Graphics.WaitUntilAnyKeyOrMouseButtonPressed();
✨ Features
- 2D Graphics: Lines, rectangles, circles (filled/outline)
- Input: Keyboard and mouse (polling API)
- Imaging: Load, save, and edit PNG/BMP pixel by pixel
- Audio: WAV playback and tone synthesis with polyphony
- Text: TrueType rendering with Latin-1 support
- Screenshots: Save window content as PNG/BMP
- World Coordinates: Normalized (-1 to 1), resolution independent
🧩 Overview of Capabilities
- Open windows, check status, and close
- Draw 2D primitives (lines, rectangles, circles)
- Draw images as textures with color tint
- Render text (TrueType, Latin-1, single-line)
- Query keyboard and mouse states per frame
- Play WAV files and generate sine tones
- Create, load, edit, and save images
- Save screenshots of the current frame
- Work resolution-independently with world coordinates
📚 API Overview
Graphics
// Open a new window with a specified width, height, and title
Graphics.Open(800, 600, "Title");
// Clear the window with a background color
Graphics.Clear(Color.Black);
// Draw a shape
Graphics.DrawLine(-0.5, -0.5, 0.5, 0.5, Color.White, 0.02);
Graphics.DrawRectangle(0.0, 0.0, 0.4, 0.3, Color.Yellow, 0.01);
Graphics.DrawCircle(0.0, 0.0, 0.2, Color.Green, 0.01);
Graphics.DrawTriangle(-0.2, -0.2, 0.2, -0.2, 0.0, 0.2, Color.White, 0.01);
// Draw a filled shape
Graphics.DrawFilledRectangle(0.0, 0.0, 0.4, 0.3, Color.Blue);
Graphics.DrawFilledCircle(0.0, 0.0, 0.2, Color.Red);
Graphics.DrawFilledTriangle(-0.2, -0.2, 0.2, -0.2, 0.0, 0.2, Color.Purple);
// Draw an image instance at a position, size, with color tint
Graphics.DrawBitmap(image, 0.0, 0.0, 0.5, 0.5, Color.White);
Graphics.DrawBitmap("image.png", 0.0, 0.0);
Graphics.DrawBitmap("image.png", 0.0, 0.0, 0.5, 0.5);
Graphics.DrawBitmap("image.png", 0.0, 0.0, 1.5);
// Render a single line of text on the screen
Graphics.DrawText("Hello", -0.9, 0.9, 0.1, Color.Yellow);
// Save the current frame content as an image file
Graphics.SaveScreenshot("screenshot.png");
// Display all queued drawings on the screen
Graphics.Present();
// Pause execution for a specified duration in milliseconds
Graphics.Wait(16);
// Stop execution and wait until a key or mouse button is pressed
Graphics.WaitUntilAnyKeyOrMouseButtonPressed();
Graphics.WaitUntilSpecificKeyPressed(Key.Space);
Key pressed = Graphics.WaitUntilOneOfSpecificKeysPressed(Key.Escape, Key.Enter);
// Close the window and release its resources
Graphics.Close();
Input
// Check if any keyboard key is currently being held down
bool keyHeld = Input.IsAnyKeyDown();
// Check if a specific key is currently held down
bool wDown = Input.IsKeyDown(Key.W);
// Check if a key was pressed down in this frame
bool spacePressed = Input.WasKeyPressed(Key.Space);
// Check if a key was released in this frame
bool escapeReleased = Input.WasKeyReleased(Key.Escape);
Mouse
// Get the current cursor position in world coordinates (X and Y between -1.0 and 1.0)
MousePosition mousePos = Mouse.PositionWorld;
// Check if any mouse button is currently held down
bool buttonHeld = Mouse.IsAnyButtonDown();
// Check if a specific mouse button is currently held down
bool leftDown = Mouse.IsButtonDown(MouseButton.Left);
// Check if a mouse button was clicked in this frame
bool rightPressed = Mouse.WasButtonPressed(MouseButton.Right);
// Check if a mouse button was released in this frame
bool middleReleased = Mouse.WasButtonReleased(MouseButton.Middle);
Audio
// Play a WAV sound file at a specified volume
Audio.PlaySound("sound.wav", 1.0);
// Play a synthesized sine wave tone at a frequency, duration, and amplitude
Audio.PlayTone(440.0, 500, 0.25);
Imaging
// Create a new blank image in memory with specified dimensions
using var blankImg = Imaging.CreateImage(100, 100);
// Load an image file from disk
var loadedImg = Imaging.Load("image.png");
// Get the dimensions of the image in pixels
int w = loadedImg.Width;
int h = loadedImg.Height;
// Get/Set the color of a specific pixel in the image
Color pixelColor = loadedImg.GetPixel(10, 10);
loadedImg.SetPixel(10, 10, Color.Red);
// Save the image instance to disk
Imaging.Save(loadedImg, "output.png");
Core
// Get the version string of the library
string version = Core.VersionInfo();
🎯 Coordinate System
- X: -1.0 (left) to +1.0 (right)
- Y: -1.0 (bottom) to +1.0 (top)
- Origin (0, 0) in the window center
📖 Documentation
Detailed documentation and sample programs can be found in the repository in the docs and samples folders.
🛠️ Requirements
- .NET 10.0+
- OpenGL 3.3+
- OpenAL (included automatically on Windows)
- Windows, macOS, or Linux
💡 Ideal for
- Programming beginners
- Learning game development
- Workshops and courses
- Quick visualizations
- Creative projects
More information is available in the project's main documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- MonoGame.Library.OpenAL (>= 1.24.3.4)
- Silk.NET.Input (>= 2.23.0)
- Silk.NET.OpenAL (>= 2.23.0)
- Silk.NET.OpenAL.Extensions.Soft (>= 2.23.0)
- Silk.NET.OpenGL (>= 2.23.0)
- Silk.NET.Windowing (>= 2.23.0)
- SixLabors.ImageSharp (>= 3.1.12)
- StbTrueTypeSharp (>= 1.26.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.122 | 88 | 6/9/2026 |
Initial release of Dekta v1.0.0