alpha/opacity fix and add platform macros