C# 클래스 Gonzo.Elements.NineSlicer

A utility class for slicing an image into nine pieces (nineslicing).
파일 보기 프로젝트 열기: Afr0Games/Project-Dollhouse

공개 프로퍼티들

프로퍼티 타입 설명
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