• Home
  • Install
  • Cosmos Website
  • Articles
  • Cosmos
  • X#
  • IL2CPU
Show / Hide Table of Contents
  • Cosmos.Core
    • ACPI
    • ACPI.RSDPtr
    • Bootstrap
    • CPU
    • GCImplementation
    • GCTable
    • Global
    • INTs
    • INTs.EFlagsEnum
    • INTs.ExceptionInterruptDelegate
    • INTs.IRQContext
    • INTs.IRQDelegate
    • INTs.MMXContext
    • INTs.TSS
    • IOPort
    • KernelPanics
    • ManagedMemoryBlock
    • MemoryBlock
    • MemoryBlock08
    • MemoryBlock16
    • MemoryBlock32
    • MemoryMapBlock
    • MemoryOperations
    • PIC
    • PIC.Cmd
    • RawMemoryMapBlock
    • VTable
    • VTablesImpl
  • Cosmos.Core.IOGroup
    • ATA
    • PIC
    • PS2Controller
  • Cosmos.Core.Memory
    • Heap
    • HeapLarge
    • HeapMedium
    • HeapSmall
    • ObjectGCStatus
    • RAT
    • RAT.PageType
    • RootSMTBlock
    • SMTBlock
    • SMTPage
  • Cosmos.Core.MemoryGroup
    • AHCI
  • Cosmos.Core.Multiboot
    • Multiboot2
  • Cosmos.Core.Multiboot.Tags
    • AcpiNew
    • AcpiOld
    • BasicMemoryInformation
    • EFI64
    • Framebuffer
    • MB2Tag
    • MemoryMap
  • Cosmos.Core_Asm
    • ArrayClearAsm
    • ArrayGetLengthAsm
    • ArrayImpl
    • ArrayInternalCopyAsm
    • BufferBlockCopyAsm
    • BufferImpl
    • CPUCanReadCPUIDAsm
    • CPUDisableINTsAsm
    • CPUEnableINTsAsm
    • CPUGetEBPValue
    • CPUGetEndOfKernelAsm
    • CPUGetESPValue
    • CPUGetStackStart
    • CPUHaltAsm
    • CPUImpl
    • CPUInitFloatAsm
    • CPUInitSSEAsm
    • CPUReadCPUIDAsm
    • CPUReadModelSpecificRegisterAsm
    • CPUReadTimestampCounterAsm
    • CPUSetESPValue
    • CPUUpdateIDTAsm
    • CPUZeroFillAsm
    • DelegateCtorAsm
    • DelegateGetMulticastInvokeAsm
    • DelegateImpl
    • DelegateInvokeAsm
    • GCImplementationImpl
    • IOPortImpl
    • Multiboot2Impl
    • Multiboot2ImplAsm
    • RuntimeHelpersImpl
  • Cosmos.Core_Asm.MemoryOperations
    • MemoryOperationsCopy128BlocksAsm
    • MemoryOperationsCopy128BytesAsm
    • MemoryOperationsCopy16BytesAsm
    • MemoryOperationsCopy32BytesAsm
    • MemoryOperationsCopy64BytesAsm
    • MemoryOperationsFill16BlocksAsm
  • Cosmos.Debug.Kernel
    • Debugger
    • DebuggerFactory
  • Cosmos.HAL
    • BaudRate
    • Bootstrap
    • CardType
    • ClassID
    • COMPort
    • DataReceivedHandler
    • 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.OnTrigger
    • Power
    • ProgramIF
    • PS2Controller
    • PS2Keyboard
    • PS2Mouse
    • RTC
    • SerialPort
    • SpeakerExtensions
    • SubclassID
    • TextScreen
    • TextScreenBase
    • TextScreenHelpers
    • VendorID
  • Cosmos.HAL.Audio
    • AudioBitDepth
    • AudioBuffer
    • IAudioBufferProvider
    • SampleFormat
  • Cosmos.HAL.BlockDevice
    • AHCI
    • Ata
    • Ata.BusPositionEnum
    • Ata.ControllerIdEnum
    • ATA_PIO
    • ATA_PIO.Cmd
    • ATA_PIO.DvcSelVal
    • ATA_PIO.Ident
    • ATA_PIO.SpecLevel
    • ATA_PIO.Status
    • ATAPI
    • ATAPI.PacketCommands
    • BlockDevice
    • BlockDeviceType
    • 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.Audio
    • AC97
    • AudioDriver
  • Cosmos.HAL.Drivers.Network
    • AMDPCNetII
    • E1000
    • E1000.RXDesc
    • E1000.TXDesc
    • E1000DeviceID
    • RTL8139
  • Cosmos.HAL.Drivers.USB
    • USBHost
  • Cosmos.HAL.Drivers.Video
    • VBEDriver
    • VGADriver
    • VGADriver.ColorDepth
    • VGADriver.ScreenSize
    • VGADriver.TextSize
  • Cosmos.HAL.Drivers.Video.SVGAII
    • Capability
    • FIFO
    • FIFOCommand
    • ID
    • IOPortOffset
    • Register
    • VMWareSVGAII
  • Cosmos.HAL.Network
    • MACAddress
    • NetworkInit
  • Cosmos.System
    • Console
    • ConsoleKeyEx
    • ConsoleKeyExExtensions
    • Durations
    • Global
    • Kernel
    • KeyboardManager
    • KeyEvent
    • KeyEvent.KeyEventType
    • KeyMapping
    • MouseManager
    • MouseState
    • Notes
    • PCSExtensions
    • PCSpeaker
    • Power
    • ScanMapBase
    • VMTools
  • Cosmos.System.Audio
    • AudioManager
    • AudioMixer
    • AudioStream
  • Cosmos.System.Audio.DSP.Processing
    • AudioPostProcessor
    • GainPostProcessor
  • Cosmos.System.Audio.IO
    • AudioBufferReader
    • AudioBufferReadWriteBase
    • AudioBufferWriter
    • MemoryAudioStream
    • SeekableAudioStream
  • Cosmos.System.ExtendedASCII
    • CosmosEncodingProvider
  • Cosmos.System.FileSystem
    • CosmosVFS
    • Disk
    • FileSystem
    • FileSystemFactory
    • ManagedPartition
  • Cosmos.System.FileSystem.FAT
    • FatFileSystemFactory
  • Cosmos.System.FileSystem.FAT.Listing
    • FatDirectoryEntryAttributeConsts
    • FatDirectoryEntryMetadata
    • FatDirectoryEntryMetadata.LongFilenameEntryMetadata
  • Cosmos.System.FileSystem.ISO9660
    • ISO9660FileSystem
    • ISO9660FileSystemFactory
  • Cosmos.System.FileSystem.Listing
    • DirectoryEntry
    • DirectoryEntryTypeEnum
  • Cosmos.System.FileSystem.VFS
    • FileSystemManager
    • VFSBase
    • VFSManager
  • Cosmos.System.Graphics
    • Bitmap
    • Canvas
    • ColorDepth
    • ColorOrder
    • FullScreenCanvas
    • Image
    • ImageFormat
    • Mode
    • SVGAIICanvas
    • VBECanvas
    • VGACanvas
    • VGAScreen
  • Cosmos.System.Graphics.Fonts
    • Font
    • PCScreenFont
    • UnicodeMapping
  • Cosmos.System.Helpers
    • ArrayHelper
  • Cosmos.System.IO
    • ConsoleStream
    • SyncTextReader
  • Cosmos.System.Keyboard
    • KeyEventHelper
  • Cosmos.System.Network
    • EthernetPacket
    • NetworkDebugger
    • NetworkStack
  • Cosmos.System.Network.ARP
    • ARPPacket
  • Cosmos.System.Network.Config
    • DNSConfig
    • IPConfig
    • NetworkConfig
    • NetworkConfiguration
  • Cosmos.System.Network.IPv4
    • Address
    • EndPoint
    • ICMPClient
    • ICMPPacket
    • IPPacket
    • OutgoingBuffer
  • Cosmos.System.Network.IPv4.TCP
    • Flags
    • Status
    • Tcp
    • TCPOption
    • TCPPacket
    • TransmissionControlBlock
  • 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
    • DEStandardLayout
    • ESStandardLayout
    • FRStandardLayout
    • GBStandardLayout
    • TRStandardLayout
    • US_Dvorak
    • USStandardLayout

