Remove unused interface methods
All checks were successful
Build ptprnt / build (push) Successful in 3m44s
All checks were successful
Build ptprnt / build (push) Successful in 3m44s
This commit is contained in:
@@ -90,14 +90,6 @@ int Label::getHeight() {
|
|||||||
return mPrinterHeight;
|
return mPrinterHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
int Label::getLayoutHeight() {
|
|
||||||
return mLayoutHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Label::getLayoutWidth() {
|
|
||||||
return mLayoutWidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Label::configureLayout(PangoLayout* layout, const std::string& text, PangoFontDescription* fontDesc) {
|
void Label::configureLayout(PangoLayout* layout, const std::string& text, PangoFontDescription* fontDesc) {
|
||||||
pango_layout_set_font_description(layout, fontDesc);
|
pango_layout_set_font_description(layout, fontDesc);
|
||||||
pango_layout_set_text(layout, text.c_str(), static_cast<int>(text.length()));
|
pango_layout_set_text(layout, text.c_str(), static_cast<int>(text.length()));
|
||||||
@@ -189,7 +181,7 @@ bool Label::create(const std::string& labelText) {
|
|||||||
break;
|
break;
|
||||||
case VAlignPosition::MIDDLE:
|
case VAlignPosition::MIDDLE:
|
||||||
cairo_move_to(mCairoCtx.get(), 0.0, (mPrinterHeight - mLayoutHeight) / 2);
|
cairo_move_to(mCairoCtx.get(), 0.0, (mPrinterHeight - mLayoutHeight) / 2);
|
||||||
[[fallthrough]];
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ class Label : public ILabel {
|
|||||||
void writeToPng(const std::string& file);
|
void writeToPng(const std::string& file);
|
||||||
[[nodiscard]] int getWidth() override;
|
[[nodiscard]] int getWidth() override;
|
||||||
[[nodiscard]] int getHeight() override;
|
[[nodiscard]] int getHeight() override;
|
||||||
[[nodiscard]] int getLayoutWidth() override;
|
|
||||||
[[nodiscard]] int getLayoutHeight() override;
|
|
||||||
[[nodiscard]] std::vector<uint8_t> getRaw() override;
|
[[nodiscard]] std::vector<uint8_t> getRaw() override;
|
||||||
void setFontSize(const double fontSize) override;
|
void setFontSize(const double fontSize) override;
|
||||||
void setFontFamily(const std::string& fontFamily) override;
|
void setFontFamily(const std::string& fontFamily) override;
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ class ILabel {
|
|||||||
virtual std::vector<uint8_t> getRaw() = 0;
|
virtual std::vector<uint8_t> getRaw() = 0;
|
||||||
virtual int getWidth() = 0;
|
virtual int getWidth() = 0;
|
||||||
virtual int getHeight() = 0;
|
virtual int getHeight() = 0;
|
||||||
virtual int getLayoutWidth() = 0;
|
|
||||||
virtual int getLayoutHeight() = 0;
|
|
||||||
|
|
||||||
virtual void setText(const std::string& text) = 0;
|
virtual void setText(const std::string& text) = 0;
|
||||||
virtual void setFontSize(const double fontSize) = 0;
|
virtual void setFontSize(const double fontSize) = 0;
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "../interface/IPrinterDriver.hpp"
|
#include "interface/IPrinterDriver.hpp"
|
||||||
#include "../interface/IPrinterTypes.hpp"
|
#include "interface/IPrinterTypes.hpp"
|
||||||
#include "../libusbwrap/LibUsbTypes.hpp"
|
#include "libusbwrap/LibUsbTypes.hpp"
|
||||||
#include "../libusbwrap/interface/IUsbDevice.hpp"
|
#include "libusbwrap/interface/IUsbDevice.hpp"
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user