GithubHelp home page GithubHelp logo

Comments (3)

DjDeveloperr avatar DjDeveloperr commented on May 17, 2024 2

I've been using node-canvas until I moved on to Deno, there isn't much to change except the createCanvas from what I know. Maybe I'm not getting it right, can you explain what you have to rewrite exactly?

Won't be much hard to export Canvas.MakeCanvas as a named export createCanvas though 😁

For example, the "Quick Example" mentioned in the README of node-canvas,

// node-canvas
const { createCanvas, loadImage } = require('canvas')
const canvas = createCanvas(200, 200)
// deno-canvas
import Canvas, { loadImage } from 'deno-canvas-url'
const canvas = Canvas.MakeCanvas(200, 200)

const ctx = canvas.getContext('2d')

// ... rest code

Edit: Saw your message in Discord, yeah its missing some Canvas methods, will try adding those once I'm free (in 15-18 hours) πŸ‘
Edit 2: Added Canvas#toBuffer, Canvas#registerFont, and mod.ts now exports createCanvas which is <default export>.MakeCanvas.

from deno-canvas.

DjDeveloperr avatar DjDeveloperr commented on May 17, 2024

@snowflake107 is there anything else to add πŸ‘€

from deno-canvas.

twlite avatar twlite commented on May 17, 2024

@DjDeveloperr how's loadFont

from deno-canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.