Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap #113

Open
Brooooooklyn opened this issue Dec 26, 2020 · 10 comments
Open

Roadmap #113

Brooooooklyn opened this issue Dec 26, 2020 · 10 comments

Comments

@Brooooooklyn
Copy link
Owner

Brooooooklyn commented Dec 26, 2020

0.1. The first usable version

Canvas

  • createCanvas
  • getContext
  • png
  • jpeg
  • svg
  • pdf
  • avif
  • gif
  • webp
  • data
  • toDataURL

CanvasRenderingContext2D

Property

  • canvas
  • fillStyle
  • filter
  • font
  • globalAlpha
  • globalCompositeOperation
  • imageSmoothingEnabled
  • imageSmoothingQuality
  • lineCap
  • lineDashOffset
  • lineJoin
  • lineWidth
  • miterLimit
  • shadowBlur
  • shadowColor
  • shadowOffsetX
  • shadowOffsetY
  • strokeStyle
  • textAlign
  • textBaseline
  • letterSpacing
  • wordSpacing
  • fontStretch
  • fontKerning
  • fontVariantCaps

Methods

  • arc
  • arcTo
  • beginPath
  • bezierCurveTo
  • clearRect
  • clip
  • closePath
  • createImageData
  • createLinearGradient
  • createPattern
  • createRadialGradient
  • drawImage
  • ellipse
  • fill
  • fillRect
  • fillText
  • getContextAttributes
  • getImageData
  • getLineDash
  • getTransform
  • isPointInPath
  • isPointInStroke
  • lineTo
  • measureText
  • moveTo
  • putImageData
  • quadraticCurveTo
  • rect
  • resetTransform
  • restore
  • rotate
  • save
  • scale
  • setLineDash
  • setTransform
  • stroke
  • strokeRect
  • strokeText
  • transform
  • translate

Path2D

  • Constructor
  • addPath
  • closePath
  • moveTo
  • lineTo
  • bezierCurveTo
  • quadraticCurveTo
  • arc
  • arcTo
  • ellipse
  • rect

Text rendering

  • maxWidth
  • font weight
  • font variant
  • font style

ImageData

Constructor

  • width/height
  • Uint8ClampedArray/width
  • Uint8ClampedArray/width/height

Property

  • data
  • width
  • height

Image

Property

  • width
  • height
  • alt
  • complete
  • crossOrigin
  • currentSrc
  • decoding
  • loading
  • naturalWidth
  • naturalHeight

Methods

  • decode

0.2. Testing, code cleanup and performance

0.3. API stable, documents

1.0

@jo32
Copy link

jo32 commented Nov 21, 2022

seems missing 'measureFont' ?

@ap0sentada
Copy link

seems missing "filter"

@Brooooooklyn
Copy link
Owner Author

@ap0sentada filter was implemented

@MegaTeam89
Copy link

can you please implement a deregisterFont method?

@ap0sentada
Copy link

ap0sentada commented Jul 22, 2023

the .fillStyle = "color" property doesn't supports rgba, like canvas does. you need to change the opacity via globalAlpha, but you should be able tu change it with rgba (with <context>.fillStyle = "rgba(0,0,0,0.4)")

@ap0sentada
Copy link

ap0sentada commented Jul 22, 2023

missing

<context>.letterSpacing: number

@maxtull
Copy link

maxtull commented Jan 6, 2024

Missing

CanvasRenderingContext2D.fontStretch: 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'normal' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded'

@sefaistee07
Copy link

Help ne! When I install Termux on Android, I get the following error: /storage/emulated/0/morsel_bot/node_modules/@napi-rs/canvas/js-binding.js:216
throw loadError
^

Error: dlopen failed: library "/storage/emulated/0/morsel_bot/node_modules/@napi-rs/canvas-android-arm64/skia.android-arm64.node" needed or dlopened by "/data/data/com.termux/files/usr/bin/node" is not accessible for the namespace "(default)"
at Module._extensions..node (node:internal/modules/cjs/loader:1454:18)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Module.require (node:internal/modules/cjs/loader:1233:19)
at require (node:internal/modules/helpers:179:18)
at Object. (/storage/emulated/0/morsel_bot/node_modules/@napi-rs/canvas/js-binding.js:33:29)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12) {
code: 'ERR_DLOPEN_FAILED'
}

Node.js v20.15.1
/sdcard/morsel_bot $

@xeoshow
Copy link

xeoshow commented Sep 5, 2024

Seems the most features are implemented, is there any ETA for the first release version? Thanks.

@cmahnke
Copy link

cmahnke commented Sep 26, 2024

Since this lib is advertised as a drop in replacement for node-canvas the roadmap should include for version 0.3 a documentation to reliably use this instead of node-canvas as a transitive dependency. Certainly using overrides - not sure how reliable those work in npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants