• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Eingebettete Systemsoftware
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2024/25
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Aufgabe 6: Synchronisation
                    • Aufgabe 7: Anwendung
                      • Assembler Crashkurs
                        • C++ Crashkurs
                          • Entwicklungsumgebung
                            • FAQ
                              • Ruhmeshalle
                              • Evaluation

                              Aufgabe 7: Anwendung

                              Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
                              AbstractGraphicsPrinter Class Referenceabstract

                              Abstraction of basic graphics printing functions. More...

                              #include <graphics/printer.h>

                              + Inheritance diagram for AbstractGraphicsPrinter:
                              [legend]

                              Public Member Functions

                              virtual void init (unsigned width, unsigned height, unsigned pitch)=0
                               Initialize printer with actual screen dimensions. More...
                               
                              virtual void buffer (void *lfb)=0
                               Set the video memory address. More...
                               
                              virtual void clear ()=0
                               Clear all pixel of the current back buffer (set full screen to black)
                               
                              virtual bool valid (const Point &p) const =0
                               Check if a Point can be displayed at the current resolution. More...
                               
                              virtual unsigned height () const =0
                               Number of vertical pixels in current resolution. More...
                               
                              virtual unsigned width () const =0
                               Number of horizontal pixels in current resolution. More...
                               
                              virtual void pixel (const Point &p, const Color &color)=0
                               Draw a pixel. More...
                               
                              virtual void pixel (const Point &p, const ColorAlpha &color)=0
                               Draw a pixel. More...
                               
                              virtual void line (const Point &start, const Point &end, const Color &color)=0
                               Draw a line. More...
                               
                              virtual void line (const Point &start, const Point &end, const ColorAlpha &color)=0
                               Draw a line. More...
                               
                              virtual void rectangle (const Point &start, const Point &end, const Color &color, bool filled=true)=0
                               Draw a rectangle on the current back buffer. More...
                               
                              virtual void rectangle (const Point &start, const Point &end, const ColorAlpha &color, bool filled=true)=0
                               Draw a rectangle on the current back buffer. More...
                               
                              virtual void font (const Font &new_font)=0
                               Change the current font for text output in video mode. More...
                               
                              virtual void text (const Point &p, const char *string, unsigned len, const Color &color, const Font *font=nullptr)=0
                               Print text (without automatic word wrap). More...
                               
                              virtual void text (const Point &p, const char *string, unsigned len, const ColorAlpha &color, const Font *font=nullptr)=0
                               Print text (without automatic word wrap). More...
                               
                              virtual void image (const Point &p, PNG &image, unsigned width=0, unsigned height=0, unsigned offset_x=0, unsigned offset_y=0)=0
                               Draw a PNG image (or detail) More...
                               
                              virtual void image (const Point &p, const GIMP &image, unsigned width=0, unsigned height=0, unsigned offset_x=0, unsigned offset_y=0)=0
                               Draw a GIMP image (or detail) More...
                               
                              virtual void image (const Point &p, const Color *image, unsigned width, unsigned height, unsigned offset_x=0, unsigned offset_y=0)=0
                               Draw a sprite. More...
                               
                              virtual void image (const Point &p, const ColorAlpha *image, unsigned width, unsigned height, unsigned offset_x=0, unsigned offset_y=0)=0
                               Draw a sprite with alpha blending (transparency). More...
                               

                              Static Public Member Functions

                              static AbstractGraphicsPrinter * getMode (uint8_t colordepth, uint8_t offset_red, uint8_t offset_green, uint8_t offset_blue, uint8_t bits_red, uint8_t bits_green, uint8_t bits_blue)
                               

                              Protected Member Functions

                              virtual bool checkMode (uint8_t colordepth, uint8_t offset_red, uint8_t offset_green, uint8_t offset_blue, uint8_t bits_red, uint8_t bits_green, uint8_t bits_blue)=0
                               Check if a printer is available for a video mode. More...
                               

                              Detailed Description

                              Abstraction of basic graphics printing functions.

                              The actual implementation is placed in the inherited template class GraphicsPrinter for performance reasons.

                              Member Function Documentation

                              virtual bool AbstractGraphicsPrinter::checkMode ( uint8_t  colordepth,
                              uint8_t  offset_red,
                              uint8_t  offset_green,
                              uint8_t  offset_blue,
                              uint8_t  bits_red,
                              uint8_t  bits_green,
                              uint8_t  bits_blue 
                              )
                              protectedpure virtual

                              Check if a printer is available for a video mode.

                              This is required since printers are defined during compile time for performance reasons.

                              Template Parameters
                              colordepthcolor depth of video mode
                              offset_redBit position of red color mask in video mode
                              offset_greenBit position of green color mask in video mode
                              offset_blueBit position of blue color mask in video mode
                              bits_redSize of red color mask in video mode
                              bits_greenSize of green color mask in video mode
                              bits_blueSize of blue color mask in video mode
                              Returns
                              true if a printer for the video mode is available

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::init ( unsigned  width,
                              unsigned  height,
                              unsigned  pitch 
                              )
                              pure virtual

                              Initialize printer with actual screen dimensions.

                              Parameters
                              widthvisible width of graphics screen
                              heightvisible height of graphics screen
                              pitchwidth of graphics screen (including invisible part, has to be at least width)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::buffer ( void *  lfb)
                              pure virtual

                              Set the video memory address.

                              Parameters
                              lfbpointer to the linear framebuffer (lfb)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual bool AbstractGraphicsPrinter::valid ( const Point &  p) const
                              pure virtual

                              Check if a Point can be displayed at the current resolution.

                              Parameters
                              pCoordinates to check
                              Returns
                              'true' if can be displayed

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual unsigned AbstractGraphicsPrinter::height ( ) const
                              pure virtual

                              Number of vertical pixels in current resolution.

                              Returns
                              Height of the screen in current video mode

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual unsigned AbstractGraphicsPrinter::width ( ) const
                              pure virtual

                              Number of horizontal pixels in current resolution.

                              Returns
                              Width of the screen in current video mode

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::pixel ( const Point &  p,
                              const Color &  color 
                              )
                              pure virtual

                              Draw a pixel.

                              Parameters
                              pCoordinates of the pixel
                              colorColor of the pixel

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::pixel ( const Point &  p,
                              const ColorAlpha &  color 
                              )
                              pure virtual

                              Draw a pixel.

                              Parameters
                              pCoordinates of the pixel
                              colorColor of the pixel

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::line ( const Point &  start,
                              const Point &  end,
                              const Color &  color 
                              )
                              pure virtual

                              Draw a line.

                              Parameters
                              startCoordinates of the begin of the line
                              endCoordinates of the end of the line
                              colorColor of the line

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::line ( const Point &  start,
                              const Point &  end,
                              const ColorAlpha &  color 
                              )
                              pure virtual

                              Draw a line.

                              Parameters
                              startCoordinates of the begin of the line
                              endCoordinates of the end of the line
                              colorColor of the line

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::rectangle ( const Point &  start,
                              const Point &  end,
                              const Color &  color,
                              bool  filled = true 
                              )
                              pure virtual

                              Draw a rectangle on the current back buffer.

                              Parameters
                              startCoordinate of the rectangles upper left corner
                              endCoordinate of the rectangles lower right corner
                              colorColor of the rectangle
                              filledIf set, the rectangle will be filled with the same color. (otherwise only borders will be drawn)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::rectangle ( const Point &  start,
                              const Point &  end,
                              const ColorAlpha &  color,
                              bool  filled = true 
                              )
                              pure virtual

                              Draw a rectangle on the current back buffer.

                              Parameters
                              startCoordinate of the rectangles upper left corner
                              endCoordinate of the rectangles lower right corner
                              colorColor of the rectangle
                              filledIf set, the rectangle will be filled with the same color. (otherwise only borders will be drawn)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::font ( const Font &  new_font)
                              pure virtual

                              Change the current font for text output in video mode.

                              Parameters
                              new_fontFont to be used on subsequent calls to AbstractGraphicsPrinter::text() (without explicit font parameter)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::text ( const Point &  p,
                              const char *  string,
                              unsigned  len,
                              const Color &  color,
                              const Font *  font = nullptr 
                              )
                              pure virtual

                              Print text (without automatic word wrap).

                              Parameters
                              pUpper left start position of the text
                              stringPointer to char array containing the text to be displayed
                              lenNumber of characters to be displayed
                              colorColor for the text characters
                              fontExplicit font – or nullptr to use default font (set by font method)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::text ( const Point &  p,
                              const char *  string,
                              unsigned  len,
                              const ColorAlpha &  color,
                              const Font *  font = nullptr 
                              )
                              pure virtual

                              Print text (without automatic word wrap).

                              Parameters
                              pUpper left start position of the text
                              stringPointer to char array containing the text to be displayed
                              lenNumber of characters to be displayed
                              colorColor for the text characters
                              fontExplicit font – or nullptr to use default font (set by font method)

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::image ( const Point &  p,
                              PNG &  image,
                              unsigned  width = 0,
                              unsigned  height = 0,
                              unsigned  offset_x = 0,
                              unsigned  offset_y = 0 
                              )
                              pure virtual

                              Draw a PNG image (or detail)

                              The image can has to be in a supported PNG format. Alpha blending (transparency) is supported.

                              Parameters
                              pCoordinate of the images upper left corner
                              imageSource image to display
                              widthWidth of the image detail (full image width of the source image if zero/default value)
                              heightHeight of the image detail (full image height of the source if zero/default value)
                              offset_xRight offset of the source image
                              offset_yTop offset of the source image

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::image ( const Point &  p,
                              const GIMP &  image,
                              unsigned  width = 0,
                              unsigned  height = 0,
                              unsigned  offset_x = 0,
                              unsigned  offset_y = 0 
                              )
                              pure virtual

                              Draw a GIMP image (or detail)

                              The image has to be exported as C-source (without Glib types!) in GIMP, alpha blending (transparency) is supported.

                              Parameters
                              pCoordinate of the images upper left corner
                              imageSource image to display
                              widthWidth of the image detail (full image width of the source image if zero/default value)
                              heightHeight of the image detail (full image height of the source if zero/default value)
                              offset_xRight offset of the source image
                              offset_yTop offset of the source image

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::image ( const Point &  p,
                              const Color *  image,
                              unsigned  width,
                              unsigned  height,
                              unsigned  offset_x = 0,
                              unsigned  offset_y = 0 
                              )
                              pure virtual

                              Draw a sprite.

                              Each element in the source array will be displayed as a single pixel.

                              Parameters
                              pCoordinate of the sprites upper left corner
                              imageSource sprite to display
                              widthWidth of the sprite detail
                              heightHeight of the sprite detail
                              offset_xRight offset of the source sprite
                              offset_yTop offset of the source sprite

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.

                              virtual void AbstractGraphicsPrinter::image ( const Point &  p,
                              const ColorAlpha *  image,
                              unsigned  width,
                              unsigned  height,
                              unsigned  offset_x = 0,
                              unsigned  offset_y = 0 
                              )
                              pure virtual

                              Draw a sprite with alpha blending (transparency).

                              Each element in the source array will be displayed as a single pixel.

                              Parameters
                              pCoordinate of the sprites upper left corner
                              imageSource sprite to display
                              widthWidth of the sprite detail
                              heightHeight of the sprite detail
                              offset_xRight offset of the source sprite
                              offset_yTop offset of the source sprite

                              Implemented in GraphicsPrinter< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >.


                              The documentation for this class was generated from the following files:
                              • graphics/printer.h
                              • graphics/printer.cc
                              Friedrich-Alexander-Universität
                              Erlangen-Nürnberg

                              Schlossplatz 4
                              91054 Erlangen
                              • Impressum
                              • Datenschutz
                              • Barrierefreiheit
                              • Facebook
                              • RSS Feed
                              • Xing
                              Nach oben