CGapiSurface::DrawLine doesn't clip?

I wanted to use DrawLine to draw lines between vertices in my simple polygons. However, the polygons may be partly offscreen.
I thought that they would just clip off screen. However, I find that if either end point of the line is off screen, the line does not draw at all.
How can I get clipping behaviour?
I thought that they would just clip off screen. However, I find that if either end point of the line is off screen, the line does not draw at all.
How can I get clipping behaviour?