예제 #1
0
 public static void EndPath(this Canvas2DContext context)
 {
     context.PushAction(CanvasContextAction.Call("endPath"));
 }
예제 #2
0
 public static void SetFont(this Canvas2DContext context,
                            string font)
 {
     context.PushAction(CanvasContextAction.Assign("font", font));
 }
예제 #3
0
 public static void LineTo(this Canvas2DContext context,
                           double x, double y)
 {
     context.PushAction(CanvasContextAction.Call("lineTo", x, y));
 }
예제 #4
0
 public static void SetTextAlign(this Canvas2DContext context,
                                 string align)
 {
     context.PushAction(CanvasContextAction.Assign("textAlign", align));
 }
예제 #5
0
 public static void SetTextBaseline(this Canvas2DContext context,
                                    string baseline)
 {
     context.PushAction(CanvasContextAction.Assign("textBaseline", baseline));
 }
예제 #6
0
 public static void FillRect(this Canvas2DContext context,
                             double x, double y, double width, double height)
 {
     context.PushAction(CanvasContextAction.Call("fillRect", x, y, width, height));
 }
예제 #7
0
 public static void StrokeText(this Canvas2DContext context,
                               string text, double x, double y)
 {
     context.PushAction(CanvasContextAction.Call("strokeText", text, x, y));
 }
예제 #8
0
 /// <summary>
 /// Sets the type of compositing operation to apply when drawing new shapes.
 /// https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Compositing
 /// </summary>
 public static void SetGlobalCompositeOperation(this Canvas2DContext context,
                                                string operation)
 {
     context.PushAction(CanvasContextAction.Assign("globalCompositeOperation", operation));
 }
 public static void SetFillStyle(this Canvas2DContext context,
                                 string style)
 {
     context.PushAction(CanvasContextAction.Assign("fillStyle", style));
 }
 public static void Restore(this Canvas2DContext context)
 {
     context.PushAction(CanvasContextAction.Call("restore"));
 }
 public static void Save(this Canvas2DContext context)
 {
     context.PushAction(CanvasContextAction.Call("save"));
 }
 public static void Fill(this Canvas2DContext context)
 {
     context.PushAction(CanvasContextAction.Call("fill"));
 }