C# Класс Gonzo.Elements.NineSlicer

A utility class for slicing an image into nine pieces (nineslicing).
Показать файл Открыть проект

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

Свойство Тип Описание
BLeft Microsoft.Xna.Framework.Rectangle
CLeft Microsoft.Xna.Framework.Rectangle
LeftPadding int
TCenter_Scale Microsoft.Xna.Framework.Vector2
TLeft Microsoft.Xna.Framework.Rectangle
Width int

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

Метод Описание
Calculate ( float X, float Y, int LeftPadding, int RightPadding, int TopPadding, int BottomPadding ) : void

Calculates 9 patches of texture (from: http://gamedev.stackexchange.com/questions/115684/monogame-scale-resizing-texture-without-stretching-the-borders)

NineSlicer ( Vector2 Position, int TextureWidth, int TextureHeight, int LeftPadding, int RightPadding, int TopPadding, int BottomPadding ) : Files.Manager

Constructs a new NineSlicer instance.

ReScale ( float width, float height ) : void

Rescales this NinwSlicer to the specified width and height.

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

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

Calculates 9 patches of texture (from: http://gamedev.stackexchange.com/questions/115684/monogame-scale-resizing-texture-without-stretching-the-borders)
public Calculate ( float X, float Y, int LeftPadding, int RightPadding, int TopPadding, int BottomPadding ) : void
X float X-position of texture.
Y float Y-position of texture.
LeftPadding int Amount of padding for left side.
RightPadding int Amount of padding for right side.
TopPadding int Amount of padding for top.
BottomPadding int Amount of padding for bottom.
Результат void

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

Constructs a new NineSlicer instance.
public NineSlicer ( Vector2 Position, int TextureWidth, int TextureHeight, int LeftPadding, int RightPadding, int TopPadding, int BottomPadding ) : Files.Manager
Position Microsoft.Xna.Framework.Vector2 Position of where to begin slicing the texture.
TextureWidth int Width of texture.
TextureHeight int Height of texture.
LeftPadding int Padding on the left.
RightPadding int Padding on the right.
TopPadding int Padding at the top.
BottomPadding int Padding at the bottom.
Результат Files.Manager

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

Rescales this NinwSlicer to the specified width and height.
public ReScale ( float width, float height ) : void
width float Width to scale to.
height float Height to scale to.
Результат void

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

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

public Rectangle,Microsoft.Xna.Framework BLeft
Результат Microsoft.Xna.Framework.Rectangle

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

public Rectangle,Microsoft.Xna.Framework CLeft
Результат Microsoft.Xna.Framework.Rectangle

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

public int LeftPadding
Результат int

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

public Vector2,Microsoft.Xna.Framework TCenter_Scale
Результат Microsoft.Xna.Framework.Vector2

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

public Rectangle,Microsoft.Xna.Framework TLeft
Результат Microsoft.Xna.Framework.Rectangle

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

public int Width
Результат int