09-17-2015, 02:33 AM
(09-10-2015, 03:45 AM)Manikandan Wrote:(09-09-2015, 10:39 PM)garrett Wrote: Drawing can only be performed in a drawing callback. Register one with CustomWidget:etDrawCallback()
Then you can use the logic you wanted before (but you have to set the color first before drawing a shape)
this->docCustomColorView.setDrawColor(hdi::core::Color::yellow());
this->docCustomColorView.drawRect(rectFrame, true);
Thanks for your suggestion. Its working now.
Quick check. For this similar function I would like to create my own RGB color. Sample: hdi::core::Color(1,1,0.9,1). But it indicates that the RGB color should be in between range of "[0.0, 1.0] ". How does it work?? RGB value for light yellow would be (R:255, G:255, B:153) and I'm unable to figure how to place them in between the mentioned range given in the document.
Please guide me on this. Thank you.