Draw Stroke Text in HTML : In this article i will show you how we can draw Stroke Text in HTML canvas. To draw Stroke Text in web page we will use Canvas API, we will draw the Stroke Text on canvas using the strokeText() method. Following is the simple example to draw Stroke Text on canvas:
Draw_strokeText.html
<!DOCTYPE html>
<html>
<body>
<canvas id="rectCanvas" width="200" height="100" style="border:1px solid #d3d3d3;"></canvas>
<script type="text/javascript">
var c = document.getElementById("rectCanvas");
var ctx = c.getContext("2d");
ctx.font = "35px Arial";
ctx.strokeText("Hello This is TEXT",20,50);
</script>
</body>
</html>
0 Comment(s)