Pages

Sunday, 31 May 2020

Chapter 14 // Exercise 5 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2017 and the graphics files found here:
https://github.com/l-paz91/principles-practice/tree/master/Graphics%20Files

Chapter 14 // Exercise 5

Define a Striped_Rectangle where instead of fill, the rectangle is "filled" by drawing one-pixel-wide horizontal lines across the inside of the rectangle (say, draw every second like that). You may have to play with the width of the lines and the line spacing to get a pattern you like.

Github: https://github.com/l-paz91/principles-practice/tree/master/Chapter%2014/Exercise%205


He kind of contradicts himself here. Does he want me to fill it with one pixel wide lines or whatever width I'd like? I decided to go with whatever width you'd like.


Chapter 14 // Exercise 5 - Principles & Practice Using C++

This also made me realise a much easier and cheaper way to do colour gradients as a fill:


No comments:

Post a Comment