LibrePCB Developers Documentation
GraphicsPagePainter Class Referenceabstract

Base class for printing a page for librepcb::GraphicsExport. More...

#include <graphicsexport.h>

+ Inheritance diagram for GraphicsPagePainter:
+ Collaboration diagram for GraphicsPagePainter:

Public Member Functions

virtual void paint (QPainter &painter, const GraphicsExportSettings &settings) const noexcept=0
 Draw page content on a QPainter. More...
 

Detailed Description

Base class for printing a page for librepcb::GraphicsExport.

The class librepcb::GraphicsExport relies on this base class for performing the actual printing of a page. Subclasses only need to implement paint() to draw arbitrary graphics which librepcb::GraphicsExport will then either send to a printer, PDF file or other output formats.

See also
librepcb::GraphicsExport

Member Function Documentation

◆ paint()

virtual void paint ( QPainter &  painter,
const GraphicsExportSettings settings 
) const
pure virtualnoexcept

Draw page content on a QPainter.

Attention
This method must be thread-safe as it might be called from multiple threads at the same time!
Note
Most settings are already handled by librepcb::GraphicsExport and should not be taken into account when implementing this method. In particular, any page layout or coordinate transformations do not need to be respected by this implementation. And for layer colors, just use librepcb::GraphicsExportSettings::getColor() and librepcb::GraphicsExportSettings::getFillColor().
Parameters
painterWhere to paint the content to.
settingsHelper class to fetch layer colors depending on the current export settings.

Implemented in FootprintPainter, SymbolPainter, BoardPainter, RealisticBoardPainter, and SchematicPainter.


The documentation for this class was generated from the following file: