TerminalMatrix 2.7.0
See the version list below for details.
dotnet add package TerminalMatrix --version 2.7.0
NuGet\Install-Package TerminalMatrix -Version 2.7.0
<PackageReference Include="TerminalMatrix" Version="2.7.0" />
paket add TerminalMatrix --version 2.7.0
#r "nuget: TerminalMatrix, 2.7.0"
// Install TerminalMatrix as a Cake Addin #addin nuget:?package=TerminalMatrix&version=2.7.0 // Install TerminalMatrix as a Cake Tool #tool nuget:?package=TerminalMatrix&version=2.7.0
TerminalPixelMatrixLibrary
An 8-bit video interface emulator. Hope to make it good enough to replace the GUI code in our Altair BASIC emulator, A-BASIC-Language.
Place the control on a Windows Forms-window and get events for what the user is typing, or call the Input
function to prompt the user.
Nuget:
Install-Package TerminalMatrix
Basic functionality
For adding text to the terminal matrix, use the WriteLine
method. To prompt the user, use the Input
method.
Limit text area
When the text area is unlimited, the text terminal displays 25 lines of text.
This amount can be limited using the SetTextRenderLimit
method.
0
means that text is allowed everywhere, a larger value leaves empty space on the
upper part of the screen, and the largest value (23
) only allows two
lines of text on the bottom of the screen.
Bitmap images
To produce a bitmap image, create a picture (preferably a 16 or 32 color GIF file) using the palette described in the ah-c64-palette.act Photoshop file (or the extended 32 color file). The color palette is also described in the source code, here. Remember that pixels usually are more high then wide, and that the interface emulator only can display 640 * 200 pixels at one time. The default resolution is 320 * 200 rectangular pixels.*
To display an image, load it as a byte array using the LoadPictureFromGif
function and draw it using the SetPixels
function.
Call UpdateBitmap
to force the pixel buffer to be displayed.
var gif = terminalMatrixControl1.LoadPictureFromGif(@"..\..\..\..\testgif.gif");
terminalMatrixControl1.SetPixels(0, 0, gif);
terminalMatrixControl1.UpdateBitmap();
The image is a screenshot of the AdventureGameExample projet, a text adventure game dummy.
Limitations
Clean exit
For a clean exit, you must call the Quit
method in the FormClosed
event handler.
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
terminalMatrixControl1.Quit();
}
Layer limitations
Background layer can be activated using the UseBackground24Bit
property.
This will add a background to the console. It will always be on (in 24 bit) or off.
The background pixels are stored in the Background24Bit
array. Background24Bit
is a two dimensional int
array, but only three bits are used (R, G and B).
The foreground (accessed using GetPixel
and SetPixel
) is always treated as 24 bit.
However, the ControlOverlayPainter
delegate will support transparency if the Use32BitForeground
property is set.
Default is false, meaning that opacity is ignored.
In short, the control can have one or two bitmap layers, the top layer can be exposed as 32 bit for better overlaying.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows7.0 is compatible. |
-
net8.0-windows7.0
- PixelmapLibrary (>= 1.5.0)
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 |
---|---|---|
2.7.2 | 103 | 9/26/2024 |
2.7.1 | 103 | 9/6/2024 |
2.7.0 | 106 | 9/6/2024 |
2.6.0 | 117 | 6/23/2024 |
2.5.0 | 115 | 6/19/2024 |
2.4.0 | 105 | 6/16/2024 |
2.3.0 | 103 | 6/15/2024 |
2.2.0 | 102 | 6/5/2024 |
2.1.0 | 103 | 5/19/2024 |
2.0.0 | 107 | 5/19/2024 |
1.8.0 | 107 | 5/18/2024 |
1.7.0 | 139 | 12/31/2023 |
1.6.0 | 134 | 12/21/2023 |
1.5.0 | 144 | 12/15/2023 |
1.4.0 | 135 | 12/15/2023 |
1.3.0 | 155 | 12/14/2023 |
1.2.0 | 141 | 12/13/2023 |
1.1.0 | 151 | 12/12/2023 |
1.0.0 | 128 | 12/12/2023 |
Multiline support is working. Might be some more bugs...