Click or drag to resize
DrawingWindow Methods

The DrawingWindow type exposes the following members.

Methods
  NameDescription
Public methodClear
Clears the screen to the default color (white).
Public methodClear(Color)
Clears the screen to the specified color.
Public methodDeleteVisual
Removes a visual from the canvas
Public methodDrawArc
Draws a circular arc of the specified radius, centered at (X, Y), from angle1 to angle2 (in degrees) clockwise. An angle of 0 would means an arc start at 3 o'clock
Public methodDrawCircle
Draws a circle of the specified radius, centered at (X, Y).
Public methodDrawCirle
Draws a circle of the specified radius, centered at (X, Y).
Public methodDrawEllipse(Double, Double, Double, Double)
Draws an ellipse with the specified semimajor and semiminor axes, centered at (X, Y).
Public methodDrawEllipse(DrawingVisual, Double, Double, Double, Double)
Draws an ellipse with the specified semimajor and semiminor axes, centered at (X, Y).
Public methodDrawFilledCircle(Double, Double, Double)
Draws a filled circle of the specified radius, centered at (X, Y).
Public methodDrawFilledCircle(DrawingVisual, Double, Double, Double)
Draws a filled circle of the specified radius, centered at (X, Y).
Public methodDrawFilledEllipse(Double, Double, Double, Double)
Draws a filled ellipse with the specified semimajor and semiminor axes, centered at (X, Y).
Public methodDrawFilledEllipse(DrawingVisual, Double, Double, Double, Double)
Draws a filled ellipse with the specified semimajor and semiminor axes, centered at (X, Y).
Public methodDrawFilledPolygon
Draws a filled polygon with the vertices (X0, Y0), (X1, Y1), ..., (XN-1, YN-1).
Public methodDrawFilledRectangle
Draws a filled rectangle of the specified size, centered at (X, Y).
Public methodDrawFilledSquare
Draws a filled square of the specified size, centered at (X, Y).
Public methodDrawLine(Double, Double, Double, Double)
Draws a line segment between (X0, Y0) and (X1, Y1).
Public methodDrawLine(DrawingVisual, Double, Double, Double, Double)
Draws a line segment between (X0, Y0) and (X1, Y1).
Public methodDrawPicture(Double, Double, String, Double, Double)
Loads and draws a picture centered at (X, Y) within the specified rectangle with sizes in desiredWidth and desiredHeight. The picture will be scaled to fit the rectangle
Public methodDrawPicture(Double, Double, String, Double, Double, Double)
Loads and draws a picture centered at (X, Y) within the specified rectangle with sizes in desiredWidth and desiredHeight. The picture will be scaled to fit the rectangle
Public methodDrawPoint
Draws a point centered at (X, Y). The point is a filled circle whose radius is equal to half the pen thickness.
Public methodDrawPolygon
Draws a polygon with the vertices (X0, Y0), (X1, Y1), ..., (XN-1, YN-1).
Public methodDrawRectangle
Draws a rectangle of the specified size, centered at (X, Y).
Public methodDrawSquare
Draws a square of the specified size, centered at (X, Y).
Public methodDrawText(Double, Double, String, Double, Boolean)
Draws a text using the current font starting at (X, Y) given the desired font size. The text is defaulted to flow from left to right can be specified to flow from right to left.
Public methodDrawText(Double, Double, String, Double, Double, Boolean)
Draws a text using the current font starting at (X, Y) given the desired font size. The text is defaulted to flow from left to right can be specified to flow from right to left.
Public methodGetCanvasSize
Returns the current canvas size
Public methodGetFont
Returns the curent font family
Public methodGetPenColor
Returns the current pen/solid brush color
Public methodGetPenThickness
Returns the current pen thickness (2 * radius), or the line width
Public methodSetCanvasSize
Resets the canvas size to default size
Public methodSetCanvasSize(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.
Public methodSetFont
Resets the text font to the default font
Public methodSetFont(FontFamily)
Changes the text font to the desired font family
Public methodSetPenColor
Resets the the current pen/solid brush color to default (black)
Public methodSetPenColor(Color)
Changes the the current pen/solid brush color to desired color using the Color type.
Public methodSetPenColor(Int32, Int32, Int32)
Changes the the current pen/solid brush color to desired color in RGB from
Public methodSetPenThickness
Sets the pen size to the default size (2 Dpi). The pen is circular, so that lines have rounded ends. When you draw a point, you get a circle.
Public methodSetPenThickness(Double)
Sets the pen size or line width to the desired size. The pen is circular, so that lines have rounded ends. When you draw a point, you get a circle.
Public methodSetPercentScale
If set, the input coordinate will be in the range 0.0 - 1.0. If an input coordinate is greater than 1, this setting will not take effect
Top
See Also