Posting a reply to my own question here in case others encounter the same... While I'm not certain about the underlying design or when a non-precomposed RGBA setting would be possible or valid for a bitmap CGContext, that configuration turned out to not be needed.
I'm now using this code to generate my CGContext - it's sRGB color space, and the alpha value is set to premultiplied. I was concerned this would mean I would somehow need to do some premultiplied calculation for the use of semi-opaque colors in my drawing code, but this turns out not to be the case - I can obtain an image with a transparent background, and also set partial alpha values in colors set for fill or stroke while drawing, and everything works properly.
if let colorspace = CGColorSpace(name: CGColorSpace.sRGB) {
if let cgc = CGContext(data: nil,
width: Int(pixelWidth),
height: Int(pixelHeight),
bitsPerComponent: 16,
bytesPerRow: 0,
space: colorspace,
bitmapInfo: CGImageAlphaInfo.premultipliedLast.rawValue |
CGBitmapInfo.byteOrder16Little.rawValue |
CGBitmapInfo.floatComponents.rawValue) {
...
So my answer in a nutshell is, if you want to use a bitmap CGContext for use in a Mac app with RGB color space that includes transparency, you can just use sRGB color space and premultiplied alpha values for the bitmapInfo parameter.