Exemplo n.º 1
0
void ProsodyDisplay::OnDraw(wxDC& dc)
{//================================
	int x1,y1;
	int vX,vY,vW,vH;        // Dimensions of client area in pixels

	int line, start, end;

    GetClientSize(&x1, &y1);
    if(x1 != linewidth)
    {
        LayoutData(NULL, 0);
    }

	wxRegionIterator upd(GetUpdateRegion()); // get the update rect list

	while (upd)
	{
		vX = upd.GetX();
		vY = upd.GetY();
		vW = upd.GetW();
		vH = upd.GetH();

		CalcUnscrolledPosition(vX,vY,&x1,&y1);

		// Repaint this rectangle, find which lines to redraw
		start = y1/FRAMEHEIGHT;
		end = (y1+vH)/FRAMEHEIGHT;

		for(line=start; line<=end && line<num_lines; line++)
			DrawPitchline(dc,line,x1,x1+vW);

		upd ++ ;
	}
}  // end of ProsodyDisplay::OnDraw
Exemplo n.º 2
0
LayoutData LayoutRepository::get(const QString uid) const
{
	unsigned pos = this->indexOf(uid);
	if (pos != mLayouts.size())
		return mLayouts[pos];
	return LayoutData();
}