smooth / noSmooth - current state?

Hi, does it exist a way to know If line drawinf is currently set to smooth or noSmooth, like for stroke, strokeWidth, fill ecc. ?

I think you would have to keep track of it. How about:

local isSmooth = false
local oldsmooth = smooth
smooth = function ()
    isSmooth = true
local oldNoSmooth = noSmooth
noSmooth = function ()
    isSmooth = false
smoothing = function ()
    return isSmooth

Thanks @mpilgrem, what I meant was a predefined way, a flag or a function provided by codea, but that’s sure a good way to track it.

Thinking about it further, you would also have to overwrite pushStyle() and popStyle() to implement an additional stack to keep track of isSmooth values and overwrite resetStyle() to reset isSmooth accordingly.

Just added this as an issue as I’d quite like to be able to do this: