c++windowsgraphicsskia

How to use Skia on Windows or Linux


I have built Skia. What do I do now to get an SkCanvas and draw on it? This answer does not properly answer the question because
A: It uses API that doesn't exist anymore, like bitmap.lockPixels(),
B: It uses some unkown context and draws a this from it,
C: It doesn't actually create an SkCanvas?...
Ideally I would like an example that doesn't assume anything. A full C++ program that draws something on the screen using Skia.


Solution

  • Follow this detailed procedure (for Linux too!). If you have problems doing that, in the comments I have proposed solutions for problems I have encountered.