Paint Context is moving further than the Widget that contains it (more info below).

I’m overriding Widget’s OnPaint function to draw lines. It works great at first, but if I place my child widgets (the one who does the override) in a different place of their parent Canvas, the PaintContext moves to a wrong position (or something like that). Any idea on how to fix this behavior?