Menu

#1401 Implement Surface GDIPlus for Windows

Won't_Implement
closed
nobody
5
2021-06-24
2021-04-07
YX Hao
No

The APIs are being reconstructed with ColourAlpha based ...

Pure GDI is very old and low efficiency on color alpha blending. It's far behind modern rendering technologies. GDI+ would be better (>= XP/2000). Ref:
https://en.wikipedia.org/wiki/Graphics_Device_Interface#Version_history
https://docs.microsoft.com/en-us/windows/win32/api/gdipluscolor/nf-gdipluscolor-color-color(argb)

Implementing class SurfaceGDIPlus : public Surface {} or class SurfaceGDIX : public Surface {} would be a good choice.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2021-04-07

    Direct2D+DirectWrite is the current Win32 drawing API that should be used in almost all cases. GDI+ is slower and has fewer capabilities than Direct2D+DirectWrite.

    In the early period of GDI+ there were license issues which meant it wasn't included in MinGW so would have been a complex dependency.

    GDI+ could produce better output on very old versions of Windows but is it really worth the effort?

    I think it would be better to work on newer Windows APIs, such as updating Direct2D to 1.1, 1.2, or 1.3 although this should be an option so it would still work on earlier versions of Windows.
    https://katyscode.wordpress.com/2013/01/23/migrating-existing-direct2d-applications-to-use-direct2d-1-1-functionality-in-windows-7/
    WinUI 3 may also be worth looking at although that appears to be more an application level thing.
    https://docs.microsoft.com/en-us/windows/apps/winui/

     
  • YX Hao

    YX Hao - 2021-04-07

    I totally agree with you that some rendering technologies are really out dated, and new ones should be in priority.
    It all depends on the minimum OS version that will be supported.
    Take this ticket as a notice or description on this.
    Maybe someone who really needs it or has interests will read this and take action ...

    PS:
    Nowadays mingw-w64-headers seems support GDI+.

     
  • Neil Hodgson

    Neil Hodgson - 2021-04-09
    • Group: Initial --> Won't_Implement
     
  • Neil Hodgson

    Neil Hodgson - 2021-06-24
    • status: open --> closed
     

Log in to post a comment.