diff -r cef43609a374 -r 0133e565e072 src/linetypes/object.h --- a/src/linetypes/object.h Sat Dec 14 23:00:01 2019 +0200 +++ b/src/linetypes/object.h Wed Jan 01 17:45:56 2020 +0200 @@ -5,16 +5,24 @@ #include "main.h" #include "colors.h" #include "vertex.h" +#include "gl/common.h" namespace linetypes { - struct Id { unsigned int value; }; + struct GetPolygonsContext; enum class Property; class Object; class ColoredObject; class Empty; } +class DocumentManager; + +struct linetypes::GetPolygonsContext +{ + ::DocumentManager* documents; +}; + /** * @brief Different properties that can be queried with getProperty */ @@ -28,8 +36,7 @@ Point4, // Fourth vertex in a quadrilateral ControlPoint1, // First control point in a conditional edge line ControlPoint2, // Second control point in a conditional edge line - Position, // Position of a subfile reference - Transformation, // Transformation matrix of a subfile reference + Transformation, // 4x4 transformation matrix of a subfile reference ReferenceName, // Subfile reference name IsInverted, // Whether or not the object has been inverted with BFC INVERTNEXT ErrorMessage // For error lines, why parsing failed @@ -56,6 +63,7 @@ virtual QBrush textRepresentationForeground() const; virtual QBrush textRepresentationBackground() const; virtual QFont textRepresentationFont() const; + virtual void getPolygons(std::vector& polygons, GetPolygonsContext* context) const; }; class linetypes::ColoredObject : public Object @@ -65,7 +73,7 @@ bool hasColor() const override final; QVariant getProperty(Property id) const override; SetPropertyResult setProperty(Property id, const QVariant& value) override; -private: +protected: Color colorIndex = colors::main; };