mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Issue #123: Added version of Blend2D
This commit is contained in:
@@ -153,6 +153,11 @@ QPaintEngine* PDFBLPaintDevice::paintEngine() const
|
|||||||
return m_paintEngine;
|
return m_paintEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t PDFBLPaintDevice::getVersion()
|
||||||
|
{
|
||||||
|
return BL_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
int PDFBLPaintDevice::metric(PaintDeviceMetric metric) const
|
int PDFBLPaintDevice::metric(PaintDeviceMetric metric) const
|
||||||
{
|
{
|
||||||
switch (metric)
|
switch (metric)
|
||||||
|
@@ -36,6 +36,8 @@ public:
|
|||||||
virtual int devType() const override;
|
virtual int devType() const override;
|
||||||
virtual QPaintEngine* paintEngine() const override;
|
virtual QPaintEngine* paintEngine() const override;
|
||||||
|
|
||||||
|
static uint32_t getVersion();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int metric(PaintDeviceMetric metric) const override;
|
virtual int metric(PaintDeviceMetric metric) const override;
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include "pdfutils.h"
|
#include "pdfutils.h"
|
||||||
#include "pdfexception.h"
|
#include "pdfexception.h"
|
||||||
|
#include "pdfblpainter.h"
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QtMath>
|
#include <QtMath>
|
||||||
@@ -315,6 +316,18 @@ std::vector<PDFDependentLibraryInfo> PDFDependentLibraryInfo::getLibraryInfo()
|
|||||||
zlibInfo.url = tr("https://zlib.net/");
|
zlibInfo.url = tr("https://zlib.net/");
|
||||||
result.emplace_back(qMove(zlibInfo));
|
result.emplace_back(qMove(zlibInfo));
|
||||||
|
|
||||||
|
// blend2d
|
||||||
|
const uint32_t blend2dVersion = PDFBLPaintDevice::getVersion();
|
||||||
|
const int blend2dMajor = (blend2dVersion >> 16) & 0xFF;
|
||||||
|
const int blend2dMinor = (blend2dVersion >> 8) & 0xFF;
|
||||||
|
const int blend2dPatch = (blend2dVersion) & 0xFF;
|
||||||
|
PDFDependentLibraryInfo blend2dInfo;
|
||||||
|
blend2dInfo.library = tr("Blend2D");
|
||||||
|
blend2dInfo.license = tr("zlib specific");
|
||||||
|
blend2dInfo.version = QString("%1.%2.%3").arg(blend2dMajor).arg(blend2dMinor).arg(blend2dPatch);
|
||||||
|
blend2dInfo.url = tr("https://blend2d.com/");
|
||||||
|
result.emplace_back(qMove(blend2dInfo));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user