Class Canvas

Represents a drawing surface.

Inheritance
System.Object
Canvas
SVGAIICanvas
VBECanvas
VGACanvas
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.System.Graphics
Assembly: Cosmos.System2.dll
Syntax
public abstract class Canvas

Constructors

| Improve this Doc View Source

Canvas()

Initializes a new instance of the Canvas class.

Declaration
public Canvas()
| Improve this Doc View Source

Canvas(Mode)

Initializes a new instance of the Canvas class.

Declaration
public Canvas(Mode mode)
Parameters
Type Name Description
Mode mode

Properties

| Improve this Doc View Source

AvailableModes

The available graphics modes.

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

DefaultGraphicsMode

The default graphics mode.

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

Mode

The currently used display mode.

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

Methods

| Improve this Doc View Source

AlphaBlend(Color, Color, Byte)

Blends between color from and to, using the given alpha value.

Declaration
public static Color AlphaBlend(Color to, Color from, byte alpha)
Parameters
Type Name Description
System.Drawing.Color to

The background color.

System.Drawing.Color from

The foreground color.

System.Byte alpha

The alpha value.

Returns
Type Description
System.Drawing.Color
| Improve this Doc View Source

CheckIfModeIsValid(Mode)

Checks if the given video mode is valid.

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

The target video mode.

