public NinePatch(NinePatch ninePatch, Color color) : this() { Texture = ninePatch.Texture; _bottomLeft = ninePatch._bottomLeft; _bottomCenter = ninePatch._bottomCenter; _bottomRight = ninePatch._bottomRight; _middleLeft = ninePatch._middleLeft; _middleCenter = ninePatch._middleCenter; _middleRight = ninePatch._middleRight; _topLeft = ninePatch._topLeft; _topCenter = ninePatch._topCenter; _topRight = ninePatch._topRight; LeftWidth = ninePatch.LeftWidth; RightWidth = ninePatch.RightWidth; MiddleWidth = ninePatch.MiddleWidth; MiddleHeight = ninePatch.MiddleHeight; TopHeight = ninePatch.TopHeight; BottomHeight = ninePatch.BottomHeight; _vertices = new VertexPositionColorTexture[ninePatch._vertices.Length]; _index = ninePatch._index; Array.Copy(ninePatch._vertices, _vertices, _vertices.Length); Color = ninePatch.Color; }
public NinePatch CreatePatch(string name) { foreach (AtlasRegion region in Regions) { if (region.Name == name) { int[] splits = region.Splits; if (splits == null) { throw new ArgumentException("Region does not have ninepatch splits: " + name); } NinePatch patch = new NinePatch(region, splits[0], splits[1], splits[2], splits[3]); if (region.Pads != null) { patch.SetPadding(region.Pads[0], region.Pads[1], region.Pads[2], region.Pads[3]); } return(patch); } } return(null); }
public NinePatch(NinePatch ninePatch) : this(ninePatch, ninePatch.Color) { }
public Image(NinePatch patch) : this(new NinePatchDrawable(patch), Scaling.Stretch, Alignment.Center) { }
public NinePatch CreatePatch(string name) { foreach (AtlasRegion region in Regions) { if (region.Name == name) { int[] splits = region.Splits; if (splits == null) throw new ArgumentException("Region does not have ninepatch splits: " + name); NinePatch patch = new NinePatch(region, splits[0], splits[1], splits[2], splits[3]); if (region.Pads != null) patch.SetPadding(region.Pads[0], region.Pads[1], region.Pads[2], region.Pads[3]); return patch; } } return null; }
public NinePatchDrawable(NinePatch patch) { Patch = patch; }
public NinePatch(NinePatch ninePatch, Color color) : this() { Texture = ninePatch.Texture; _bottomLeft = ninePatch._bottomLeft; _bottomCenter = ninePatch._bottomCenter; _bottomRight = ninePatch._bottomRight; _middleLeft = ninePatch._middleLeft; _middleCenter = ninePatch._middleCenter; _middleRight = ninePatch._middleRight; _topLeft = ninePatch._topLeft; _topCenter = ninePatch._topCenter; _topRight = ninePatch._topRight; LeftWidth = ninePatch.LeftWidth; RightWidth = ninePatch.RightWidth; MiddleWidth = ninePatch.MiddleWidth; MiddleHeight = ninePatch.MiddleHeight; TopHeight = ninePatch.TopHeight; BottomHeight = ninePatch.BottomHeight; _vertices = new VertexPositionColorTexture[ninePatch._vertices.Length]; _index = ninePatch._index; Array.Copy(ninePatch._vertices, _vertices, _vertices.Length); Color = ninePatch.Color; }
public NinePatch(NinePatch ninePatch) : this(ninePatch, ninePatch.Color) { }