43 lines
885 B
C++
43 lines
885 B
C++
|
|
#include "PrinterTypes.hpp"
|
|
|
|
#include <memory>
|
|
|
|
#include "Bitmap.hpp"
|
|
|
|
#pragma once
|
|
|
|
namespace ptprnt::printer {
|
|
|
|
class IPrinter {
|
|
public:
|
|
virtual ~IPrinter(){};
|
|
|
|
/**
|
|
* @brief Get Information struct about the printer
|
|
*
|
|
* @return driver::info
|
|
*/
|
|
virtual printer::info getInfo() = 0;
|
|
|
|
/**
|
|
* @brief Prints text immediatly
|
|
*
|
|
* @param text Text to print
|
|
* @param fontSize Size of the text to print
|
|
* @return true Printing succeeded
|
|
* @return false Printing failed
|
|
*/
|
|
virtual bool printText(std::string_view text, uint32_t fontSize) = 0;
|
|
|
|
/**
|
|
* @brief Prints supplied bitmap immediatly
|
|
*
|
|
* @param bm Bitmap to print
|
|
* @return true Printing succeeded
|
|
* @return false Printing failed
|
|
*/
|
|
virtual bool printBitmap(std::shared_ptr<bitmap::Bitmap> bm) = 0;
|
|
};
|
|
|
|
} // namespace ptprnt::printer
|