Returns
Type Description
System.Boolean
| Improve this Doc View Source

Clear()

Clears the canvas with the default color.

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

Clear(Color)

Clears the entire canvas with the specified color.

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

The color to clear the screen with.

| Improve this Doc View Source

Clear(Int32)

Clears the entire canvas with the specified color.

Declaration
public abstract void Clear(int color)
Parameters
Type Name Description
System.Int32 color

The ARGB color to clear the screen with.

| Improve this Doc View Source

CroppedDrawImage(Image, Int32, Int32, Int32, Int32, Boolean)

Draws the given image at the specified coordinates, cropping the image to fit within the maximum width and height.

Declaration
public virtual void CroppedDrawImage(Image image, int x, int y, int maxWidth, int maxHeight, bool preventOffBoundPixels = true)
Parameters
Type Name Description
Image image

The image to draw.

System.Int32 x

The X coordinate where the image will be drawn.

System.Int32 y

The Y coordinate where the image will be drawn.

System.Int32 maxWidth

The maximum width to display the image. If the image exceeds this width, it will be cropped.

System.Int32 maxHeight

The maximum height to display the image. If the image exceeds this height, it will be cropped.

System.Boolean preventOffBoundPixels

Prevents drawing outside the bounds of the canvas.

| Improve this Doc View Source

Disable()

Disables the canvas.

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

Display()

Updates the screen to display the underlying frame-buffer. Call this method in order to synchronize the screen with the canvas.

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

DrawArc(Int32, Int32, Int32, Int32, Color, Int32, Int32)

Draws an arc.

Declaration
public virtual void DrawArc(int x, int y, int width, int height, Color color, int startAngle = 0, int endAngle = 360)
Parameters
Type Name Description
System.Int32 x

The starting X coordinate.

System.Int32 y

The ending X coordinate.

System.Int32 width

The width of the arc.

System.Int32 height

The height of the arc.

System.Drawing.Color color

The color of the arc.

System.Int32 startAngle

The starting angle of the arc, in degrees.

System.Int32 endAngle

The ending angle of the arc, in degrees.

| Improve this Doc View Source

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

Draws an array of pixels to the canvas, starting at the given coordinates, using the given width.

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

The pixels to draw.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 width

The width of the drawn bitmap.

System.Int32 height

This parameter is unused.

| Improve this Doc View Source

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

Draws an array of pixels to the canvas, starting at the given coordinates, using the given width.

Declaration
public virtual void DrawArray(int[] colors, int x, int y, int width, int height)
Parameters
Type Name Description
System.Int32[] colors

The pixels to draw.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 width

The width of the drawn bitmap.

System.Int32 height

The height of the drawn bitmap.

| Improve this Doc View Source

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

Draws an array of pixels to the canvas, starting at the given coordinates, using the given width.

Declaration
public virtual void DrawArray(int[] colors, int x, int y, int width, int height, int startIndex)
Parameters
Type Name Description
System.Int32[] colors

The pixels to draw.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 width

The width of the drawn bitmap.

System.Int32 height

The height of the drawn bitmap.

System.Int32 startIndex

int[] colors tarting position

| Improve this Doc View Source

DrawChar(Char, Font, Color, Int32, Int32)

Draws a single character using the given bitmap font.

