• Home
  • Cosmos Website
  • Articles
  • API Documentation
Show / Hide Table of Contents
  • Cosmos.Build.Tasks
    • CreateMbr
    • CreateSyslinuxConfig
    • ExtractMapFromElfFile
    • IL2CPU
    • Launch
    • Ld
    • MakeIso
    • Nasm
    • ReadNasmMapToDebugInfo
    • TheRingMaster
  • Cosmos.Common
    • BinaryHelper
    • BinaryHelper.BitPos
    • ByteToString
    • NumberHelper
    • StringHelper
  • Cosmos.Common.Extensions
    • ByteConverter
    • ToHexString
  • Cosmos.Core
    • ACPI
    • ACPI.RSDPtr
    • BaseIOGroups
    • Bootstrap
    • CosmosRuntimeType
    • CPU
    • GCImplementation
    • Global
    • INTs
    • INTs.EFlagsEnum
    • INTs.ExceptionInterruptDelegate
    • INTs.IRQContext
    • INTs.IRQDelegate
    • INTs.MMXContext
    • INTs.TSS
    • IOPort
    • IOPortBase
    • IOPortRead
    • IOPortWrite
    • ManagedMemoryBlock
    • MemoryBlock
    • MemoryBlock08
    • MemoryBlock16
    • MemoryBlock32
    • MemoryMap
    • MemoryOperations
    • Multiboot
    • Multiboot.Header
    • PIC
    • PIC.Cmd
    • RawMemoryMap
    • VBE
    • VBE.ControllerInfo
    • VBE.ModeInfo
  • Cosmos.Core.IOGroup
    • ATA
    • COM
    • IOGroup
    • Keyboard
    • Mouse
    • PCI
    • PCSpeaker
    • PIC
    • PIT
    • PS2Controller
    • RTC
    • TextScreen
    • VBEIOGroup
    • VGA
  • Cosmos.Core.IOGroup.Network
    • AMDPCNetIIIOGroup
  • Cosmos.Core.Memory
    • Heap
    • HeapLarge
    • HeapMedium
    • HeapSmall
    • RAT
    • RAT.PageType
  • Cosmos.Core.Memory.Old
    • Heap
  • Cosmos.Core.MemoryGroup
    • AHCI
  • Cosmos.Core_Asm
    • ArrayGetLengthAsm
    • ArrayImpl
    • ArrayInternalCopyAsm
    • BufferBlockCopyAsm
    • BufferImpl
    • CPUCanReadCPUIDAsm
    • CPUDisableINTsAsm
    • CPUEnableINTsAsm
    • CPUGetAmountOfRAMAsm
    • CPUGetEndOfKernelAsm
    • CPUHaltAsm
    • CPUImpl
    • CPUInitFloatAsm
    • CPUInitSSEAsm
    • CPUReadCPUIDAsm
    • CPUReadModelSpecificRegisterAsm
    • CPUReadTimestampCounterAsm
    • CPUUpdateIDTAsm
    • CPUZeroFillAsm
    • DelegateCtorAsm
    • DelegateGetMulticastInvokeAsm
    • DelegateImpl
    • DelegateInvokeAsm
    • IOPortImpl
    • MultibootAsm
    • MultibootImpl
    • MultibootImplAsm
    • RuntimeHelpersImpl
  • Cosmos.Core_Asm.MemoryOperations
    • MemoryOperationsCopy128BlocksAsm
    • MemoryOperationsCopy128BytesAsm
    • MemoryOperationsCopy16BytesAsm
    • MemoryOperationsCopy32BytesAsm
    • MemoryOperationsCopy64BytesAsm
    • MemoryOperationsFill16BlocksAsm
  • Cosmos.Core_Plugs
    • GCImplementionImpl
    • RuntimeFieldHandleImpl
  • Cosmos.Core_Plugs.MemoryOperations
    • MemoryOperationsImpl
  • Cosmos.Core_Plugs.System
    • ArrayImpl
    • BufferImpl
    • CharUnicodeInfoImpl
    • DelegateImpl
    • DelegateImplInherit
    • EnvironmentImpl
    • EventHandlerImpl
    • ExceptionImpl
    • GCImpl
    • InternalEnvironmentImpl
    • MulticastDelegateImpl
    • ObjectImpl
    • OutOfMemoryExceptionImpl
    • RuntimeType
    • RuntimeType_RuntimeTypeCache
    • RuntimeTypeHandleImpl
    • SRImpl
    • StringImpl
    • TypeImpl
  • Cosmos.Core_Plugs.System.Collections.Generic
    • ByteComparer
    • ByteEqualityComparer
    • CharComparer
    • CharEqualityComparer
    • ComparerHelpersImpl
    • GuidComparer
    • GuidEqualityComparer
    • Int16Comparer
    • Int16EqualityComparer
    • Int32Comparer
    • Int32EqualityComparer
    • Int64Comparer
    • Int64EqualityComparer
    • ObjectComparer
    • ObjectEqualityComparer
    • SByteComparer
    • SByteEqualityComparer
    • StringComparer
    • StringEqualityComparer
    • UInt16Comparer
    • UInt16EqualityComparer
    • UInt32Comparer
    • UInt32EqualityComparer
    • UInt64Comparer
    • UInt64EqualityComparer
  • Cosmos.Core_Plugs.System.Diagnostics
    • DebuggerImpl
    • StopwatchImpl
  • Cosmos.Core_Plugs.System.Globalization
    • CultureInfoImpl
    • NumberFormatInfoImpl
  • Cosmos.Core_Plugs.System.Resources
    • ResourceManagerImpl
  • Cosmos.Core_Plugs.System.Runtime.CompilerServices
    • RuntimeHelpersImpl
  • Cosmos.Core_Plugs.System.Runtime.InteropServices
    • MarshalImpl
    • SafeHandleImpl
  • Cosmos.Core_Plugs.System.Text
    • DecoderFallbackImpl
    • EncoderFallbackImpl
    • InternalDecoderBestFitFallbackBufferImpl
    • InternalEncoderBestFitFallbackImpl
  • Cosmos.Core_Plugs.System.Threading
    • InterlockedImpl
    • MonitorImpl
    • TaskImpl
    • ThreadImpl
  • Cosmos.Debug.Common
    • DictionaryHelper
    • PipeClient
    • PipeServer
  • Cosmos.Debug.DebugConnectors
    • Consts
    • CoreDump
    • DebugConnector
    • DebugConnector.Incoming
    • DebugConnector.Outgoing
    • DebugConnectorEdison
    • DebugConnectorPipeClient
    • DebugConnectorPipeServer
    • DebugConnectorSerial
    • DebugConnectorStreamWithoutTimeouts
    • DebugConnectorStreamWithTimeouts
    • DebugConnectorTCPServer
    • DebugConnectorTestPipeServer
    • Debugger2Windows
    • Ds2Vs
    • Pipes
    • Vs2Ds
    • Windows2Debugger
  • Cosmos.Debug.GDB
    • AsmFile
    • AsmLine
    • BreakpointUC
    • FormBreakpoints
    • FormCallStack
    • FormCallStack.CallStack
    • FormHistory
    • FormLog
    • FormMain
    • FormMain.GdbAsmLine
    • FormRegisters
    • FormRegisters.CPUReg
    • FormSettings
    • FormWatches
    • GDB
    • GDB.Response
    • Global
    • RegNames
    • Settings
    • SettingsDS
    • SettingsDS.BreakpointDataTable
    • SettingsDS.BreakpointRow
    • SettingsDS.BreakpointRowChangeEvent
    • SettingsDS.BreakpointRowChangeEventHandler
    • SettingsDS.GeneralDataTable
    • SettingsDS.GeneralRow
    • SettingsDS.GeneralRowChangeEvent
    • SettingsDS.GeneralRowChangeEventHandler
    • SettingsDS.WatchDataTable
    • SettingsDS.WatchRow
    • SettingsDS.WatchRowChangeEvent
    • SettingsDS.WatchRowChangeEventHandler
    • SettingsDS.WindowDataTable
    • SettingsDS.WindowRow
    • SettingsDS.WindowRowChangeEvent
    • SettingsDS.WindowRowChangeEventHandler
    • WatchUC
    • Windows
  • Cosmos.Debug.Hosts
    • Bochs
    • Host
    • HyperV
    • IntelEdison
    • Qemu
    • Slave
    • VMware
  • Cosmos.Debug.Kernel
    • Debugger
    • DebuggerFactory
  • Cosmos.Debug.Kernel.Plugs.Asm
    • DebugBreak
    • DebugDoSend
    • DebugDoSendComplexLongNumber
    • DebugDoSendComplexNumber
    • DebugDoSendLongNumber
    • DebugDoSendNumber
    • DebuggerAsm
    • DebugSendChannelCommand
    • DebugSendChannelCommandNoData
    • DebugSendMessageBox
    • DebugSendPtr
    • DebugTraceOff
    • DebugTraceOn
    • DoBochsBreak
    • DoRealHalt
  • Cosmos.Deploy.Pixie
    • App
    • DHCP
    • DhcpPacket
    • DhcpPacket.MsgType
    • DhcpPacket.OpType
    • MainWindow
    • TrivialFTP
    • TrivialFTP.OpType
  • Cosmos.Deploy.USB
    • App
    • MainWindow
  • Cosmos.HAL
    • Bootstrap
    • CardType
    • ClassID
    • DataReceivedHandler
    • DebugTextScreen
    • Device
    • DeviceID
    • Global
    • KeyboardBase
    • KeyboardBase.KeyPressedEventHandler
    • MouseBase
    • MouseBase.MouseChangedEventHandler
    • NetworkDevice
    • PCI
    • PCIBaseAddressBar
    • PCIDevice
    • PCIDevice.Config
    • PCIDevice.DeviceClass
    • PCIDevice.PCIBist
    • PCIDevice.PCICommand
    • PCIDevice.PCIHeaderType
    • PCIDevice.PCIInterruptPIN
    • PCIDeviceBridge
    • PCIDeviceCardbus
    • PCIDeviceNormal
    • PCSpeaker
    • PIT
    • PIT.PITTimer
    • PIT.PITTimer.dOnTrigger
    • Power
    • ProgramIF
    • PS2Controller
    • PS2Keyboard
    • PS2Mouse
    • RTC
    • SpeakerExtensions
    • SubclassID
    • TextScreen
    • TextScreenBase
    • TextScreenHelpers
    • VendorID
    • VGADriver
    • VGADriver.ColorDepth
    • VGADriver.ScreenSize
    • VGADriver.TextSize
  • Cosmos.HAL.BlockDevice
    • AHCI
    • Ata
    • Ata.BusPositionEnum
    • Ata.ControllerIdEnum
    • AtaPio
    • AtaPio.Cmd
    • AtaPio.Ident
    • AtaPio.SpecLevel
    • AtaPio.Status
    • BlockDevice
    • EBR
    • EBR.PartInfo
    • GPT
    • GPT.GPartInfo
    • IDE
    • MBR
    • MBR.PartInfo
    • Partition
  • Cosmos.HAL.BlockDevice.Ports
    • SATA
    • SATAPI
    • StoragePort
  • Cosmos.HAL.BlockDevice.Registers
    • AHCISignature
    • ATACommands
    • ATADeviceStatus
    • Base
    • Bases
    • CommandAndStatus
    • CurrentInterfaceSpeedStatus
    • DeviceDetectionStatus
    • FISRegisterD2H
    • FISRegisterH2D
    • FISSize
    • FISType
    • GenericRegisters
    • HBACommandHeader
    • HBACommandTable
    • HBAPRDTEntry
    • InterfacePowerManagementStatus
    • InterruptEnable
    • InterruptStatus
    • PortRegisters
    • PortType
  • Cosmos.HAL.Drivers
    • VBEDriver
  • Cosmos.HAL.Drivers.PCI.Audio
    • PCMStream
  • Cosmos.HAL.Drivers.PCI.Network
    • AMDPCNetII
  • Cosmos.HAL.Drivers.PCI.Video
    • VMWareSVGAII
    • VMWareSVGAII.FIFO
    • VMWareSVGAII.Register
  • Cosmos.HAL.Drivers.USB
    • USBHost
  • Cosmos.HAL.Network
    • MACAddress
    • NetworkInit
  • Cosmos.System
    • Console
    • ConsoleKeyEx
    • ConsoleKeyExExtensions
    • Durations
    • Global
    • Kernel
    • KeyboardManager
    • KeyEvent
    • KeyEvent.KeyEventType
    • KeyMapping
    • MathEx
    • MouseManager
    • MouseState
    • Notes
    • PCSExtensions
    • PCSpeaker
    • Power
    • ScanMapBase
  • Cosmos.System.ExtendedASCII
    • CosmosEncodingProvider
  • Cosmos.System.FileSystem
    • CosmosVFS
    • DiskManager
    • FatFileSystemFactory
    • FileSystem
    • FileSystemFactory
    • FileSystemType
  • Cosmos.System.FileSystem.FAT.Listing
    • FatDirectoryEntryAttributeConsts
    • FatDirectoryEntryMetadata
    • FatDirectoryEntryMetadata.LongFilenameEntryMetadata
  • Cosmos.System.FileSystem.Listing
    • DirectoryEntry
    • DirectoryEntryTypeEnum
  • Cosmos.System.FileSystem.VFS
    • VFSBase
    • VFSManager
  • Cosmos.System.Graphics
    • Bitmap
    • Canvas
    • ColorDepth
    • ColorOrder
    • FullScreenCanvas
    • Image
    • ImageFormat
    • Mode
    • Pen
    • Point
    • SVGAIICanvas
    • VBECanvas
    • VGACanvas
    • VGAScreen
  • Cosmos.System.Graphics.Fonts
    • Font
    • PCScreenFont
    • UnicodeMapping
  • Cosmos.System.Network
    • EthernetPacket
    • NetworkStack
  • Cosmos.System.Network.ARP
    • ARPPacket
  • Cosmos.System.Network.Config
    • DNSConfig
    • IPConfig
    • NetworkConfig
  • Cosmos.System.Network.IPv4
    • Address
    • EndPoint
    • ICMPClient
    • ICMPPacket
    • IPPacket
  • Cosmos.System.Network.IPv4.UDP
    • UdpClient
    • UDPPacket
  • Cosmos.System.Network.IPv4.UDP.DHCP
    • DHCPClient
    • DHCPOption
    • DHCPPacket
  • Cosmos.System.Network.IPv4.UDP.DNS
    • DNSAnswer
    • DnsClient
    • DNSPacket
    • DNSPacketAnswer
    • DNSPacketAsk
    • DNSQuery
    • ReplyCode
  • Cosmos.System.ScanMaps
    • DE_Standard
    • FR_Standard
    • TR_StandardQ
    • US_Standard
  • Cosmos.System_Plugs.System
    • ByteImpl
    • ConsoleImpl
    • ConvertImpl
    • DateTimeImpl
    • DecimalImpl
    • DoubleImpl
    • EnumImpl
    • GuidImpl
    • Int16Impl
    • Int32Impl
    • Int64Impl
    • IntPtrImpl
    • MathImpl
    • RandomImpl
    • SByteImpl
    • SingleImpl
    • TimeSpanImpl
    • UInt16Impl
    • UInt32Impl
    • UInt64Impl
    • UIntPtrImpl
    • ValueTypeImpl
  • Cosmos.System_Plugs.System.Globalization
    • CompareInfoImpl
    • EncodingTableImpl
  • Cosmos.System_Plugs.System.IO
    • CosmosFileSystem
    • CosmosFileSystemInfo
    • DirectoryImpl
    • DirectoryInfoImpl
    • DriveInfoImpl
    • FileImpl
    • FileInfoImpl
    • FileLoadExceptionImpl
    • FileNotFoundExceptionImpl
    • FileStreamImpl
    • PathImpl
    • PathInternalImpl
    • TextWriterImpl
  • Cosmos.System_Plugs.System.Runtime
    • RuntimeHelpersImpl
  • Cosmos.System_Plugs.System.Text
    • DecoderExceptionFallbackBufferImpl
    • EncodingImpl
  • Cosmos.System_Plugs.System.Threading
    • SpinWaitImpl
    • ThreadImpl
  • Cosmos.TestRunner
    • Assert
    • TestChannelCommandEnum
    • TestController
  • Cosmos.VS.DebugEngine
    • AD7Util
    • AsmSource
    • CmdIDList
  • Cosmos.VS.DebugEngine.AD7.Definitions
    • AD7_HRESULT
  • Cosmos.VS.DebugEngine.AD7.Impl
    • AD7BoundBreakpoint
    • AD7BreakpointResolution
    • AD7DocumentContext
    • AD7Engine
    • AD7Expression
    • AD7MemoryAddress
    • AD7Module
    • AD7PendingBreakpoint
    • AD7Port
    • AD7PortSupplier
    • AD7Process
    • AD7ProgramProvider
    • AD7StackFrame
    • AD7Thread
    • DebugLocalInfo
  • Cosmos.VS.DebugEngine.Commands
    • BaseDebugCommand
    • DebugCommandExecute
    • DebugCommandHandler
    • DebugExecCommand
    • DebugLaunchCommand
    • DebugLogCommand
  • Cosmos.VS.DebugEngine.Engine.Impl
    • BreakpointManager
    • EngineCallback
    • EngineUtils
    • Operation
    • WorkerThread
  • Cosmos.VS.DebugEngine.Utilities
    • Extensions
  • Cosmos.VS.ProjectSystem
    • IBootableProperties
  • Cosmos.VS.Windows
    • AsmCode
    • AsmComment
    • AsmLabel
    • AsmLine
    • AssemblyUC
    • ConsoleConsts
    • ConsoleTW
    • ConsoleUC
    • CosmosWindowsPackage
    • DataBytesUC
    • DebuggerChannelUC
    • DebuggerUC
    • Global
    • InternalTW
    • InternalUC
    • MemoryViewUC
    • RegistersControl
    • StackTW
    • StackUC
    • StateStorer
    • ToolWindowPane2
    • ToolWindowPaneChannel
  • NASM
    • Program
  • TheRingMaster
    • Program

