Brooooooklyn / canvas

High performance skia binding to Node.js. Zero system dependencies and pure npm packages without any postinstall scripts nor node-gyp.

Home Page:https://vercel.skia.rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Roadmap

Brooooooklyn opened this issue · comments

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

commented

seems missing 'measureFont' ?

seems missing "filter"

@ap0sentada filter was implemented

commented

can you please implement a deregisterFont method?

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)")

missing

<context>.letterSpacing: number
commented

Missing

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