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); }
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); }
void RowPanel::paintEvent(QPaintEvent *e) { QRect toBeUpdated = e->rect(); QPainter p(this); // range di righe visibili int r0 = getViewer()->yToRow(toBeUpdated.top()); int r1 = getViewer()->yToRow(toBeUpdated.bottom()); p.setClipRect(toBeUpdated); p.fillRect(toBeUpdated, QBrush(getViewer()->getLightLightBGColor())); drawCurrentRowGadget(p, r0, r1); drawRows(p, r0, r1); }