Skip to content

No easy way to retrieve Raw pixel formats #94

@rongcuid

Description

@rongcuid

I use mostly high-level bindings everywhere in the program, and it is fine. Until I try to create a surface:

createRGBSurface :: (Functor m,MonadIO m)
                 => V2 CInt -- ^ The size of the surface
                 -> CInt -- ^ The bit-depth of the surface
                 -> V4 Word32 -- ^ The red, green, blue and alpha mask for the pixels
                 -> m Surface

I have no way to get the bit depth and mask information unless I either hard code them, or retrieve them from SDL.Raw.Types.PixelFormat. Reading the source code, I notice that there are two functions toNumber and fromNumber that converts the two. However, they are apparently not exported. Would it be a good idea to export them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions