I'm curious about people's views about the general design of the FMX 2D graphics API. This is from the point of view of it being a modernised and cross platform re-imagining of the VCL's 2D graphics capabilities (which don't extend very far, but do what they promise to do without fuss). To be clear (or clear-ish!), I'm not asking about FMX as such, just this part.

I'm curious about people's views about the general design of the FMX 2D graphics API. This is from the point of view of it being a modernised and cross platform re-imagining of the VCL's 2D graphics capabilities (which don't extend very far, but do what they promise to do without fuss). To be clear (or clear-ish!), I'm not asking about FMX as such, just this part.

Digging a bit into the current version (I last worked with FMX in anger in XE3), my first through was 'hmm, this is a lot of code'. However, my second thoughts were much more positive - on Windows, the 2D graphics implementation is looking like a pretty direct, yet high-ish level wrapping of Direct2D, so quite VCL-like in spirit (which was/is a pretty direct, yet high-ish level wrapping of the Windows API - the GDI in the 2D graphics case). On the the hand, maybe it suffers from the usual FMX ills for other things... so what do people 'in the trenches' think about it...?

Comments

  1. A. Bouchez Sure... but where I'm coming from is like this. Say you're using a VCL-like framework, and want to incorporate some PowerPoint-level graphics (or PowerPoint-level graphic functionality) in your application. Is FMX 2D good enough for that?

    Let's go back in time: it's 1995, and a similar question is posed about the VCL v1 and the PowerPoint of that era. Is the original Graphics.pas good enough? I'd say yes. Ditto going forward a couple of years - PowerPoint 97's graphics have improved on PowerPoint 95, but so has Graphics.pas in the past two years (DIBs and ScanLine to TBitmap).

    Now switch to 2007. Graphics.pas has acquired some 32 bit colour support on the way, and there's JPEG and PNG support in related units. However, Powerpoint 2007-level graphics still require going beyond it - maybe just to GDI+, but that's still a completely different API.

    (PS - from my graphics-novice hat on, it doesn't seem at all obvious what FMX/Windows does doing wrong in its role as a Direct2D wrapper. Sure it regularly recreates resources... but that's how Direct2D works.)

    ReplyDelete
  2. Chris Rolliston​ no, VCL graphics were never really up to scratch, even before the first video accelerator became commonplace, there was a flurry of alternatives you had to go for if you wanted more than simple, non-anti-aliased, no-transparency, slow drawing with flickering.
    JPG support in VCL was fine, but PNG was 3rd party that became abandonware when incorporated in VCL. And then you have a whole lot of other formats that were not supported (or very poorly). Even to this day PNG support is lacking (paletted alpha comes to mind)

    ReplyDelete

Post a Comment