MagicSetEditor2 icon indicating copy to clipboard operation
MagicSetEditor2 copied to clipboard

Cairo or Skia rendering backend

Open twanvl opened this issue 5 years ago • 1 comments

Currently MSE uses wxWidgets' wxDC for rendering, which on windows means the win32 API. This is very outdated, and should be replaced with something better. Cairo seems like a good candidate.

Pros:

  • Support for transparency everywhere
  • Anti-aliasing drawing functions (= nicer looking field borders), no more hacks for text rendering
  • Support for arbitrary rotation and scaling, and sub-pixel positioning
  • Effects like text outlines should be easy
  • Maybe we can support svg files, to make cards infinitely scalable.

Optional:

  • Use pango for text layout/rendering?

Issues:

  • How to handle native controls? Windows has functions to draw those to HDCs, which we wouldn't necessarily have anymore. See https://stackoverflow.com/questions/15493731/how-does-firefox-chrome-draw-the-scrollbar
  • Should we use cairo throughout MSE? That is, also for other controls like package list and graphs?
  • Cairo uses utf8 internally. Maybe MSE should do the same? That is mostly independent from this issue (see #135)

twanvl avatar May 26 '20 13:05 twanvl

Skia is probably better than Cairo, it is what google chrome uses internally.

twanvl avatar Jul 05 '21 22:07 twanvl