Skip to content

Consolidate background color in rendering classes

Before this commit, there were three separate classes (Mapper, Canvas, and View) that were all managing their own version of the background color. As you can imagine, this could easily become out of sync, and in fact if the user code did not specify the same background at least twice, it would not work.

Fix this by consolidating the background color management to the Canvas. This is the class most responsible for maintaining the background. All other classes get or set the background from the Canvas.

That said, I also removed setting the background color from the constructor in the Canvas. This background color is overridden by the View anyway, so having it there was only confusing.

Merge request reports