Please see my comment to the question. If you cannot solve this little problem, you can always find the detailed solutions. Something like this one:
http://math.stackexchange.com/questions/65503/point-reflection-over-a-line[
^].
You can always find something to your taste:
http://bit.ly/1kj3UiJ[
^]. :-)
The problem with direct method is that you have to consider special cases when a line is vertical (will give you singularity) or close to vertical (will give you loss of precision). Another method based on
transformation matrix is free from this problem, and the API for matrices is already available. First, transform your coordinate system to make the line passing through (0, 0), then rotate it, to make it, say, horizontal. In this new coordinate system, the reflection of the point (x, y) is (x, y)
→ (x, −y). After getting the reflected points, reverse your coordinate system transformations to get to original coordinate system.
If you are going in for software development, it's good to know at least some basics of mathematics.
—SA