C# Class ThemeEditor.Common.Graphics.GraphicUtils

显示文件 Open project: usagirei/3DS-Theme-Editor Class Usage Examples

Public Properties

Property Type Description
Bayer8X8 byte[]

Public Methods

Method Description
Bayer565Dither ( byte bgrData, int stride ) : void

Dithers Bgr888 Data into Bgr565-Safe Data.

BgrDataToGrayScale ( byte data ) : void
BlitbgrData ( byte srcData, int srcStride, byte tgtData, int tgtStride, int srcX, int srcY, int tgtX, int tgtY, int width, int height ) : bool

Blits a Region of Bgr888 Data from srcData into tgtData

PaletteGen ( byte bgrData, int max, float tolerance = 0.025f ) : List

Generates a Palette of up to max Colors from the specified bgrData

RotatebgrDataClockwise ( byte bgrData, int stride ) : void
RotatebgrDataCounterClockwise ( byte bgrData, int stride ) : void

Private Methods

Method Description
Clamp ( int a ) : byte
GenBuckets ( byte bgrData, int colorDepth ) : Bucket>.Dictionary
GetClosestColor ( ColorRgb888 col, int depth ) : ColorRgb888
GetClosestColor ( byte channel, int depth ) : byte
ToHsl ( this rgb, double &h, double &s, double &l ) : void

Method Details

Bayer565Dither() public static method

Dithers Bgr888 Data into Bgr565-Safe Data.
public static Bayer565Dither ( byte bgrData, int stride ) : void
bgrData byte Bgr888 Data
stride int Data Stride
return void

BgrDataToGrayScale() public static method

public static BgrDataToGrayScale ( byte data ) : void
data byte
return void

BlitbgrData() public static method

Blits a Region of Bgr888 Data from srcData into tgtData
public static BlitbgrData ( byte srcData, int srcStride, byte tgtData, int tgtStride, int srcX, int srcY, int tgtX, int tgtY, int width, int height ) : bool
srcData byte Source Bgr888 Data
srcStride int Source Bgr888 Data Stride
tgtData byte Target Bgr888 Data
tgtStride int Target Bgr888 Data Stride
srcX int Source X Coordinate
srcY int Source Y Coordinate
tgtX int Target X Coordinate
tgtY int Target Y Coordinate
width int Region Width
height int Region Height
return bool

PaletteGen() public static method

Generates a Palette of up to max Colors from the specified bgrData
public static PaletteGen ( byte bgrData, int max, float tolerance = 0.025f ) : List
bgrData byte Bgr888 Data
max int Max Colors
tolerance float Tolerance
return List

RotatebgrDataClockwise() public static method

public static RotatebgrDataClockwise ( byte bgrData, int stride ) : void
bgrData byte
stride int
return void

RotatebgrDataCounterClockwise() public static method

public static RotatebgrDataCounterClockwise ( byte bgrData, int stride ) : void
bgrData byte
stride int
return void

Property Details

Bayer8X8 public_oe static_oe property

public static byte[] Bayer8X8
return byte[]