Code sections
Published in

Code sections

SDL graphics: coordinates on macOS

TL;DR: Y range is h–2×h, not 0–h… due to Cocoa!

Photo by krakenimages on Unsplash

A few days ago I just wanted to show something new (OK, very old, in fact) to my children: how C can be used to draw things on a screen.

So, I’ve tried to create a simple graphics program using C and SDL library. I’ve chosen SDL because it’s linked by default if we go within Expresso-C on macOS…

--

--

--

Miscellaneous programming stories

Recommended from Medium

How to Pick the Technology That Works Best for Your Next Project?

Azure Managed Application with AKS and deployment-time or cross-tenant role assignments to VM and…

Managing the project with subproject — Git submodule

AuthZ and AuthN with Kong + OpenID

Databricks Spark SQL: How to Exclude columns from your select statement?

How to present an “Update available” banner for a Progressive Web App (PWA)?

Create Multiple Pages Screens Using Python 3 Qt Designer

My Experience in LGMSOC’21

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sorin Dolha

Sorin Dolha

Software developer at DlhSoft • married • father of two • MacBook enthusiast • writing from Cluj

More from Medium

Luisa — The Low-Code UI framework

Real-Life Experience On JetBrains’ New IDE: Fleet

JetBrains Fleet logo.

SvelTable

Strapi V4 — Thoughts & impressions.