Skip to content

Samma2009/MalinoGraphicsSubsystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Installation

git clone https://github.com/Samma2009/MalinoGraphicsSubsystem.git use this command to clone MGS into your malino project

Example code

using System;

namespace MalinoOS
{
    public class Program
    {
        static Canvas canvas;

        public static Bitmap bitmap = new Bitmap(10, 10,
                new byte[] { 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0,
                    255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255,
                    0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255,
                    0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 23, 59, 88, 255,
                    23, 59, 88, 255, 0, 255, 243, 255, 0, 255, 243, 255, 23, 59, 88, 255, 23, 59, 88, 255, 0, 255, 243, 255, 0,
                    255, 243, 255, 0, 255, 243, 255, 23, 59, 88, 255, 153, 57, 12, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255,
                    243, 255, 0, 255, 243, 255, 153, 57, 12, 255, 23, 59, 88, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243,
                    255, 0, 255, 243, 255, 0, 255, 243, 255, 72, 72, 72, 255, 72, 72, 72, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0,
                    255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 72, 72,
                    72, 255, 72, 72, 72, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255,
                    10, 66, 148, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255,
                    243, 255, 10, 66, 148, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 10, 66, 148, 255, 10, 66, 148, 255,
                    10, 66, 148, 255, 10, 66, 148, 255, 10, 66, 148, 255, 10, 66, 148, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255,
                    243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 10, 66, 148, 255, 10, 66, 148, 255, 10, 66, 148, 255, 10, 66, 148,
                    255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255,
                    0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, 0, 255, 243, 255, }, ColorDepth.ColorDepth32);
        
       public static void Main()
        {
            Console.WriteLine("Malino booted successfully. Let's go in Graphical Mode");
            canvas = new Canvas();
            canvas.Clear(Color.Blue);
            while(true)
            {
              Update();
            }
        }

        public static void Update()
        {
            try
            {
                // A red Point
                canvas.DrawPoint(Color.Red, 69, 69);

                // A GreenYellow horizontal line
                canvas.DrawLine(Color.GreenYellow, 250, 100, 400, 100);

                // An IndianRed vertical line
                canvas.DrawLine(Color.IndianRed, 350, 150, 350, 250);

                // A MintCream diagonal line
                canvas.DrawLine(Color.MintCream, 250, 150, 400, 250);

                // A PaleVioletRed rectangle
                canvas.DrawRectangle(Color.PaleVioletRed, 350, 350, 80, 60);

                // A LimeGreen rectangle
                canvas.DrawRectangle(Color.LimeGreen, 450, 450, 80, 60);

                // A bitmap
                canvas.DrawImage(bitmap, 100, 150);
                
                canvas.Display();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occurred: " + e.Message);
            }
        }
    }
}

MGS does not have your resolution?

create a resolutions list with MGSResGen

About

a rewrite of CGS but for malino

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages