C# Class QuickFont.JBitmap

A class for basic bitmap manipulation: clearing bitmaps, blitting from one bitmap to another etc. Generally methods in this class are quite slow and are only intended for pre-rendering. TODO : replace loops with block copies
Afficher le fichier Open project: Pireax/neovim.cs Class Usage Examples

Méthodes publiques

Свойство Type Description
bitmap System.Drawing.Bitmap
bitmapData System.Drawing.Imaging.BitmapData
format JBitmapPixelFormat

Méthodes publiques

Méthode Description
Blit ( JBitmap target, int px, int py ) : void
Blit ( JBitmap target, int srcPx, int srcPy, int srcW, int srcH, int px, int py ) : void
BlitAdditive ( JBitmap target, int px, int py, float strength ) : void

Additively blits onto the target. Only supported for 8bbp.

BlitAdditive24 ( JBitmap target, int px, int py, float strength ) : void

Additively blits onto the target. Supports just 24bpp (source and target)

BlitMax ( JBitmap target, int px, int py, float strength ) : void
BlitOLD ( JBitmap target, int px, int py ) : void

Blits this bitmap onto the target - clips regions that are out of bounds. Only supported for 8bbp

Clear ( byte val ) : void
Clear24 ( byte r, byte g, byte b ) : void
CreateCopy ( ) : JBitmap
DownScale ( int newWidth, int newHeight ) : void
Free ( ) : void

Just unlocks the bits, so that the bitmap can no longer be blitted to / from.

GetPixel ( int px, int py ) : byte
GetPixel24 ( int px, int py, byte &r, byte &g, byte &b ) : void
GetPixelFast ( int px, int py, byte &col ) : void
GetPixelFast ( int px, int py, byte &r, byte &g, byte &b ) : void
GetPixelFast ( int px, int py, byte &r, byte &g, byte &b, byte &a ) : void
JBitmap ( String fileName, JBitmapPixelFormat _format ) : System
JBitmap ( int w, int h, JBitmapPixelFormat _format ) : System
PutPixelFast ( int px, int py, byte col ) : void
PutPixelFast ( int px, int py, byte r, byte g, byte b ) : void
PutPixelFast ( int px, int py, byte r, byte g, byte b, byte a ) : void

Private Methods

Méthode Description
GetPixFormat ( JBitmapPixelFormat format ) : System.Drawing.Imaging.PixelFormat

Gets the corresponding C# pixel format

Method Details

Blit() public méthode

public Blit ( JBitmap target, int px, int py ) : void
target JBitmap
px int
py int
Résultat void

Blit() public méthode

public Blit ( JBitmap target, int srcPx, int srcPy, int srcW, int srcH, int px, int py ) : void
target JBitmap
srcPx int
srcPy int
srcW int
srcH int
px int
py int
Résultat void

BlitAdditive() public méthode

Additively blits onto the target. Only supported for 8bbp.
public BlitAdditive ( JBitmap target, int px, int py, float strength ) : void
target JBitmap
px int
py int
strength float
Résultat void

BlitAdditive24() public méthode

Additively blits onto the target. Supports just 24bpp (source and target)
public BlitAdditive24 ( JBitmap target, int px, int py, float strength ) : void
target JBitmap
px int
py int
strength float
Résultat void

BlitMax() public méthode

public BlitMax ( JBitmap target, int px, int py, float strength ) : void
target JBitmap
px int
py int
strength float
Résultat void

BlitOLD() public méthode

Blits this bitmap onto the target - clips regions that are out of bounds. Only supported for 8bbp
public BlitOLD ( JBitmap target, int px, int py ) : void
target JBitmap
px int
py int
Résultat void

Clear() public méthode

public Clear ( byte val ) : void
val byte
Résultat void

Clear24() public méthode

public Clear24 ( byte r, byte g, byte b ) : void
r byte
g byte
b byte
Résultat void

CreateCopy() public méthode

public CreateCopy ( ) : JBitmap
Résultat JBitmap

DownScale() public méthode

public DownScale ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
Résultat void

Free() public méthode

Just unlocks the bits, so that the bitmap can no longer be blitted to / from.
public Free ( ) : void
Résultat void

GetPixel() public méthode

public GetPixel ( int px, int py ) : byte
px int
py int
Résultat byte

GetPixel24() public méthode

public GetPixel24 ( int px, int py, byte &r, byte &g, byte &b ) : void
px int
py int
r byte
g byte
b byte
Résultat void

GetPixelFast() public méthode

public GetPixelFast ( int px, int py, byte &col ) : void
px int
py int
col byte
Résultat void

GetPixelFast() public méthode

public GetPixelFast ( int px, int py, byte &r, byte &g, byte &b ) : void
px int
py int
r byte
g byte
b byte
Résultat void

GetPixelFast() public méthode

public GetPixelFast ( 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
Résultat void

JBitmap() public méthode

public JBitmap ( String fileName, JBitmapPixelFormat _format ) : System
fileName String
_format JBitmapPixelFormat
Résultat System

JBitmap() public méthode

public JBitmap ( int w, int h, JBitmapPixelFormat _format ) : System
w int
h int
_format JBitmapPixelFormat
Résultat System

PutPixelFast() public méthode

public PutPixelFast ( int px, int py, byte col ) : void
px int
py int
col byte
Résultat void

PutPixelFast() public méthode

public PutPixelFast ( int px, int py, byte r, byte g, byte b ) : void
px int
py int
r byte
g byte
b byte
Résultat void

PutPixelFast() public méthode

public PutPixelFast ( 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
Résultat void

Property Details

bitmap public_oe property

public Bitmap,System.Drawing bitmap
Résultat System.Drawing.Bitmap

bitmapData public_oe property

public BitmapData,System.Drawing.Imaging bitmapData
Résultat System.Drawing.Imaging.BitmapData

format public_oe property

public JBitmapPixelFormat format
Résultat JBitmapPixelFormat