Hello
I'm trying to write a string with random color for each letter
is anyone know how to do this with jsui?
here's my code first test,the problem is that between each letter the "pencil" go to up/left corner... i could write "move_to(x,y)" but i don't know the width of the precedent letter...
*************************************************************
mgraphics.init();
mgraphics.relative_coords = 1;
//mgraphics.autofill = 0;
var stringA = new Array();
var strCl = new String ("boby");
mgraphics.redraw();
function bang(){
mgraphics.redraw();
}
function paint(){
mgraphics.move_to(-0.8, 0.5);
mgraphics.set_font_size(60);
for (e = 0; e < strCl.length; e++) {
with(mgraphics){
set_source_rgb(Math.random(),Math.random(),Math.random());
text_path(strCl.charAt(e));
fill();
}
}
}
thanks