void ParallelCoordinate::paintGL(){ glViewport(0, 0, this->width(), this->height()); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0, 1, 0, 1, 0, 2); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, -1.0); glClear(GL_COLOR_BUFFER_BIT); glShadeModel(GL_SMOOTH); if ( dataset_ == NULL ) return; PaintSubsetIdentifyItems(); PaintLines(); PaintText(); PaintCoordinate(); }
bool Table::Paint(int zoom, Draw& w, int x, int y, int cx, int ymax, PaintInfo& pi) const { int j; Vector<Line> header; int zfw = DocZoomLn(zoom, GetFrameWidth()); int tcx = cx - 2 * zfw - DocZoom(zoom, GetLm()) - DocZoom(zoom, GetRm()); bool breakpage = pi.line != pi.oline; int pgcy = ymax - y; pi.oline = pi.line; if(pi.line) { int m = min(GetHeaderRows(), cell.GetCount()); for(j = 0; j < m; j++) header.Add() = GetLine(zoom, j, tcx, NULL); } int hdrcy = Span(header); if(hdrcy > ymax - y) { header.Clear(); hdrcy = 0; } int hg = hdrcy; int yp = y; y += zfw; bool was = false; if(y >= ymax) { pi.ypos = y; return true; } while(pi.line < GetRows() && y < ymax) { Vector<Line> line; Vector<int> *yl = &pi.yl; int span = 0; bool nospan = true; for(;;) { int k = pi.line + line.GetCount(); if(k >= GetRows() || line.GetCount() && !KeepLine(k) && span <= 0) break; span = max((line.Add() = GetLine(zoom, k, tcx, yl)).span, span); if(span) nospan = false; yl = NULL; span--; } hg += Span(line); int lhg = line.Top().height; if(hg + y + zfw > ymax) { if((!breakpage || lhg > style.breakcy && ymax - (y + hg - lhg) - zfw > style.breakpgcy) && nospan && line.GetCount() && hg + y + zfw - lhg <= ymax) { int yy = y + hdrcy; PaintLines(zoom, w, x, yy, 0, header, 0); yy = y + hdrcy; int i; for(i = 0; i < line.GetCount() - 1; i++) { DrawLine(zoom, w, x, yy, pi.line++, line[i], ymax, NULL); yy += line[i].height; } DrawLine(zoom, w, x, yy, pi.line, line[i], ymax, &pi.yl); breakpage = was = true; y = ymax; } if(breakpage) { FrameTab(zoom, w, was, x, y, yp, cx); pi.ypos = y; return true; } } y += hg; int yy = y; PaintLines(zoom, w, x, yy, pi.line, line, &pi.yl); PaintLines(zoom, w, x, yy, 0, header, 0); pi.yl.Clear(); header.Clear(); hg = 0; breakpage = was = true; pi.line += line.GetCount(); } FrameTab(zoom, w, was, x, y, yp, cx); pi.ypos = y + zfw; return false; }
int WINAPI PaintConEmuBackground(struct PaintBackgroundArg* pBk) { DWORD nPanelBackIdx = CONBACKCOLOR(pBk->nFarColors[col_PanelText]); DWORD nEditorBackIdx = CONBACKCOLOR(pBk->nFarColors[col_EditorText]); DWORD nViewerBackIdx = CONBACKCOLOR(pBk->nFarColors[col_ViewerText]); if (pBk->dwLevel == 0) { if ((pBk->Place & pbp_Panels) && gbLinesColorPanel) { if (pBk->LeftPanel.bVisible) { PaintBack(pBk->hdc, (pBk->LeftPanel.bPlugin && gbHilightPlugins) ? gcrHilightPlugBack : pBk->crPalette[nPanelBackIdx], pBk->rcDcLeft); } if (pBk->RightPanel.bVisible) { PaintBack(pBk->hdc, (pBk->RightPanel.bPlugin && gbHilightPlugins) ? gcrHilightPlugBack : pBk->crPalette[nPanelBackIdx], pBk->rcDcRight); } } else if (((pBk->Place & pbp_Viewer) && gbLinesColorViewer) || ((pBk->Place & pbp_Editor) && gbLinesColorEditor) ) { int nCellHeight = pBk->dcSizeY / (pBk->rcConWorkspace.bottom - pBk->rcConWorkspace.top + 1); RECT rcWork = {0, nCellHeight, pBk->dcSizeX, pBk->dcSizeY - nCellHeight}; PaintBack(pBk->hdc, pBk->crPalette[(pBk->Place & pbp_Editor) ? nEditorBackIdx : nViewerBackIdx], rcWork); } } if ((pBk->Place & pbp_Panels) && gbLinesColorPanel && (pBk->LeftPanel.bVisible || pBk->RightPanel.bVisible)) { int nCellHeight = 12; if (pBk->LeftPanel.bVisible) nCellHeight = pBk->rcDcLeft.bottom / (pBk->LeftPanel.rcPanelRect.bottom - pBk->LeftPanel.rcPanelRect.top + 1); else nCellHeight = pBk->rcDcRight.bottom / (pBk->RightPanel.rcPanelRect.bottom - pBk->RightPanel.rcPanelRect.top + 1); int nY1 = (pBk->LeftPanel.bVisible) ? pBk->rcDcLeft.top : pBk->rcDcRight.top; int nY2 = (pBk->rcDcLeft.bottom >= pBk->rcDcRight.bottom) ? pBk->rcDcLeft.bottom : pBk->rcDcRight.bottom; int nX1 = (pBk->LeftPanel.bVisible) ? 0 : pBk->rcDcRight.left; int nX2 = (pBk->RightPanel.bVisible) ? pBk->rcDcRight.right : pBk->rcDcLeft.right; PaintLines(pBk->hdc, gcrLinesColorPanel, nCellHeight, nX1, nY1, nX2, nY2); } else if (((pBk->Place & pbp_Viewer) && gbLinesColorViewer) || ((pBk->Place & pbp_Editor) && gbLinesColorEditor) ) { int nCellHeight = pBk->dcSizeY / (pBk->rcConWorkspace.bottom - pBk->rcConWorkspace.top + 1); PaintLines(pBk->hdc, (pBk->Place & pbp_Editor) ? gcrLinesColorEditor : gcrLinesColorViewer, nCellHeight, 0, 0, pBk->dcSizeX, pBk->dcSizeY); } return TRUE; }