Свойство | Тип | Описание | |
---|---|---|---|
center | Vector2 | ||
origin | Vector2 | ||
sourceRect | |||
texture2D | Microsoft.Xna.Framework.Graphics.Texture2D |
Метод | Описание | |
---|---|---|
Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Microsoft.Xna.Framework | ||
Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, |
||
Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, |
||
Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, float x, float y, float width, float height ) : Microsoft.Xna.Framework |
convenience constructor that casts floats to ints for the sourceRect
|
|
Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y, int width, int height ) : Microsoft.Xna.Framework | ||
ToString ( ) : string | ||
clone ( ) : |
clones the Subtexture
|
|
generateNinePatchRects ( |
generates nine patch Rectangles. destArray should have 9 elements. renderRect is the final area in which the nine patch will be rendered. To just get the source rects for rendering pass in the Subtexture.sourceRect. Pass in a larger Rectangle to get final destination rendering Rectangles.
|
|
subtexturesFromAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int cellWidth, int cellHeight, int cellOffset, int maxCellsToInclude = int.MaxValue ) : List |
provides a List of subtextures given an atlas with equally spaced rows/columns of sprites
|
public Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : Microsoft.Xna.Framework | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
Результат | Microsoft.Xna.Framework |
public Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, |
||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
sourceRect | ||
Результат | Microsoft.Xna.Framework |
public Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, |
||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
sourceRect | ||
origin | Vector2 | |
Результат | Microsoft.Xna.Framework |
public Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, float x, float y, float width, float height ) : Microsoft.Xna.Framework | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | Texture. |
x | float | The x coordinate. |
y | float | The y coordinate. |
width | float | Width. |
height | float | Height. |
Результат | Microsoft.Xna.Framework |
public Subtexture ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y, int width, int height ) : Microsoft.Xna.Framework | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | |
x | int | |
y | int | |
width | int | |
height | int | |
Результат | Microsoft.Xna.Framework |
public generateNinePatchRects ( |
||
renderRect | Render rect. | |
destArray | Destination array. | |
marginLeft | int | Margin left. |
marginRight | int | Margin right. |
marginTop | int | Margin top. |
marginBottom | int | Margin bottom. |
Результат | void |
public static subtexturesFromAtlas ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int cellWidth, int cellHeight, int cellOffset, int maxCellsToInclude = int.MaxValue ) : List |
||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | Texture. |
cellWidth | int | Cell width. |
cellHeight | int | Cell height. |
cellOffset | int | the first cell to include while processing. 0 based indexing. |
maxCellsToInclude | int | Max cells to included. |
Результат | List |
public Rectangle,Microsoft.Xna.Framework sourceRect | ||
Результат |