Hi, this is a question I’ve had on my mind for quite a while, and I apologize in advance if someone already asked it, but is there any way to just ask processing what the current stroke weight is? Or the current fill color, or the current text size, or the current stroke color, or the current rectangle mode, or the current text alignment, etc.? Or are these just write-only values, which can only be changed with a function and can only be obtained by knowing what they are at the beginning, and then manually changing them every time they change?
If it’s the latter, may I know what these values are by default at the start of any program? Especially textSize, all I can figure out is that it’s somewhere between 11 and 13 at the start of a program.
If it’s only the text size you’re interested in, I can tell you that it’s 12. Says it right here in the source:
If you rather want to keep track of those values (fill, stroke, …) at runtime, I don’t think there’s an easy way to do that. Not without accessing code you’re not supposed to touch and are prevented from doing so.
You could create your own methods like fillCustom that just call fill under the hood and set a variable in the process, although that’s not an ideal solution either.
If that’s what you want I could go into more detail, but for now I just hope this helped you.
Hey, so, how do I get vertical text align? Like, if I say “textAlign(LEFT, TOP)”, then ask to “println(g.textAlign)”, it’ll print out “LEFT”. What would I ask that would cause it to print “TOP”?