Declaration
public virtual void DrawChar(char c, Font font, Color color, int x, int y)
Parameters
Type Name Description
System.Char c

The character to draw.

Font font

The bitmap font to use.

System.Drawing.Color color

The color to write the string with.

System.Int32 x

The origin X coordinate.

System.Int32 y

The origin Y coordinate.

| Improve this Doc View Source

DrawCircle(Color, Int32, Int32, Int32)

Draws a circle at the given coordinates with the given radius.

Declaration
public virtual void DrawCircle(Color color, int xCenter, int yCenter, int radius)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 xCenter

The X center coordinate.

System.Int32 yCenter

The Y center coordinate.

System.Int32 radius

The radius of the circle to draw.

| Improve this Doc View Source

DrawEllipse(Color, Int32, Int32, Int32, Int32)

Draws an ellipse.

Declaration
public virtual void DrawEllipse(Color color, int xCenter, int yCenter, int xR, int yR)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 xCenter

The X center coordinate.

System.Int32 yCenter

The Y center coordinate.

System.Int32 xR

The X radius.

System.Int32 yR

The Y radius.

| Improve this Doc View Source

DrawFilledCircle(Color, Int32, Int32, Int32)

Draws a filled circle at the given coordinates with the given radius.

Declaration
public virtual void DrawFilledCircle(Color color, int x0, int y0, int radius)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 x0

The X center coordinate.

System.Int32 y0

The Y center coordinate.

System.Int32 radius

The radius of the circle to draw.

| Improve this Doc View Source

DrawFilledEllipse(Color, Int32, Int32, Int32, Int32)

Draws a filled ellipse.

Declaration
public virtual void DrawFilledEllipse(Color color, int xCenter, int yCenter, int yR, int xR)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 xCenter

The X center coordinate.

System.Int32 yCenter

The Y center coordinate.

System.Int32 yR

The Y radius.

System.Int32 xR

The X radius.

| Improve this Doc View Source

DrawFilledRectangle(Color, Int32, Int32, Int32, Int32, Boolean)

Draws a filled rectangle.

Declaration
public virtual void DrawFilledRectangle(Color color, int xStart, int yStart, int width, int height, bool preventOffBoundPixels = true)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw the rectangle with.

System.Int32 xStart

The starting point X coordinate.

System.Int32 yStart

The starting point Y coordinate.

System.Int32 width

The width of the rectangle.

System.Int32 height

The height of the rectangle.

System.Boolean preventOffBoundPixels
| Improve this Doc View Source

DrawImage(Image, Int32, Int32, Boolean)

Draws the given image at the specified coordinates.

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

The image to draw.

System.Int32 x

The origin X coordinate.

System.Int32 y

The origin Y coordinate.

System.Boolean preventOffBoundPixels

Prevents drawing outside the bounds of the canvas.

| Improve this Doc View Source

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

Draws a bitmap, applying scaling to the given image.

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

The image to draw.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 w

The desired width to scale the image to before drawing.

System.Int32 h

The desired height to scale the image to before drawing

System.Boolean preventOffBoundPixels

Prevents drawing outside the bounds of the canvas.

| Improve this Doc View Source

DrawImageAlpha(Image, Int32, Int32, Boolean)

Draws an image with alpha blending.

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

The image to draw.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Boolean preventOffBoundPixels

Prevents drawing outside the bounds of the canvas.

| Improve this Doc View Source

DrawLine(Color, Int32, Int32, Int32, Int32)

Draws a line between the given points.

Declaration
public virtual void DrawLine(Color color, int x1, int y1, int x2, int y2)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw the line with.

System.Int32 x1

The starting point X coordinate.

System.Int32 y1

The starting point Y coordinate.

System.Int32 x2

The end point X coordinate.

System.Int32 y2

The end point Y coordinate.

| Improve this Doc View Source

DrawPoint(Color, Int32, Int32)

Sets the pixel at the given coordinates to the specified color.

Declaration
public abstract void DrawPoint(Color color, int x, int y)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

| Improve this Doc View Source

DrawPoint(Int32, Int32, Int32)

Sets the pixel at the given coordinates to the specified color. without ToArgb()

Declaration
public abstract void DrawPoint(int color, int x, int y)
Parameters
Type Name Description
System.Int32 color

The color to draw with (raw argb).

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

| Improve this Doc View Source

DrawPoint(UInt32, Int32, Int32)

