FIX:程序无法运行的问题

dev-VirtualTexture
ArgonarioD 2023-02-07 16:14:56 +08:00
parent 169aa9501c
commit 55f37fd284
3 changed files with 13 additions and 5 deletions

View File

@ -3,6 +3,7 @@
#include <QJsonArray> #include <QJsonArray>
#include <QJsonObject> #include <QJsonObject>
#include <QPainterPath> #include <QPainterPath>
#include <QImage>
#include <string> #include <string>
#include "../Renderer/Painting/ElementStyle.h" #include "../Renderer/Painting/ElementStyle.h"
@ -49,6 +50,9 @@ public:
//******************************** BitmapPath ********************************// //******************************** BitmapPath ********************************//
using std::vector;
using std::shared_ptr;
class BitmapPath class BitmapPath
{ {
protected: protected:

View File

@ -12,6 +12,8 @@
#include <QTreeWidget> #include <QTreeWidget>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "../Renderer/Painting/ElementStyle.h"
using std::shared_ptr; using std::shared_ptr;
using std::vector; using std::vector;
class GraphicElement; class GraphicElement;

View File

@ -43,11 +43,13 @@ std::vector<glm::vec2> generatePathBuffer(const QPainterPath& path)
break; break;
case QPainterPath::LineToElement: case QPainterPath::LineToElement:
qDebug() << "LineToElement"; qDebug() << "LineToElement";
{
glm::vec2 end = glm::vec2(element.x, element.y); glm::vec2 end = glm::vec2(element.x, element.y);
glm::vec2 mid = (pathBuffer.back() + end) / 2.f; glm::vec2 mid = (pathBuffer.back() + end) / 2.f;
pathBuffer.push_back(mid); pathBuffer.push_back(mid);
pathBuffer.push_back(mid); pathBuffer.push_back(mid);
pathBuffer.push_back(end); pathBuffer.push_back(end);
}
break; break;
case QPainterPath::CurveToElement: case QPainterPath::CurveToElement:
qDebug() << "CurveToElement"; qDebug() << "CurveToElement";