![]() |
VOOZH | about |
dotnet add package THWildau.GdPr.Dekta --version 1.0.122
NuGet\Install-Package THWildau.GdPr.Dekta -Version 1.0.122
<PackageReference Include="THWildau.GdPr.Dekta" Version="1.0.122" />
<PackageVersion Include="THWildau.GdPr.Dekta" Version="1.0.122" />Directory.Packages.props
<PackageReference Include="THWildau.GdPr.Dekta" />Project file
paket add THWildau.GdPr.Dekta --version 1.0.122
#r "nuget: THWildau.GdPr.Dekta, 1.0.122"
#:package THWildau.GdPr.Dekta@1.0.122
#addin nuget:?package=THWildau.GdPr.Dekta&version=1.0.122Install as a Cake Addin
#tool nuget:?package=THWildau.GdPr.Dekta&version=1.0.122Install as a Cake Tool
A minimalist graphics library with a static API for 2D graphics, input, image processing, audio, and text.
using Dekta;
Graphics.Open(800, 600, "My Program");
Graphics.Clear(Color.Black);
Graphics.DrawFilledCircle(0.0, 0.0, 0.2, Color.Red);
Graphics.WaitUntilAnyKeyOrMouseButtonPressed();
// 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();
// 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);
// 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);
// 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);
// 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");
// Get the version string of the library
string version = Core.VersionInfo();
Detailed documentation and sample programs can be found in the repository in the docs and samples folders.
More information is available in the project's main documentation.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
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