C# Class QuickFont.QBitmap

Datei anzeigen Open project: Pireax/neovim.cs Class Usage Examples

Public Properties

Property Type Description
bitmap System.Drawing.Bitmap
bitmapData System.Drawing.Imaging.BitmapData

Public Methods

Method Description
Blit ( BitmapData source, BitmapData target, Rectangle sourceRect, int px, int py ) : void

Blits from source to target. Both source and target must be 32-bit

Blit ( BitmapData source, BitmapData target, int srcPx, int srcPy, int srcW, int srcH, int destX, int destY ) : void

Blits from source to target. Both source and target must be 32-bit

BlitMask ( BitmapData source, BitmapData target, int srcPx, int srcPy, int srcW, int srcH, int px, int py ) : void

Blits a block of a bitmap data from source to destination, using the luminance of the source to determine the alpha of the target. Source must be 24-bit, target must be 32-bit.

BlurAlpha ( int radius, int passes ) : void
Clear32 ( byte r, byte g, byte b, byte a ) : void
Colour32 ( byte r, byte g, byte b ) : void

Sets colour without touching alpha values

DownScale32 ( int newWidth, int newHeight ) : void
EmptyAlphaPixel ( BitmapData bitmapData, int px, int py, byte alphaEmptyPixelTolerance ) : bool

Returns try if the given pixel is empty (i.e. alpha is zero)

EmptyPixel ( BitmapData bitmapData, int px, int py ) : bool

Returns try if the given pixel is empty (i.e. black)

Free ( ) : void
GetAlpha32 ( int px, int py, byte &a ) : void
GetPixel32 ( int px, int py, byte &r, byte &g, byte &b, byte &a ) : void
PutAlpha32 ( int px, int py, byte a ) : void
PutPixel32 ( int px, int py, byte r, byte g, byte b, byte a ) : void
QBitmap ( Bitmap bitmap ) : System
QBitmap ( string filePath ) : System

Private Methods

Method Description
LockBits ( Bitmap bitmap ) : void

Method Details

Blit() public static method

Blits from source to target. Both source and target must be 32-bit
public static Blit ( BitmapData source, BitmapData target, Rectangle sourceRect, int px, int py ) : void
source System.Drawing.Imaging.BitmapData
target System.Drawing.Imaging.BitmapData
sourceRect System.Drawing.Rectangle
px int
py int
return void

Blit() public static method

Blits from source to target. Both source and target must be 32-bit
public static Blit ( BitmapData source, BitmapData target, int srcPx, int srcPy, int srcW, int srcH, int destX, int destY ) : void
source System.Drawing.Imaging.BitmapData
target System.Drawing.Imaging.BitmapData
srcPx int
srcPy int
srcW int
srcH int
destX int
destY int
return void

BlitMask() public static method

Blits a block of a bitmap data from source to destination, using the luminance of the source to determine the alpha of the target. Source must be 24-bit, target must be 32-bit.
public static BlitMask ( BitmapData source, BitmapData target, int srcPx, int srcPy, int srcW, int srcH, int px, int py ) : void
source System.Drawing.Imaging.BitmapData
target System.Drawing.Imaging.BitmapData
srcPx int
srcPy int
srcW int
srcH int
px int
py int
return void

BlurAlpha() public method

public BlurAlpha ( int radius, int passes ) : void
radius int
passes int
return void

Clear32() public method

public Clear32 ( byte r, byte g, byte b, byte a ) : void
r byte
g byte
b byte
a byte
return void

Colour32() public method

Sets colour without touching alpha values
public Colour32 ( byte r, byte g, byte b ) : void
r byte
g byte
b byte
return void

DownScale32() public method

public DownScale32 ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
return void

EmptyAlphaPixel() public static method

Returns try if the given pixel is empty (i.e. alpha is zero)
public static EmptyAlphaPixel ( BitmapData bitmapData, int px, int py, byte alphaEmptyPixelTolerance ) : bool
bitmapData System.Drawing.Imaging.BitmapData
px int
py int
alphaEmptyPixelTolerance byte
return bool

EmptyPixel() public static method

Returns try if the given pixel is empty (i.e. black)
public static EmptyPixel ( BitmapData bitmapData, int px, int py ) : bool
bitmapData System.Drawing.Imaging.BitmapData
px int
py int
return bool

Free() public method

public Free ( ) : void
return void

GetAlpha32() public method

public GetAlpha32 ( int px, int py, byte &a ) : void
px int
py int
a byte
return void

GetPixel32() public method

public GetPixel32 ( int px, int py, byte &r, byte &g, byte &b, byte &a ) : void
px int
py int
r byte
g byte
b byte
a byte
return void

PutAlpha32() public method

public PutAlpha32 ( int px, int py, byte a ) : void
px int
py int
a byte
return void

PutPixel32() public method

public PutPixel32 ( int px, int py, byte r, byte g, byte b, byte a ) : void
px int
py int
r byte
g byte
b byte
a byte
return void

QBitmap() public method

public QBitmap ( Bitmap bitmap ) : System
bitmap System.Drawing.Bitmap
return System

QBitmap() public method

public QBitmap ( string filePath ) : System
filePath string
return System

Property Details

bitmap public_oe property

public Bitmap,System.Drawing bitmap
return System.Drawing.Bitmap

bitmapData public_oe property

public BitmapData,System.Drawing.Imaging bitmapData
return System.Drawing.Imaging.BitmapData