Skip to content

natchkebiailia/CanvasMultiLineText

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to use:

drawMultiLineText(context,textContent,fromX,fromY,width,height,font,drawBorder)

context -> canvas 2d Context
textContent -> plaint text to write on canvas
fromX -> starting X point
fromxY -> starging Y point
width -> width of textBox
height -> height of textBox
font -> text font style (default: 10px sans-serif )
drawBorder -> textBox border (true or false, default: false)
Examples of usage:

drawMultiLineText(ctx,plainText,700,0,100,380);

drawMultiLineText(ctx,plainText,280,30,350,300,"20px georgia");

drawMultiLineText(ctx,plainText,20,20,250,350,"15px georgia",false);

drawMultiLineText(ctx,plainText,20,400,700,200,"30px georgia",true);
Result: ======== ![ScreenShot](https://raw.githubusercontent.com/natchkebiailia/CanvasMultiLineText/master/screenShot.PNG)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published