MyScript App Challenge

Canvas stroke color

im wanting to change the canvas stroke color using the myscriptjs example but it's not working.

context.strokeStyle = 'red'; //also tried hex like #85793
context.stroke();

please advise.


Could you please try this way?
context.strokeStyle = 'rgb(255, 0, 0)';
Best regards

Dear Tom,
Following the latest Hangout, we have checked how to change the ink color of the current GitHub MyScript JS version:
You will have to set the variable in the index.html file located in MyScriptJS-masterresourcessamplestextrest:

var renderingParameter = new MyScript.RenderingParameters();
renderingParameter.setColor('red');

var textRenderer = new MyScript.TextRenderer();
textRenderer.setParameters(renderingParameter);

Please let us know if it helps.
Best regards

this works.
thanks!

Thanks for your quick feedback, Tom!

Login or Signup to post a comment