Sets the pixel at the given coordinates to the specified color, without unnecessary color operations.

Declaration
public abstract void DrawPoint(uint color, int x, int y)
Parameters
Type Name Description
System.UInt32 color

The color to draw with (raw argb).

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

| Improve this Doc View Source

DrawPolygon(Color, Point[])

Draws a polygon.

Declaration
public virtual void DrawPolygon(Color color, params Point[] points)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Drawing.Point[] points

The vertices of the polygon.

| Improve this Doc View Source

DrawRectangle(Color, Int32, Int32, Int32, Int32)

Draws a rectangle.

Declaration
public virtual void DrawRectangle(Color color, int x, int y, int width, int height)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 width

The width of the rectangle.

System.Int32 height

The height of the rectangle.

| Improve this Doc View Source

DrawSquare(Color, Int32, Int32, Int32)

Draws a square.

Declaration
public virtual void DrawSquare(Color color, int x, int y, int size)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 x

The X coordinate.

System.Int32 y

The Y coordinate.

System.Int32 size

The size of the square.

| Improve this Doc View Source

DrawString(String, Font, Color, Int32, Int32)

Draws a string using the given bitmap font.

Declaration
public virtual void DrawString(string str, Font font, Color color, int x, int y)
Parameters
Type Name Description
System.String str

The string to draw.

Font font

The bitmap font to use.

System.Drawing.Color color

The color to write the string with.

System.Int32 x

The origin X coordinate.

System.Int32 y

The origin Y coordinate.

| Improve this Doc View Source

DrawTriangle(Color, Int32, Int32, Int32, Int32, Int32, Int32)

Draws a triangle.

Declaration
public virtual void DrawTriangle(Color color, int v1x, int v1y, int v2x, int v2y, int v3x, int v3y)
Parameters
Type Name Description
System.Drawing.Color color

The color to draw with.

System.Int32 v1x

The first points X coordinate.

System.Int32 v1y

The first points Y coordinate.

System.Int32 v2x

The second points X coordinate.

System.Int32 v2y

The second points Y coordinate.

System.Int32 v3x

The third points X coordinate.

System.Int32 v3y

The third points Y coordinate.

| Improve this Doc View Source

GetImage(Int32, Int32, Int32, Int32)

Creates a bitmap by copying a portion of your canvas from the specified coordinates and dimensions.

Declaration
public virtual Bitmap GetImage(int x, int y, int width, int height)
Parameters
Type Name Description
System.Int32 x

The starting X coordinate of the region to copy.

System.Int32 y

The starting Y coordinate of the region to copy.

System.Int32 width

The width of the region to copy.

System.Int32 height

The height of the region to copy.

Returns
Type Description
Bitmap

A new Bitmap containing the copied region.

| Improve this Doc View Source

GetPointColor(Int32, Int32)

Gets the color of the pixel at the given coordinates.

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

The X coordinate.

System.Int32 y

The Y coordinate.

Returns
Type Description
System.Drawing.Color
| Improve this Doc View Source

GetRawPointColor(Int32, Int32)

Gets the color of the pixel at the given coordinates in ARGB.

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

The X coordinate.

System.Int32 y

The Y coordinate.

Returns
Type Description
System.Int32
| Improve this Doc View Source

Name()

The name of the Canvas implementation.

Declaration
public abstract string Name()
Returns
Type Description
System.String
| Improve this Doc View Source

ThrowIfCoordNotValid(Int32, Int32)

Validates that the given coordinates are in-range of the canvas, and throws an exception if the coordinates are out-of-bounds.

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

The X coordinate.

System.Int32 y

The Y coordinate.

Exceptions
Type Condition
System.ArgumentOutOfRangeException

Thrown if the coordinates are invalid.

| Improve this Doc View Source

ThrowIfModeIsNotValid(Mode)

Validates the given video mode, and throws an exception if the given value is invalid.

Declaration
protected void ThrowIfModeIsNotValid(Mode mode)
Parameters
Type Name Description
Mode mode
Exceptions
Type Condition
System.ArgumentOutOfRangeException

Thrown if the mode is not supported.

| Improve this Doc View Source

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

Declaration
protected void TrimLine(ref int x1, ref int y1, ref int x2, ref int y2)
Parameters
Type Name Description
System.Int32 x1
System.Int32 y1
System.Int32 x2
System.Int32 y2
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
☀
☾