Function PixelFormat.hasAlpha

Wraps SDL_ISPIXELFORMAT_ALPHA which checks whether the dsdl2.PixelFormat is capable of storing alpha value

bool hasAlpha() @property @trusted const;

Returns

true if it can have an alpha channel, otherwise false