OpenBveApi.Textures.TextureClipRegion.TextureClipRegion C# (CSharp) Method

TextureClipRegion() public method

Creates a new clip region.
Raised when the left or top are negative. Raised when the width or height are non-positive.
public TextureClipRegion ( int left, int top, int width, int height ) : System
left int The left coordinate.
top int The top coordinate.
width int The width.
height int The height.
return System
		public TextureClipRegion(int left, int top, int width, int height) {
			if (left < 0 | top < 0) {
				throw new ArgumentException("The left or top coordinates are negative.");
			} else if (width <= 0 | height <= 0) {
				throw new ArgumentException("The width or height are non-positive.");
			} else {
				this.MyLeft = left;
				this.MyTop = top;
				this.MyWidth = width;
				this.MyHeight = height;
			}
		}
		// --- operators ---