void wxQtDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset ) { if (n > 0) { QPainterPath path(wxQtConvertPoint(points[0])); for (int i = 1; i < n; i++) { path.lineTo(wxQtConvertPoint(points[i])); } m_qtPainter->translate(xoffset, yoffset); m_qtPainter->drawPath(path); // Reset transform ComputeScaleAndOrigin(); } }
void wxQtDCImpl::DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle ) { QPolygon qtPoints; for (int i = 0; i < n; i++) { qtPoints << wxQtConvertPoint(points[i]); } Qt::FillRule fill = (fillStyle == wxWINDING_RULE) ? Qt::WindingFill : Qt::OddEvenFill; m_qtPainter->translate(xoffset, yoffset); m_qtPainter->drawPolygon(qtPoints, fill); // Reset transform ComputeScaleAndOrigin(); }
long wxListCtrl::HitTest(const wxPoint& point, int &flags, long* ptrSubItem) const { QModelIndex index = m_qtTreeWidget->indexAt(wxQtConvertPoint(point)); if ( index.isValid() ) { flags = wxLIST_HITTEST_ONITEM; if (ptrSubItem) *ptrSubItem = index.column(); } else { flags = wxLIST_HITTEST_NOWHERE; if (ptrSubItem) *ptrSubItem = 0; } return index.row(); }