Implementing “Pointing Line”
As I explained in Chapter 2, pointing line is similar to box-line in that they both look at the intersection of a line with a box. Therefore, it is not surprising that the implementations of the two strategies are quite similar.
The function is so simple that I’m going to show it without any further comment.
Listing 8-1. pointing_line.c
/* pointing_line.c * * Copyright (C) 2015 Giulio Zambon - http://zambon.com.au/ * */#include <stdio.h>#include <stdlib.h> ...