X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fview.cpp;h=a1a70f4172dbd47284667bda53c1dfd293906d81;hp=40262ac92e24f05964cb7b7656963f649c1e8a37;hb=ee71bff635865bd443eed14e3558f72446439ab3;hpb=245ccc8576d4bd29ab04d506ddb0c44b04a67e39 diff --git a/src/view.cpp b/src/view.cpp index 40262ac..a1a70f4 100644 --- a/src/view.cpp +++ b/src/view.cpp @@ -32,6 +32,21 @@ void View::Render() glBegin(GL_QUADS); for (unsigned id = 0; id < m_document.ObjectCount(); ++id) { + if (m_document.m_objects.types[id] == RECT_FILLED) + continue; + Rect obj_bounds = m_document.m_objects.bounds[id]; + glVertex2f(obj_bounds.x, obj_bounds.y); + glVertex2f(obj_bounds.x + obj_bounds.w, obj_bounds.y); + glVertex2f(obj_bounds.x + obj_bounds.w, obj_bounds.y + obj_bounds.h); + glVertex2f(obj_bounds.x, obj_bounds.y + obj_bounds.h); + } + glEnd(); + + glBegin(GL_LINE_LOOP); + for (unsigned id = 0; id < m_document.ObjectCount(); ++id) + { + if (m_document.m_objects.types[id] == RECT_OUTLINE) + continue; Rect obj_bounds = m_document.m_objects.bounds[id]; glVertex2f(obj_bounds.x, obj_bounds.y); glVertex2f(obj_bounds.x + obj_bounds.w, obj_bounds.y);