System.Drawing.Region.Translate C# (CSharp) Method

Translate() public method

public Translate ( float dx, float dy ) : void
dx float
dy float
return void
        public void Translate(float dx, float dy)
        {
            var translateMatrix = new Matrix(CGAffineTransform.MakeTranslation(dx, dy));
            Transform (translateMatrix);
        }

Same methods

Region::Translate ( int dx, int dy ) : void

Usage Example

示例#1
0
	// Window Constructor. Copies the existing Graphics and creates a new
	// Graphics that has an origin of baseWindow.Location and is always clipped
	// to baseWindow

	internal Graphics(IToolkitGraphics graphics, Rectangle baseWindow)
		: this(graphics)
			{
				this.baseWindow = baseWindow;
				clip = new Region(baseWindow);
				clip.Translate(-baseWindow.X, -baseWindow.Y);
				Clip = clip;
			}
All Usage Examples Of System.Drawing.Region::Translate