stlcours Posted January 5, 2013 Share Posted January 5, 2013 Can you add this function? Maybe it is not difficult for you. Thanks! Quote Link to comment Share on other sites More sharing options...
stone feng Posted January 7, 2013 Share Posted January 7, 2013 UniCanvas.BitmapCanvas.TextOut(...) Quote Link to comment Share on other sites More sharing options...
tappatappa Posted September 15, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bluecollar Posted December 16, 2018 Share Posted December 16, 2018 How can i change the text color with the fillText function ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 16, 2018 Share 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 Link to comment Share on other sites More sharing options...
Bluecollar Posted December 16, 2018 Share Posted December 16, 2018 Thanks :-) Quote Link to comment Share on other sites More sharing options...
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.