| |
| |
| #include "tgl.h" |
| |
| |
| #include "tstrokeprop.h" |
| |
| #include "tvectorrenderdata.h" |
| |
| |
| |
| |
| #ifdef SPOSTATOINTGLREGIONS |
| void tglDraw(const TVectorRenderData &rd, const TStroke *s) |
| { |
| assert(s); |
| if (!s) |
| return; |
| |
| const TStroke &stroke = *s; |
| |
| |
| glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); |
| glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
| glEnable(GL_BLEND); |
| glEnable(GL_LINE_SMOOTH); |
| |
| |
| glLineWidth((float)1.0); |
| |
| assert(rd.m_palette); |
| TStrokeProp *prop = stroke.getProp(); |
| |
| TColorStyle *style = rd.m_palette->getStyle(stroke->getStyle() ); |
| if (!style->isStrokeStyle() || style->isEnabled() == false) { |
| prop = 0; |
| } else { |
| if (!prop || style != prop->getColorStyle()) { |
| stroke->setProp(style->makeStrokeProp(stroke)); |
| prop = stroke->getProp(); |
| } |
| } |
| |
| |
| if (prop) |
| prop->draw(rd); |
| |
| |
| tglColor(TPixel32::White); |
| |
| glDisable(GL_BLEND); |
| glDisable(GL_LINE_SMOOTH); |
| } |
| #endif |
| |
| |