title: Draw image in mac os
body: <p>I need to draw an image in mac os project. In iOS I can do this using <code>UIGraphicsBeginImageContext</code>.<br/>
  Please give me an example, how to draw image in mac os or give an analog of <code>UIGraphicsBeginImageContext</code> api.</p>