DrawingBufferPixelFormat()

Syntax

Ergebnis = DrawingBufferPixelFormat()
Beschreibung
Gibt das Pixel-Format des aktuellen Ausgabekanals zurück. Das Ergebnis kann eine Kombination (mit bitweisem 'OR') der folgenden Werte sein:
  #PB_PixelFormat_8Bits       ; 1 Byte pro Pixel, mit Palette ("palettised")
  #PB_PixelFormat_15Bits      ; 2 Byte pro Pixel 
  #PB_PixelFormat_16Bits      ; 2 Byte pro Pixel
  #PB_PixelFormat_24Bits_RGB  ; 3 Byte pro Pixel (RRGGBB)
  #PB_PixelFormat_24Bits_BGR  ; 3 Byte pro Pixel (BBGGRR)
  #PB_PixelFormat_32Bits_RGB  ; 4 Byte pro Pixel (RRGGBB)
  #PB_PixelFormat_32Bits_BGR  ; 4 Byte pro Pixel (BBGGRR)
  #PB_PixelFormat_ReversedY   ; Die Y-Koordinate der Ausgabe ist umgekehrt im Speicher (die untere Reihe ist zuerst gespeichert).

Wichtig: DrawingBuffer() muss vor dem Verwenden dieses Befehls aufgerufen werden.

Die folgenden Beispiele zeigen, wie das Ergebnis behandelt wird:
  If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB|#PB_PixelFormat_ReversedY
    ; 32bit RGB mit umgekehrter Y-Koordinate
  EndIf
  
  If DrawingBufferPixelFormat() = #PB_PixelFormat_32Bits_RGB
    ; 32bit RGB ohne umgekehrter Y-Koordinate
  EndIf
  
  If DrawingBufferPixelFormat() & #PB_PixelFormat_32Bits_RGB
    ; 32bit RGB, mit oder ohne umgekehrter Y-Koordinate
  EndIf
  

Unterstützte OS

Alle

<- DrawingBufferPitch() - 2DDrawing Inhaltsverzeichnis - DrawingFont() ->