C# Class TexturePacker.Packer

Objects that performs the packing task. Takes a list of textures as input and generates a set of atlas textures/definition pairs
Afficher le fichier Open project: mfascia/TexturePacker Class Usage Examples

Méthodes publiques

Свойство Type Description
AtlasSize int
Atlasses List
DebugMode bool
Error System.IO.StringWriter
FitHeuristic BestFitHeuristic
Log System.IO.StringWriter
Padding int
SourceTextures List

Méthodes publiques

Méthode Description
Packer ( ) : System
Process ( string _SourceDir, string _Pattern, int _AtlasSize, int _Padding, bool _DebugMode ) : void
SaveAtlasses ( string _Destination ) : void

Private Methods

Méthode Description
CreateAtlasImage ( Atlas _Atlas ) : Image
FindBestFitForNode ( Node _Node, List _Textures ) : TextureInfo
HorizontalSplit ( Node _ToSplit, int _Width, int _Height, List _List ) : void
LayoutAtlas ( List _Textures, Atlas _Atlas ) : List
ScanForTextures ( string _Path, string _Wildcard ) : void
VerticalSplit ( Node _ToSplit, int _Width, int _Height, List _List ) : void

Method Details

Packer() public méthode

public Packer ( ) : System
Résultat System

Process() public méthode

public Process ( string _SourceDir, string _Pattern, int _AtlasSize, int _Padding, bool _DebugMode ) : void
_SourceDir string
_Pattern string
_AtlasSize int
_Padding int
_DebugMode bool
Résultat void

SaveAtlasses() public méthode

public SaveAtlasses ( string _Destination ) : void
_Destination string
Résultat void

Property Details

AtlasSize public_oe property

Size of the atlas in pixels. Represents one axis, as atlases are square
public int AtlasSize
Résultat int

Atlasses public_oe property

List of all the output atlases
public List Atlasses
Résultat List

DebugMode public_oe property

Toggle for debug mode, resulting in debug atlasses to check the packing algorithm
public bool DebugMode
Résultat bool

Error public_oe property

Stream that recieves all the error info
public StringWriter,System.IO Error
Résultat System.IO.StringWriter

FitHeuristic public_oe property

Which heuristic to use when doing the fit
public BestFitHeuristic FitHeuristic
Résultat BestFitHeuristic

Log public_oe property

Stream that recieves all the info logged
public StringWriter,System.IO Log
Résultat System.IO.StringWriter

Padding public_oe property

Number of pixels that separate textures in the atlas
public int Padding
Résultat int

SourceTextures public_oe property

List of all the textures that need to be packed
public List SourceTextures
Résultat List