Web Design: graphics: Outlined Text with jsDraw2DX

The tutor continues about the graphics library jsDraw2DX: how to use it for outlined text.



To accomplish the effect above one might proceed something like this:

<div id=”grph” style=”position:relative; height:330px;width:410px; background-color:navy; border-style:solid;border-color:brown; border-width:2px”></div>
<script src=”dir_where_jsDraw2DX_resides/jsDraw2DX.js”></script>
<script>
var gr0=new jxGraphics(document.getElementById(“grph”));

var pen0=new jxPen(new jxColor(‘white’),’1px’);
var brush0=new jxBrush(new jxColor(‘brown’));
var font0=new jxFont(‘verdana’);
font0.size=”50px”;

var text0=new jxText(new jxPoint(75,88), “jsDraw2DX”, font0, pen0,brush0,12);

var text1=new jxText(new jxPoint(35,188), “Outlined Text”, font0, pen0,brush0,12);
text0.draw(gr0);
text1.draw(gr0);
</script>

To use jsDraw2DX, it needs to reside one your system. From the jsDraw2DX website it can be downloaded.

HTH:)

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Tagged with:

Leave a Reply