Canvas
Wisej.Web.Canvas
public class Canvas : Control, IWisejHandlerPublic Class Canvas
Inherits Control
Implements IWisejHandler
// Example usage of the Canvas control
var canvas = new Wisej.Web.Canvas();
canvas.Redraw += (s, e) =>
{
// Always draw the current state in the Redraw event.
canvas.FillStyle = Color.Red;
canvas.FillRect(10, 10, 100, 100);
canvas.StrokeStyle = Color.Black;
canvas.StrokeRect(10, 10, 100, 100);
};
Constructors
Canvas()
Properties
BorderStyle
FillStyle
GlobalAlpha
GlobalCompositeOperation
LineCap
LineDashOffset
LineJoin
LineWidth
LiveUpdate
MiterLimit
ShadowBlur
ShadowColor
ShadowOffsetX
ShadowOffsetY
StrokeStyle
TextAlign
TextBaseline
TextFont
Methods
Arc(x, y, radius, startAngle, endAngle, counterClockwise)
Parameter
Type
Description
Arc(location, radius, startAngle, endAngle, counterClockwise)
Parameter
Type
Description
ArcTo(x1, y1, x2, y2, radius)
Parameter
Type
Description
ArcTo(location1, location2, radius)
Parameter
Type
Description
BeginPath()
BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
Parameter
Type
Description
ClearRect(rect)
Parameter
Type
Description
ClearRect(x, y, width, height)
Parameter
Type
Description
Clip()
ClosePath()
CreateLinearGradient(x0, y0, x1, y1, colorStops)
Parameter
Type
Description
CreatePattern(image, repeat)
Parameter
Type
Description
CreatePattern(imageSource, repeat)
Parameter
Type
Description
CreateRadialGradient(x0, y0, r0, x1, y1, r1, colorStops)
Parameter
Type
Description
DrawImage(image, x, y)
Parameter
Type
Description
DrawImage(image, location)
Parameter
Type
Description
DrawImage(image, x, y, width, height)
Parameter
Type
Description
DrawImage(image, rect)
Parameter
Type
Description
DrawImage(image, clipX, clipY, clipWidth, clipHeight, x, y, width, height)
Parameter
Type
Description
DrawImage(image, clipRect, imageRect)
Parameter
Type
Description
DrawImage(imageSource, x, y)
Parameter
Type
Description
DrawImage(imageSource, location)
Parameter
Type
Description
DrawImage(imageSource, x, y, width, height)
Parameter
Type
Description
DrawImage(imageSource, rect)
Parameter
Type
Description
DrawImage(imageSource, clipX, clipY, clipWidth, clipHeight, x, y, width, height)
Parameter
Type
Description
DrawImage(imageSource, clipRect, imageRect)
Parameter
Type
Description
Fill()
FillRect(rect)
Parameter
Type
Description
FillRect(x, y, width, height)
Parameter
Type
Description
FillText(text, x, y)
Parameter
Type
Description
FillText(text, location)
Parameter
Type
Description
GetLineDash()
LineTo(x, y)
Parameter
Type
Description
LineTo(location)
Parameter
Type
Description
MoveTo(x, y)
Parameter
Type
Description
MoveTo(location)
Parameter
Type
Description
OnCreateControl()
OnRedraw(e)
Parameter
Type
Description
OnWebRender(config)
Parameter
Type
Description
QuadraticCurveTo(cpx, cpy, x, y)
Parameter
Type
Description
Rect(rect)
Parameter
Type
Description
Rect(x, y, width, height)
Parameter
Type
Description
Restore()
Rotate(degrees)
Parameter
Type
Description
Save()
Scale(scaleWidth, scaleHeight)
Parameter
Type
Description
Scale(scale)
Parameter
Type
Description
SetLineDash(segments)
Parameter
Type
Description
SetTransform(scaleWidth, skewHoriz, skewVert, scaleHeight, x, y)
Parameter
Type
Description
Stroke()
StrokeRect(rect)
Parameter
Type
Description
StrokeRect(x, y, width, height)
Parameter
Type
Description
StrokeText(text, x, y)
Parameter
Type
Description
StrokeText(text, location)
Parameter
Type
Description
Transform(scaleWidth, skewHoriz, skewVert, scaleHeight, x, y)
Parameter
Type
Description
Translate(x, y)
Parameter
Type
Description
Translate(location)
Parameter
Type
Description
Events
Redraw
Implements
Name
Description
Last updated
Was this helpful?

