Core Graphics Tutorial: Curves and Layers | raywenderlich.com

In this tutorial, you will learn the Core Graphics drawing model and how it dictates the order that you draw your shapes.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/776399-core-graphics-tutorial-curves-and-layers

@rwenderlich Hi, I really love this article, and I just have a little question about the detail.

Why I often see the the use of rect.height in CGPoint.x and rect.width in CGPoint.y. like this:

  let mountainStart = CGPoint(x: rect.size.height / 2, y: 100)
  let mountainEnd = CGPoint(x: rect.size.height / 2, y: rect.size.width)

I find it quite hard to image and understand, does my understanding about rect height and width has any deviation?

@sanketfirodiya Can you please help with this when you get a chance? Thank you - much appreciated! :]

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!