Does the generated code have to contain co many variable declarations? Couldn't there just be one Matrix/Path/Paint being reset to new values every time a change is necessary? E.g. the Matrix class has setValues and reset methods which allow Matrix modifications. Couldn't the generator just do the necessary multiplications and then just print out the result instead of printing the multiplications? Perhaps the example will be better with the Paint class. Couldn't there just be a couple of them (for text, strokes, fillings, etc.) which would be modified every time a new color was needed (with the setColor method)? That's what I was doing in my generator and it worked like a charm.
Does the generated code have to contain co many variable declarations? Couldn't there just be one Matrix/Path/Paint being reset to new values every time a change is necessary? E.g. the Matrix class has setValues and reset methods which allow Matrix modifications. Couldn't the generator just do the necessary multiplications and then just print out the result instead of printing the multiplications? Perhaps the example will be better with the Paint class. Couldn't there just be a couple of them (for text, strokes, fillings, etc.) which would be modified every time a new color was needed (with the setColor method)? That's what I was doing in my generator and it worked like a charm.