C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
bitmap System.Drawing.Bitmap
bitmapData System.Drawing.Imaging.BitmapData
format JBitmapPixelFormat

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
GetPixFormat ( JBitmapPixelFormat format ) : System.Drawing.Imaging.PixelFormat

Gets the corresponding C# pixel format

Описание методов

Blit() публичный Метод

public Blit ( JBitmap target, int px, int py ) : void
target JBitmap
px int
py int
Результат void

Blit() публичный Метод

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
Результат void

BlitAdditive() публичный Метод

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
Результат void

BlitAdditive24() публичный Метод

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
Результат void

BlitMax() публичный Метод

public BlitMax ( JBitmap target, int px, int py, float strength ) : void
target JBitmap
px int
py int
strength float
Результат void

BlitOLD() публичный Метод

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
Результат void

Clear() публичный Метод

public Clear ( byte val ) : void
val byte
Результат void

Clear24() публичный Метод

public Clear24 ( byte r, byte g, byte b ) : void
r byte
g byte
b byte
Результат void

CreateCopy() публичный Метод

public CreateCopy ( ) : JBitmap
Результат JBitmap

DownScale() публичный Метод

public DownScale ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
Результат void

Free() публичный Метод

Just unlocks the bits, so that the bitmap can no longer be blitted to / from.
public Free ( ) : void
Результат void

GetPixel() публичный Метод

public GetPixel ( int px, int py ) : byte
px int
py int
Результат byte

GetPixel24() публичный Метод

public GetPixel24 ( int px, int py, byte &r, byte &g, byte &b ) : void
px int
py int
r byte
g byte
b byte
Результат void

GetPixelFast() публичный Метод

public GetPixelFast ( int px, int py, byte &col ) : void
px int
py int
col byte
Результат void

GetPixelFast() публичный Метод

public GetPixelFast ( int px, int py, byte &r, byte &g, byte &b ) : void
px int
py int
r byte
g byte
b byte
Результат void

GetPixelFast() публичный Метод

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
Результат void

JBitmap() публичный Метод

public JBitmap ( String fileName, JBitmapPixelFormat _format ) : System
fileName String
_format JBitmapPixelFormat
Результат System

JBitmap() публичный Метод

public JBitmap ( int w, int h, JBitmapPixelFormat _format ) : System
w int
h int
_format JBitmapPixelFormat
Результат System

PutPixelFast() публичный Метод

public PutPixelFast ( int px, int py, byte col ) : void
px int
py int
col byte
Результат void

PutPixelFast() публичный Метод

public PutPixelFast ( int px, int py, byte r, byte g, byte b ) : void
px int
py int
r byte
g byte
b byte
Результат void

PutPixelFast() публичный Метод

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
Результат void

Описание свойств

bitmap публичное свойство

public Bitmap,System.Drawing bitmap
Результат System.Drawing.Bitmap

bitmapData публичное свойство

public BitmapData,System.Drawing.Imaging bitmapData
Результат System.Drawing.Imaging.BitmapData

format публичное свойство

public JBitmapPixelFormat format
Результат JBitmapPixelFormat