stlcours Posted January 5, 2013 Posted January 5, 2013 Can you add this function? Maybe it is not difficult for you. Thanks! Quote
tappatappa Posted September 15, 2017 Posted September 15, 2017 //Delphi UniSession.AddJS(unicanvas.JSName + '._cc_.fillText("'+text+'",'+left+','+top+');'); //C++ UnicodeString s = UnicodeString().sprintf(L"%s._cc_.fillText('%s',%d,%d);", unicanvas->JSName, text, left, top); UniSession()->AddJS(s); Of course, is better if you do some escaping of the text first, otherwise you will be open to injection Quote
Bluecollar Posted December 16, 2018 Posted December 16, 2018 How can i change the text color with the fillText function ? Quote
Sherzod Posted December 16, 2018 Posted December 16, 2018 2 hours ago, Bluecollar said: How can i change the text color with the fillText function ? Hello, One possible solution: Uses ... , UniGUIJSUtils; procedure TMainForm.UniButton14Click(Sender: TObject); begin UniCanvas1.JSInterface.JSCode('var me='#1'._cc_; if (me) {me.fillStyle="'+ uniColor2Web(clGreen, 1) +'"; me.font="20px sans-serif"; me.fillText("test", 100, 100)};'); end; 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.