Click or drag to resize
DrawingWindowSetCanvasSize Method (Int32, Int32)
Sets the canvas (drawing area) to be Width-by-Height pixels. This also erases the current drawing and resets the coordinate system, pen radius, pen color, and font back to their default values. Ordinarly, this method is called once, at the very beginning of a program.

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public void SetCanvasSize(
	int canvasWidth,
	int canvasHeight
)

Parameters

canvasWidth
Type: SystemInt32
the width as a number of pixels
canvasHeight
Type: SystemInt32
the height as a number of pixels
Exceptions
ExceptionCondition
ArgumentExceptionunless both Width and Height are positive
See Also