Skip to content

canvas undefinedΒ #16

@pclokcer

Description

@pclokcer

where is this problem. I am using Vue

html
`<CanvasView col="0" row="0" width="100" height="300" @draw="draw" />`
JS:
`import {
  Canvas,
  Cap,
  createRect,
  createRectF,
  Paint,
  Style
} from "nativescript-canvas";
import { Color } from "@nativescript/core/color/color";`

`methods: {
    draw({ canvas }) {
      const paint = new Paint();
      paint.setColor(new Color("black"));
      paint.strokeWidth = 10;
      canvas.drawRect(createRect(0, 0, 200, 100), paint);
    }
  }`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions