| 15 * You should have received a copy of the GNU General Public License |
15 * You should have received a copy of the GNU General Public License |
| 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 */ |
17 */ |
| 18 |
18 |
| 19 #include "../linetypes/modelobject.h" |
19 #include "../linetypes/modelobject.h" |
| |
20 #include "../linetypes/circularprimitive.h" |
| 20 #include "../lddocument.h" |
21 #include "../lddocument.h" |
| 21 #include "../glShared.h" |
22 #include "../glShared.h" |
| 22 |
23 |
| 23 /* |
24 /* |
| 24 * Returns whether or not the document is flat. |
25 * Returns whether or not the document is flat. |
| 126 { |
127 { |
| 127 // Subfile is not flat. Resort to invertnext. |
128 // Subfile is not flat. Resort to invertnext. |
| 128 reference->setInverted(not reference->isInverted()); |
129 reference->setInverted(not reference->isInverted()); |
| 129 } |
130 } |
| 130 } |
131 } |
| |
132 else if (obj->type() == LDObjectType::CircularPrimitive) |
| |
133 { |
| |
134 auto primitive = static_cast<LDCircularPrimitive*>(obj); |
| |
135 |
| |
136 if (primitive->isFlat()) |
| |
137 primitive->setTransformationMatrix(primitive->transformationMatrix() * ::flipmatrix(Y)); |
| |
138 else |
| |
139 primitive->setInverted(not primitive->isInverted()); |
| |
140 } |
| 131 } |
141 } |
| 132 |
142 |
| 133 /* |
143 /* |
| 134 * Inverts the winding of a polygon. |
144 * Inverts the winding of a polygon. |
| 135 */ |
145 */ |