2D Computer Graphics in modern c++ and standard library
2D Computer Graphics in modern c++ and standard library
About the Book
We have all been there when you just want to present som data in a nice and graphical way. You start by implementing a GUI library so that you can set up a canvas to draw on… but then what? Or you download and build a library that can handle reading and writing PNG images, as you need lossless images. Or you do the same just to find out a files entropy. Or you’re coding on a game and want to test the look of animation sprites in a parallax setting. What ever the reason is… it’s too complicated to do and takes more time than you would consider doing. So no presentation, no collaboration, and no investigation using graphics.
It should just be easy to create graphics in standard C++. And this book is all about that. How do we draw a pixel, a line, or a circle? That is questions we going to answer.
Table of Contents
- 2D Drawing Basics
- History
- Standard Library
- Compile Code Examples
- Prerequisite
- Draw Pixels with Standard Library
- Texture Generation with Standard Library
- Time to draw some lines with Standard Library
- There are no straight curves, only curved lines
- Rectangles with Standard Library
- Circles with Standard Library
- Triangles with Standard Library
- Animation with Standard Library
- Drawing Charts and a Font
- Presentation, Collaboration, and Investigation
- Presentation
- Draw a bar chart
- Draw a pie chart
- Draw a donut chart
- Draw a table
- Draw a more advanced chart 1
- Draw a more advanced chart 2
- Collaboration
- Investigation
- PPM++ header-only library
- In the Rearview Mirror
- Appendix A: Source Code Listings
- 2D Drawing Basics
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
80% Royalties. Earn $16 on a $20 book.
We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $12 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them