Code-Package-Processing-1.5.1 icon indicating copy to clipboard operation
Code-Package-Processing-1.5.1 copied to clipboard

Avoid negative text size in P.3.0

Open eric-brechemier opened this issue 10 years ago • 0 comments

I wrapped the difference in a call to abs() to avoid ending up with a negative text size when the mouse is in the left part of the screen.

The behavior of textSize() with negative values in unspecified; starting the sketch with the mouse in the left part of the canvas, I observed first a downward letter A, scaled according to the cursor horizontal position, then flipped in upright position when the mouse crosses the middle of the canvas; from this point, whenever the cursor is in the left part of the canvas, the letter's height is fixed to a small value, which no longer changes according to horizontal position.

eric-brechemier avatar May 05 '14 21:05 eric-brechemier