Class Canvas

Canvas abstract class.

Inheritance
System.Object
Canvas
SVGAIICanvas
VBECanvas
VGACanvas
Namespace: Cosmos.System.Graphics
Assembly: Cosmos.System2.dll
Syntax
public abstract class Canvas : object

Properties

| Improve this Doc View Source

AvailableModes

Available graphics modes.

Declaration
public abstract List<Mode> AvailableModes { get; }
Property Value
Type Description
List<Mode>
| Improve this Doc View Source

DefaultGraphicMode

Get default graphics mode.

Declaration
public abstract Mode DefaultGraphicMode { get; }
Property Value
Type Description
Mode
| Improve this Doc View Source

Mode

Get and set graphics mode.

Declaration
public abstract Mode Mode { get; set; }
Property Value
Type Description
Mode

Methods

| Improve this Doc View Source

AlphaBlend(Color, Color, Byte)

Calculate new Color from back Color with alpha

Declaration
public Color AlphaBlend(Color to, Color from, byte alpha)
Parameters
Type Name Description
Color to

Color to calculate.

Color from

Color used to calculate.

System.Byte alpha

Alpha amount.

Returns
Type Description
Color
| Improve this Doc View Source

CheckIfModeIsValid(Mode)

Check if video mode is valid.

Declaration
protected bool CheckIfModeIsValid(Mode mode)
Parameters
Type Name Description
Mode mode

