Exemplo n.º 1
0
void RowArea::paintEvent(QPaintEvent *event)
{
	QRect toBeUpdated = event->rect();

	QPainter p(this);

	int r0, r1; // range di righe visibili
	r0 = m_viewer->yToRow(toBeUpdated.top());
	r1 = m_viewer->yToRow(toBeUpdated.bottom());

	p.setClipRect(toBeUpdated);

	//fill background
	p.fillRect(toBeUpdated, m_viewer->getBGColor());

	if (TApp::instance()->getCurrentFrame()->isEditingScene()) {
		//current frame
		drawCurrentRowGadget(p, r0, r1);
		//TODO: Scene上のオニオンスキン表示、オプション化するか検討 2016/1/6 shun_iwasawa
		//drawOnionSkinSelection(p);
	}

	drawRows(p, r0, r1);
	drawPlayRange(p, r0, r1);
}
Exemplo n.º 2
0
void RowArea::paintEvent(QPaintEvent *event)
{
	QRect toBeUpdated = event->rect();

	QPainter p(this);

	int r0, r1; // range di righe visibili
	r0 = m_viewer->yToRow(toBeUpdated.top());
	r1 = m_viewer->yToRow(toBeUpdated.bottom());

	p.setClipRect(toBeUpdated);

	//fill background
	p.fillRect(toBeUpdated, m_viewer->getBGColor());

	if (TApp::instance()->getCurrentFrame()->isEditingScene())
		//current frame
		drawCurrentRowGadget(p, r0, r1);

	drawRows(p, r0, r1);

	if (TApp::instance()->getCurrentFrame()->isEditingScene() && Preferences::instance()->isOnionSkinEnabled())
			drawOnionSkinSelection(p);

	drawPlayRange(p, r0, r1);
}