Detect and draw endpoints.