DrawingBufferPixelFormat()
语法
Result = DrawingBufferPixelFormat()概要
Returns the pixel format of the current output.
参数
无.
返回值
The result can be a combination (with bitwise or) of the following flags:#PB_PixelFormat_8Bits : 1 byte per pixel, palletised #PB_PixelFormat_15Bits : 2 bytes per pixel #PB_PixelFormat_16Bits : 2 bytes per pixel #PB_PixelFormat_24Bits_RGB : 3 bytes per pixel (RRGGBB) #PB_PixelFormat_24Bits_BGR : 3 bytes per pixel (BBGGRR) #PB_PixelFormat_32Bits_RGB : 4 bytes per pixel (RRGGBB) #PB_PixelFormat_32Bits_BGR : 4 bytes per pixel (BBGGRR) #PB_PixelFormat_ReversedY : The Y-Coordinate of the output is reversed in memory (the bottom row is stored first).
Remarks
DrawingBuffer() must be called before using this function.
示例
The following examples show how to handle the result:If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB | #PB_PixelFormat_ReversedY ; 32-bit RGB with reversed Y coordinate EndIf If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB ; 32-bit RGB without reversed Y coordinate EndIf If DrawingBufferPixelFormat() & #PB_PixelFormat_32Bits_RGB ; 32-bit RGB, with or without reversed Y coordinate EndIf
参阅
StartDrawing(), DrawingBufferPitch()
已支持操作系统
所有