19 lines
558 B
C++
19 lines
558 B
C++
#pragma once
|
|
|
|
#include <QImage>
|
|
#include <QPointF>
|
|
#include <QPainterPath>
|
|
#include <QRect>
|
|
#include <QSize>
|
|
#include <QVector>
|
|
|
|
namespace entity_cutout {
|
|
|
|
QPainterPath pathFromWorldPolygon(const QVector<QPointF>& poly);
|
|
QPointF polygonCentroid(const QVector<QPointF>& poly);
|
|
QRect clampRectToImage(const QRect& r, const QSize& size);
|
|
QImage extractEntityImage(const QImage& bg, const QVector<QPointF>& polyWorld, QPointF& outTopLeftWorld);
|
|
void applyBlackFillToBackground(QImage& bgCutout, const QVector<QPointF>& polyWorld);
|
|
|
|
} // namespace entity_cutout
|