You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Is theming always global?

    Well, Graphics state is always global - you should always get in the habit of calling g.reset() before you start rendering in a function where you're not 100% sure of the graphics state it's called from.

    If you just do g.drawString then font, alignment, color, etc could be set to anything.

    The current solution is just a sensible compromise of complexity and memory usage... I guess potentially we could have a way to 'clone' a graphics instance into a variable where state for that var is kept separately - but I think the end result is it'd end up getting used pretty lazily and we'd end up storing loads of different graphics states for things that really didn't need it.


Avatar for Gordon @Gordon started