Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

puttext with black background

I want to write value on picture using puttext with black background. Code:

rectangle(frame, Rect(
     Point(50,50) + Point(0,-height), 
     Point(50,50) + Point(width,0)), 
     Scalar(0,0,0),-1);
putText(frame, Tostr(value), Point(50,50),1,1,Scalar(255,255,255),2);

But change of capacity value leads change of required width. How this width is determined, or did I miss some params of putText, which resolve my issue?

puttext with black background

I want to write value on picture using puttext with black background. Code:

rectangle(frame, Rect(
     Point(50,50) + Point(0,-height), 
     Point(50,50) + Point(width,0)), 
     Scalar(0,0,0),-1);
putText(frame, Tostr(value), Point(50,50),1,1,Scalar(255,255,255),2);

But change of capacity value leads change of required width. How this width is determined, or did I miss some params of putText, which resolve my issue?