MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.DirectBitmap Class Reference

The DirectBitmap class provides an efficient bitmap creating class. More...

Inheritance diagram for MyCaffe.basecode.DirectBitmap:

Public Member Functions

 DirectBitmap (int width, int height)
 The constructro. More...
 
void SetPixel (int x, int y, Color colour)
 Sets a pixel within the bitmap with the specified color. More...
 
void SetRow (int y, Color colour)
 Set an entire row to the same color. More...
 
Color GetPixel (int x, int y)
 Returns the color of a pixel in the bitmap. More...
 
void Dispose ()
 Release all resources used. More...
 

Properties

Bitmap Bitmap [get]
 Returns the Bitmap itself. More...
 
Int32[] Bits [get]
 Returns an array containing the raw bitmap data. More...
 
bool Disposed [get]
 Returns true when disposed. More...
 
int Height [get]
 Returns the bitmap height. More...
 
int Width [get]
 Returns the bitmap width. More...
 
GCHandle BitsHandle [get]
 Returns the bitmap memory handle. More...
 

Detailed Description

The DirectBitmap class provides an efficient bitmap creating class.

See also
C# - Faster Alternatives to SetPixel and GetPixel for Bitmaps for Windows Forms App, Stackoverflow.com.

Definition at line 18 of file DirectBitmap.cs.

Constructor & Destructor Documentation

◆ DirectBitmap()

MyCaffe.basecode.DirectBitmap.DirectBitmap ( int  width,
int  height 
)

The constructro.

Parameters
widthSpecifies the bitmap width.
heightSpecifies the bitmap height.

Definition at line 50 of file DirectBitmap.cs.

Member Function Documentation

◆ Dispose()

void MyCaffe.basecode.DirectBitmap.Dispose ( )

Release all resources used.

Definition at line 107 of file DirectBitmap.cs.

◆ GetPixel()

Color MyCaffe.basecode.DirectBitmap.GetPixel ( int  x,
int  y 
)

Returns the color of a pixel in the bitmap.

Parameters
xSpecifies the x position of the pixel.
ySpecifies the y position of the pixel.
Returns
The color of the pixel is returned.

Definition at line 95 of file DirectBitmap.cs.

◆ SetPixel()

void MyCaffe.basecode.DirectBitmap.SetPixel ( int  x,
int  y,
Color  colour 
)

Sets a pixel within the bitmap with the specified color.

Parameters
xSpecifies the x position of the pixel.
ySpecifies the y position of the pixel.
colourSpecifies the color to set the pixel.

Definition at line 65 of file DirectBitmap.cs.

◆ SetRow()

void MyCaffe.basecode.DirectBitmap.SetRow ( int  y,
Color  colour 
)

Set an entire row to the same color.

Parameters
ySpecifies the row.
colourSpecifies the color.

Definition at line 78 of file DirectBitmap.cs.

Property Documentation

◆ Bitmap

Bitmap MyCaffe.basecode.DirectBitmap.Bitmap
get

Returns the Bitmap itself.

Definition at line 23 of file DirectBitmap.cs.

◆ Bits

Int32 [] MyCaffe.basecode.DirectBitmap.Bits
get

Returns an array containing the raw bitmap data.

Definition at line 27 of file DirectBitmap.cs.

◆ BitsHandle

GCHandle MyCaffe.basecode.DirectBitmap.BitsHandle
getprotected

Returns the bitmap memory handle.

Definition at line 43 of file DirectBitmap.cs.

◆ Disposed

bool MyCaffe.basecode.DirectBitmap.Disposed
get

Returns true when disposed.

Definition at line 31 of file DirectBitmap.cs.

◆ Height

int MyCaffe.basecode.DirectBitmap.Height
get

Returns the bitmap height.

Definition at line 35 of file DirectBitmap.cs.

◆ Width

int MyCaffe.basecode.DirectBitmap.Width
get

Returns the bitmap width.

Definition at line 39 of file DirectBitmap.cs.


The documentation for this class was generated from the following file: