Skip to content

Swatinem/style-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

style-canvas

Use CSS to style canvas paths

Installation

$ component install Swatinem/style-canvas

Example

.stroke {
  stroke: #ccc;
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
ctx.beginPath();
[]
styleCanvas(ctx, '.stroke');
ctx.stroke();

License

GPLv3

About

Component to apply CSS styles to a canvas

Resources

Stars

Watchers

Forks

Packages

No packages published