123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- Namespace std.graphics
- #rem monkeydoc Pixel formats supported by pixmaps.
- | PixelFormat | Description
- |:--------------|:-----------
- | `Unknown` | Unknown pixel format.
- | `I8` | 8 bit intensity.
- | `A8` | 8 bit alpha.
- | `IA8` | 8 bit intensity, alpha.
- | `RGB8` | 8 bit red, green, blue.
- | `RGBA8` | 8 bit red, green, blue, alpha.
- Note: The `IA16`, `RGB24` and `RGBA32` formats have been deprecated in favor of `IA8`, `RGB8` and `RGBA8`.
- #end
- Enum PixelFormat
- Unknown
-
- I8
- A8
- IA8
- RGB8
- RGBA8
- RGBA16F
- RGBA32F
-
- Depth16
- Depth24
- Depth32
- 'deprecated
- IA16=IA8
- RGB24=RGB8
- RGBA32=RGBA8
- End
- #rem monkeydoc Gets the number of bytes per pixel for a particular pixel format.
- #end
- Function PixelFormatDepth:Int( format:PixelFormat )
- Select format
- Case PixelFormat.I8 Return 1
- Case PixelFormat.A8 Return 1
- Case PixelFormat.IA8 Return 2
- Case PixelFormat.RGB8 Return 3
- Case PixelFormat.RGBA8 Return 4
- Case PixelFormat.RGBA16F Return 8
- Case PixelFormat.RGBA32F Return 16
- Case PixelFormat.Depth16 Return 2
- Case PixelFormat.Depth24 Return 4
- Case PixelFormat.Depth32 Return 4
-
- 'deprecated
- Case PixelFormat.IA16 Return 2
- Case PixelFormat.RGB24 Return 3
- Case PixelFormat.RGBA32 Return 4
-
- End
-
- Return PixelFormat.Unknown
- End
|