mirror of
https://github.com/huderlem/porymap.git
synced 2026-09-08 08:55:37 -05:00
Add clipping capabilities to overlay scripting api
This commit is contained in:
@@ -32,6 +32,10 @@ public:
|
||||
Q_INVOKABLE void setX(int x);
|
||||
Q_INVOKABLE void setY(int y, int layer);
|
||||
Q_INVOKABLE void setY(int y);
|
||||
Q_INVOKABLE void setClippingRect(int x, int y, int width, int height, int layer);
|
||||
Q_INVOKABLE void setClippingRect(int x, int y, int width, int height);
|
||||
Q_INVOKABLE void clearClippingRect(int layer);
|
||||
Q_INVOKABLE void clearClippingRect();
|
||||
Q_INVOKABLE QJSValue getPosition(int layer = 0);
|
||||
Q_INVOKABLE void setPosition(int x, int y, int layer);
|
||||
Q_INVOKABLE void setPosition(int x, int y);
|
||||
|
||||
@@ -76,6 +76,7 @@ public:
|
||||
this->y = 0;
|
||||
this->hidden = false;
|
||||
this->opacity = 1.0;
|
||||
this->clippingRect = nullptr;
|
||||
}
|
||||
~Overlay() {
|
||||
this->clearItems();
|
||||
@@ -88,6 +89,8 @@ public:
|
||||
int getY();
|
||||
void setX(int x);
|
||||
void setY(int y);
|
||||
void setClippingRect(QRectF rect);
|
||||
void clearClippingRect();
|
||||
void setPosition(int x, int y);
|
||||
void move(int deltaX, int deltaY);
|
||||
void renderItems(QPainter *painter);
|
||||
@@ -103,6 +106,7 @@ private:
|
||||
int y;
|
||||
bool hidden;
|
||||
qreal opacity;
|
||||
QRectF *clippingRect;
|
||||
};
|
||||
|
||||
#endif // OVERLAY_H
|
||||
|
||||
Reference in New Issue
Block a user