| 49 | } |
| 50 | |
| 51 | void LineDrawTool::commit_data(bool final) { |
| 52 | if(objInfoBeingEdited) { |
| 53 | NetworkingObjects::NetObjOwnerPtr<CanvasComponentContainer>& containerPtr = objInfoBeingEdited->obj; |
| 54 | MeshCanvasComponent& newMesh = static_cast<MeshCanvasComponent&>(containerPtr->get_comp()); |
| 55 | newMesh.d.meshPath = BrushComponentCode::brush_stroke_to_skpath(brushPoints, drawP.world.main.toolConfig.lineDraw.hasRoundCaps); |
| 56 | if(final) { |
| 57 | containerPtr->get_comp().simplify_paths(); |
| 58 | containerPtr->normalize_object_coordinates(); |
| 59 | } |
| 60 | containerPtr->commit_update(drawP); |
| 61 | if(final) { |
| 62 | drawP.world.send_reliable_multi_command_to_all([&]() { |
| 63 | drawP.send_transforms_for({objInfoBeingEdited}); |
| 64 | containerPtr->send_comp_update(drawP, final); |
| 65 | }); |
| 66 | } |
| 67 | else |
| 68 | containerPtr->send_comp_update(drawP, final); |
| 69 | } |
| 70 | commitUpdate = false; |
| 71 | } |
| 72 | |
| 73 | void LineDrawTool::gui_phone_toolbox(PhoneDrawingProgramScreen& t) { |
| 74 | using namespace GUIStuff; |
nothing calls this directly
no test coverage detected