Igtampe.BasicGraphics 1.1.0

dotnet add package Igtampe.BasicGraphics --version 1.1.0                
NuGet\Install-Package Igtampe.BasicGraphics -Version 1.1.0                
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="Igtampe.BasicGraphics" Version="1.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Igtampe.BasicGraphics --version 1.1.0                
#r "nuget: Igtampe.BasicGraphics, 1.1.0"                
#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.
// Install Igtampe.BasicGraphics as a Cake Addin
#addin nuget:?package=Igtampe.BasicGraphics&version=1.1.0

// Install Igtampe.BasicGraphics as a Cake Tool
#tool nuget:?package=Igtampe.BasicGraphics&version=1.1.0                

BasicGraphics

BasicGraphics includes tools for drawing DrawFile (DF) and Hi-Color DrawFiles (HC) files (Both from disk, as a resource, or as its own type of internal class). These can support 16 Colors and a litle over 256 Colors (around 370 though supporting 768 different combinations) respectively.

True Color HiColor DrawFile
Color Range Color Range Color Range

These files can be edited by the Henja3 Editor, or generated by ImageToBasicGraphic. The following is an example of these two formats being taken to their limits by ITBG, with a console font of Lucida Console at 5pt.

Example 1 Example 2
Example 1 Example 2

In order for the combined image to line up, we lightly squooshed the images, since console characters are not square. Lucida Console 5pt has characters that are 3x5. ITBG doubles horizontal characters to try to combat this, resulting in pixels being 6x5 (which is closer). To combine the images, we shrunk it horizontally to 5/6 size.

BasicGraphics depends on BasicRender. It has several classes, mentioned below.

Graphic

Abstract class that basically everything inherits either directly or indirectly. |Property|Description| |-|-| |Contents|Data used to draw this graphic| |Name|Name of this graphic| |Width|Width of this graphic accessed via GetWidth()| |Height|Height of this graphic accessed via GetHeight()|

Method Result
Draw() Draws the graphic.<br><br><b>Take note!</b><br> the parameters LeftPos and TopPos refer to the leftmost, and topmost coordinate of the graphic!

GraphicUtils

A Static class that holds some utilities that are used by the graphic drawers, but that could also be useful for other reasons. |Method|Result| |-|-| |ResourceToStringarray()|Gets a resource as an array of bytes, and turns it into an array of strings, where each index is a line of the resource's text. <br> Essentially, it's like File.ReadAllLines(), but for resources instead of files.| |ColorCharToConsoleCholor()| Converts a ColorChar (a hexadecimal number) to a ConsoleColor. </br></br> ColorChars are based on the way the windows command line asks for colors. Below this is a table of ColorChars|

Number Color
0 Black
1 Blue
2 Green
3 Aqua
4 Red
5 Purple
6 Yellow
7 White
8 Gray
9 Light Blue
A Light Green
B Light Aqua
C Light Red
D Light Purple
E Light Yellow
F Bright White

BasicGraphic

Class that holds the way to process DF file data. It is no longer extended by BasicGraphicFromFile and BasicGraphicFromResource. Instead, use LoadFromFile() and LoadFromResource() in BasicGraphic

Method Result
DrawColorString() This method is publicly accessible in case a user wants to access it directly to draw a single line of DF data.<br><br> A ColorString is a string made up of ColorChars. Take a look at GraphicUtils's ColorCharToConsoleColor() method for a more in depth explination.
LoadFromFile() Loads DF Data from a file and returns a BasicGraphic
LoadFromResource() Loads DF Data from a resource, and returns a BascGraphic

HiColorGraphic

Abstract class that holds the way to process HC file data. It is no longer extended by HiColorGraphicFromFile and HiColorGraphicFromResource. Instead use LoadFromFile() and LoadFromResource() in HiColorGraphic.

Method Result
HiColorDraw() This method is also publicly accessible in case a user wants to access it directly to draw a single line of HC data. <br><br>A string of HiColor Data is comprised of multiple 3 character long strings, linked with hyphens. The first two characters are ColorChars (one for background and one for foreground), and the 3rd is a digit from 0 to 2, which indicates the gradient between the colorchars, with ░ as 0, ▒ as 1, ▓ as 2. <br><br> The following string holds a HiColor Rainbow 441-460-461-C61-CE0-CE1-CE2-EE2-E10-EA1-AE2-AE1-AA2-AB1-AB2-BB2-3B2-B31-3B2-3B1-3B0-331-932-392-992-192-912-190-110-512-152-551-D52-D51-D50-DD0-4D2-4D1-4D0-440.
LoadFromFile() Loads HC Data from a file and returns a HiColorGraphic
LoadFromResource() Loads HC Data from a resource, and returns a HiColorGraphic

Cloud

Cloud is a DF graphic class which holds its own data. Its contents are the cloud graphic from AirportBoard's weather information.<br> Use it to draw a cute little cloud, and nothing else.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Igtampe.BasicGraphics:

Package Downloads
Igtampe.BasicFonts

BasicFonts is the latest extension to BasicRender. Levereging the power of DictionaryOnDisk, BasicGraphics, and BasicRender, large pre-made neatly packaged symbols can be drawn to the screen. For a full documentation, please see the GitHub Repo for BasicRender, or the included comments.

Igtampe.BasicWindows

BasicWindows is an enhancement to Igtampe.BasicRender, which makes it easy to create, render, and manage user interactions via "windows" on the console. For a full documentation, please see the GitHub Repo for BasicRender, or the included comments.

Igtampe.Redistributables.Launcher

Launch includes a simple ASP.NET Launcher, simplifying the process of getting your API up and running in a single method. Plus, it automatically configures the swagger with the information you provide!

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 1,089 3/3/2022
1.0.0 766 4/29/2021