Video mode.

Returns
Type Description
System.Boolean

bool value.

| Improve this Doc View Source

Clear()

Clear all the Canvas with the Black color.

Declaration
public void Clear()
| Improve this Doc View Source

Clear(Color)

Clear all the Canvas with the specified color.

Declaration
public virtual void Clear(Color color)
Parameters
Type Name Description
Color color

Color.

| Improve this Doc View Source

Disable()

Display graphic mode

Declaration
public abstract void Disable()
| Improve this Doc View Source

Display()

Display screen

Declaration
public abstract void Display()
| Improve this Doc View Source

DrawArray(Color[], Point, Int32, Int32)

Draw array of colors.

Declaration
public virtual void DrawArray(Color[] colors, Point point, int width, int height)
Parameters
Type Name Description
Color[] colors

Colors array.

Point point

Starting point.

System.Int32 width

Width.

System.Int32 height

unused.

| Improve this Doc View Source

DrawArray(Color[], Int32, Int32, Int32, Int32)

Draw array of colors.

Declaration
public abstract void DrawArray(Color[] colors, int x, int y, int width, int height)
Parameters
Type Name Description
Color[] colors

Colors array.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

System.Int32 width

Width.

System.Int32 height

unused.

| Improve this Doc View Source

DrawChar(Char, Font, Pen, Point)

