Error in Graphics Tutorial



There appears to be an error on this page:

Near the middle bottom of the page we find these lines:

Rectangle house (300, 120, 200, 170);
g.fillCheckerBoard (house, 30, 10, Colours::sandybrown, Colours::saddlebrown);

However, the API for fillCheckerBoard found here:

Lists fillCheckerBoard as taking a Rectangle <Float>, I can verify that my code would not run using Rectangle<Int>. So I’m not 100% if the bug is with the example or API, but there is a discrepancy.



fillCheckerBoard() requires that the Rectangle be a float. Try changing Rectangle house (300, 120, 200, 170); to Rectangle<float> house (300, 120, 200, 170);

edit: didn’t notice this was under the site feedback section


Yes, thank you.

While I appreciate the feed back, this is posted in the Site Feedback section and is meant to clarify to the dev team the discrepancy in API vs Tutorial.



Thanks for spotting that error. I’ll fix that right away.