예제 #1
0
 public UISprite(CashedTexture2D _tex, Rectangle _sourceRect, Vector2 _position)
     : base(new Rectangle((int)_position.X, (int)_position.Y, _sourceRect.Width, _sourceRect.Height))
 {
     ImagePart newimage = new ImagePart(_tex, _sourceRect);
     SetSpriteImage(newimage);
 }
예제 #2
0
 public ImagePart(CashedTexture2D _texture, Rectangle? _sourceRct)
 {
     texture = _texture;
     texture.Retain();
     sourceRct = _sourceRct;
 }
예제 #3
0
 public UISprite(CashedTexture2D _tex)
     : base(new Rectangle(0,0,_tex.texture.Width,_tex.texture.Height))
 {
     ImagePart newimage = new ImagePart(_tex, null);
     SetSpriteImage(newimage);
 }