Skip to content

cheersphilip/word-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

word-wrap

html5 canvas word wrap

This bit of code takes a string of text, calculates its length using current styling, evaluates the length against a property (i've used the radius of a circle, but the code just treats it as the width of a rectangle - there didn't seem any point writing anything more sophisticated than this at this point), splits the text into lines and then displays the text line by line.

Please feel free to adapt, improve (lots needed!) as you see fit.

Let me know how you get on :)

Cheersphilip.

About

html5 canvas word wrap

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors