2010-02-06 8 views

risposta

2

Dopo aver postato la domanda che ho trovato la seguente soluzione:

path = QPainterPath(...) # Path we are testing against 
    point = QPointF(...)  # Current position 

    stroker = QPainterPathStroker() 
    stroker.setWidth(10)  # Distance which we consider "on" the path 
    stroke = stroker.createStroke(path) 

    if stroke.contains(point): 
     # point is on path