Draw string.

Declaration
public void DrawChar(char c, Font aFont, Pen pen, Point point)
Parameters
Type Name Description
System.Char c
Font aFont

Font used.

Pen pen

Color.

Point point

Point of the top left corner of the char.

| Improve this Doc View Source

DrawChar(Char, Font, Pen, Int32, Int32)

Draw char.

Declaration
public void DrawChar(char c, Font aFont, Pen pen, int x, int y)
Parameters
Type Name Description
System.Char c
Font aFont

Font used.

Pen pen

Color.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

DrawCircle(Pen, Point, Int32)

Draw Circle.

Declaration
public virtual void DrawCircle(Pen pen, Point point, int radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

center point.

System.Int32 radius

Radius.

| Improve this Doc View Source

DrawCircle(Pen, Int32, Int32, Int32)

Draw Circle.

Declaration
public virtual void DrawCircle(Pen pen, int x_center, int y_center, int radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x_center

X center coordinate.

System.Int32 y_center

Y center coordinate.

System.Int32 radius

Radius.

| Improve this Doc View Source

DrawEllipse(Pen, Point, Int32, Int32)

Draw ellipse.

Declaration
public virtual void DrawEllipse(Pen pen, Point point, int x_radius, int y_radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Center point.

System.Int32 x_radius

X radius.

System.Int32 y_radius

Y radius.

| Improve this Doc View Source

DrawEllipse(Pen, Int32, Int32, Int32, Int32)

Draw ellipse.

Declaration
public virtual void DrawEllipse(Pen pen, int x_center, int y_center, int x_radius, int y_radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x_center

X center coordinate.

System.Int32 y_center

Y center coordinate.

System.Int32 x_radius

X radius.

System.Int32 y_radius

Y radius.

| Improve this Doc View Source

DrawFilledCircle(Pen, Point, Int32)

Draw Filled Circle.

Declaration
public virtual void DrawFilledCircle(Pen pen, Point point, int radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

center point.

System.Int32 radius

Radius.

| Improve this Doc View Source

DrawFilledCircle(Pen, Int32, Int32, Int32)

Draw Filled Circle.

Declaration
public virtual void DrawFilledCircle(Pen pen, int x0, int y0, int radius)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x0
System.Int32 y0
System.Int32 radius

Radius.

| Improve this Doc View Source

DrawFilledEllipse(Pen, Point, Int32, Int32)

Draw Filled Ellipse.

Declaration
public virtual void DrawFilledEllipse(Pen pen, Point point, int height, int width)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Center point.

System.Int32 height

Height.

System.Int32 width

Width.

| Improve this Doc View Source

DrawFilledEllipse(Pen, Int32, Int32, Int32, Int32)

Draw Filled Ellipse.

Declaration
public virtual void DrawFilledEllipse(Pen pen, int x, int y, int height, int width)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x

X Position.

System.Int32 y

Y Position.

System.Int32 height

Height.

System.Int32 width

Width.

| Improve this Doc View Source

DrawFilledRectangle(Pen, Point, Int32, Int32)

Draw filled rectangle.

Declaration
public virtual void DrawFilledRectangle(Pen pen, Point point, int width, int height)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Starting point.

System.Int32 width

Width.

System.Int32 height

Height.

| Improve this Doc View Source

DrawFilledRectangle(Pen, Int32, Int32, Int32, Int32)

Draw filled rectangle.

Declaration
public virtual void DrawFilledRectangle(Pen pen, int x_start, int y_start, int width, int height)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x_start

Starting point X coordinate.

System.Int32 y_start

Starting point Y coordinate.

System.Int32 width

Width.

System.Int32 height

Height.

| Improve this Doc View Source

DrawImage(Image, Point)

Draw image.

Declaration
public void DrawImage(Image image, Point point)
Parameters
Type Name Description
Image image

Image to draw.

Point point

Point of the top left corner of the image.

| Improve this Doc View Source

DrawImage(Image, Int32, Int32)

Draw image.

Declaration
public virtual void DrawImage(Image image, int x, int y)
Parameters
Type Name Description
Image image

Image to draw.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

DrawImage(Image, Int32, Int32, Int32, Int32)

Draw a Scaled Bitmap.

Declaration
public virtual void DrawImage(Image image, int x, int y, int w, int h)
Parameters
Type Name Description
Image image

Image to Scale.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

System.Int32 w

Desired Width.

System.Int32 h

Desired Height.

| Improve this Doc View Source

DrawImageAlpha(Image, Point)

Draw image with alpha channel.

Declaration
public void DrawImageAlpha(Image image, Point point)
Parameters
Type Name Description
Image image

Image to draw.

Point point

Point of the top left corner of the image.

| Improve this Doc View Source

DrawImageAlpha(Image, Int32, Int32)

Draw image with alpha channel.

Declaration
public void DrawImageAlpha(Image image, int x, int y)
Parameters
Type Name Description
Image image

Image to draw.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

DrawLine(Pen, Point, Point)

Draw line.

Declaration
public void DrawLine(Pen pen, Point p1, Point p2)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point p1

Staring point.

Point p2

End point.

| Improve this Doc View Source

DrawLine(Pen, Int32, Int32, Int32, Int32)

Draw line.

Declaration
public virtual void DrawLine(Pen pen, int x1, int y1, int x2, int y2)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x1

Staring point X coordinate.

System.Int32 y1

Staring point Y coordinate.

System.Int32 x2

End point X coordinate.

System.Int32 y2

End point Y coordinate.

| Improve this Doc View Source

DrawLine(Pen, Single, Single, Single, Single)

Draw line. Not implemented.

Declaration
public void DrawLine(Pen pen, float x1, float y1, float x2, float y2)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Single x1

Staring point X coordinate.

System.Single y1

Staring point Y coordinate.

System.Single x2

End point X coordinate.

System.Single y2

End point Y coordinate.

| Improve this Doc View Source

DrawPoint(Pen, Point)

Draw point.

Declaration
public void DrawPoint(Pen pen, Point point)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Point.

| Improve this Doc View Source

DrawPoint(Pen, Int32, Int32)

Draw point.

Declaration
public abstract void DrawPoint(Pen pen, int x, int y)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

DrawPoint(Pen, Single, Single)

Draw point to the screen. Not implemented.

Declaration
public abstract void DrawPoint(Pen pen, float x, float y)
Parameters
Type Name Description
Pen pen

Pen to draw the point with.

System.Single x

X coordinate.

System.Single y

Y coordinate.

| Improve this Doc View Source

DrawPolygon(Pen, Point[])

Draw polygon.

Declaration
public virtual void DrawPolygon(Pen pen, params Point[] points)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point[] points

Points array.

| Improve this Doc View Source

DrawRectangle(Pen, Point, Int32, Int32)

Draw rectangle.

Declaration
public virtual void DrawRectangle(Pen pen, Point point, int width, int height)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Staring point.

System.Int32 width

Width.

System.Int32 height

Height.

| Improve this Doc View Source

DrawRectangle(Pen, Int32, Int32, Int32, Int32)

Draw rectangle.

Declaration
public virtual void DrawRectangle(Pen pen, int x, int y, int width, int height)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

System.Int32 width

Width.

System.Int32 height

Height.

| Improve this Doc View Source

DrawRectangle(Pen, Single, Single, Single, Single)

Draw rectangle. Not implemented.

Declaration
public virtual void DrawRectangle(Pen pen, float x_start, float y_start, float width, float height)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Single x_start

starting X coordinate.

System.Single y_start

starting Y coordinate.

System.Single width

Width.

System.Single height

Height.

| Improve this Doc View Source

DrawSquare(Pen, Point, Int32)

Draw square.

Declaration
public virtual void DrawSquare(Pen pen, Point point, int size)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point

Starting point.

System.Int32 size

size.

| Improve this Doc View Source

DrawSquare(Pen, Int32, Int32, Int32)

Draw square.

Declaration
public virtual void DrawSquare(Pen pen, int x, int y, int size)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

System.Int32 size

size.

| Improve this Doc View Source

DrawString(String, Font, Pen, Point)

Draw string.

Declaration
public void DrawString(string str, Font aFont, Pen pen, Point point)
Parameters
Type Name Description
System.String str

string to draw.

Font aFont

Font used.

Pen pen

Color.

Point point

Point of the top left corner of the string.

| Improve this Doc View Source

DrawString(String, Font, Pen, Int32, Int32)

Draw string.

Declaration
public void DrawString(string str, Font aFont, Pen pen, int x, int y)
Parameters
Type Name Description
System.String str

string to draw.

Font aFont

Font used.

Pen pen

Color.

System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

DrawTriangle(Pen, Point, Point, Point)

Draw triangle.

Declaration
public virtual void DrawTriangle(Pen pen, Point point0, Point point1, Point point2)
Parameters
Type Name Description
Pen pen

Pen to draw with.

Point point0

First point.

Point point1

Second point.

Point point2

Third point.

| Improve this Doc View Source

DrawTriangle(Pen, Int32, Int32, Int32, Int32, Int32, Int32)

Draw triangle.

Declaration
public virtual void DrawTriangle(Pen pen, int v1x, int v1y, int v2x, int v2y, int v3x, int v3y)
Parameters
Type Name Description
Pen pen

Pen to draw with.

System.Int32 v1x

First point X coordinate.

System.Int32 v1y

First point Y coordinate.

System.Int32 v2x

Second point X coordinate.

System.Int32 v2y

Second point Y coordinate.

System.Int32 v3x

Third point X coordinate.

System.Int32 v3y

Third point Y coordinate.

| Improve this Doc View Source

GetPointColor(Int32, Int32)

Get point color.

Declaration
public abstract Color GetPointColor(int x, int y)
Parameters
Type Name Description
System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

Returns
Type Description
Color

Color value.

| Improve this Doc View Source

ThrowIfCoordNotValid(Point)

Check if coordinats are valid. Throw exception if not.

Declaration
protected void ThrowIfCoordNotValid(Point point)
Parameters
Type Name Description
Point point

Point on the convas.

| Improve this Doc View Source

ThrowIfCoordNotValid(Int32, Int32)

Check if coordinats are valid. Throw exception if not.

Declaration
protected void ThrowIfCoordNotValid(int x, int y)
Parameters
Type Name Description
System.Int32 x

X coordinate.

System.Int32 y

Y coordinate.

| Improve this Doc View Source

ThrowIfModeIsNotValid(Mode)

Check if video mode is valid. Throw exception if not.

Declaration
protected void ThrowIfModeIsNotValid(Mode mode)
Parameters
Type Name Description
Mode mode

Video mode.

| Improve this Doc View Source

TrimLine(ref Int32, ref Int32, ref Int32, ref Int32)

TrimLine

Declaration
protected void TrimLine(ref int x1, ref int y1, ref int x2, ref int y2)
Parameters
Type Name Description
System.Int32 x1

X coordinate.

System.Int32 y1

Y coordinate.

System.Int32 x2

X coordinate.

System.Int32 y2

Y coordinate.

  • Improve this Doc
  • View Source
In This Article
Back to top