Moved IsDirty method to Painter class