I change the scaling to print a geometrical shape. Next to it I print its name. I use the scaling to make the geometrical shape smaller or bigger. I want the text follow the geometrical shape. Therefore When I scale or translate the shape, I want the text to be scale or translate to. I just have to give the same coordinate than the shape to plot the name next to the shape.
I am using these functions in draw() to do that
p.scale(xscalingCoeff, yscalingCoeff);
p.translate(xcenter, ycenter);
But I want the text size to be always the same.
U I know that I can use push and pop but the code that create the shape in called inside stack of a several function. I would like to avoid passing the inverted coefficient to several functions.
but yes this code would work:
p.push();
p.scale(invertedxcoef, invertedycoef);
p.textSize(textsize);
p.pop()
p.text(txt, x, y);
Instead I would like
p.textSizeInPixel(textsize)
p.text(txt,x,y)