diff options
author | jonas <himself@jonasgunz.de> | 2019-01-14 17:30:06 +0100 |
---|---|---|
committer | jonas <himself@jonasgunz.de> | 2019-01-14 17:30:06 +0100 |
commit | 60ea1ae7257d60d3ee05f1b9d412a1bd441db7cb (patch) | |
tree | 819063addd6b1abf972adea2e49a83299280c9b2 /main.cpp | |
parent | 5d0b6dd79722707afb15642cc8523b36a6391e0d (diff) | |
download | termgl-60ea1ae7257d60d3ee05f1b9d412a1bd441db7cb.tar.gz |
RTFM!! Error resulted in illegal coordiante pair for drawLine (x2 > x1)
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
@@ -9,13 +9,13 @@ #include "cInput.h" #include "cWiremesh.h" -#include "testobject.h" +//#include "testobject.h" int main() { cRender render(' ', _COL_DEFAULT, 30,30); cObjectHandler handler(&render); - cObject ver(30,1); + cObject ver(40,1); cWiremesh obj; cInput input; @@ -30,29 +30,32 @@ int main() ver.drawPoint(VERSION + 48, {1,0}, true, _COL_WHITE); ver.drawPoint('.', {2,0}, true, _COL_WHITE); ver.drawPoint(PATCHLEVEL + 48, {3,0}, true, _COL_WHITE); - ver.drawText(DATE, {5,0}, _COL_WHITE); + ver.drawText(DATE, {30,0}, _COL_WHITE); + ver.drawText(BRANCH, {5,0}, _COL_WHITE); int iver = handler.createObject(&ver); handler.moveObject(iver, {0,0}, _MOVE_ABSOLUTE); - int x = 25; + int x = 30; + int y = 20; + int z = 20; - obj.addVector({0,0,x}, {x,0,0}, '+', _COL_RED); - obj.addVector({x,0,x}, {0,x,0}, '+', _COL_RED); - obj.addVector({0,0,x}, {0,x,0}, '+', _COL_RED); - obj.addVector({0,x,x}, {x,0,0}, '+', _COL_RED); + obj.addVector({0,0,z}, {x,0,0}, '+', _COL_RED); + obj.addVector({0,0,z}, {0,y,0}, '+', _COL_RED); + obj.addVector({0,y,z}, {x,0,0}, '+', _COL_RED); + obj.addVector({x,0,z}, {0,y,0}, '+', _COL_RED); - obj.addVector({0,0,0}, {0,0,x}, '.', _COL_RED); - obj.addVector({x,0,0}, {0,0,x}, '.', _COL_RED); - obj.addVector({0,x,0}, {0,0,x}, '.', _COL_RED); - obj.addVector({x,x,0}, {0,0,x}, '.', _COL_RED); + obj.addVector({0,0,0}, {0,0,z}, ':', _COL_RED); + obj.addVector({x,0,0}, {0,0,z}, ':', _COL_RED); + obj.addVector({0,y,0}, {0,0,z}, ':', _COL_RED); + obj.addVector({x,y,0}, {0,0,z}, ':', _COL_RED); - obj.addVector({0,0,0}, {x,0,0}, '|', _COL_RED); - obj.addVector({x,0,0}, {0,x,0}, '|', _COL_RED); - obj.addVector({0,0,0}, {0,x,0}, '|', _COL_RED); - obj.addVector({0,x,0}, {x,0,0}, '|', _COL_RED); + obj.addVector({0,0,0}, {x,0,0}, ',', _COL_RED); + obj.addVector({0,0,0}, {0,y,0}, ',', _COL_RED); + obj.addVector({0,y,0}, {x,0,0}, ',', _COL_RED); + obj.addVector({x,0,0}, {0,y,0}, ',', _COL_RED); handler.write(); - obj.setPosition(0,0,0); + obj.setPosition(2,2,0); obj.write(&render); @@ -102,10 +105,10 @@ int main() handler.write(); obj.write(&render); - render.render(); - usleep(10*1000); } + render.render(); + usleep(10*1000); } |