Add fromHRGN function.

Change-Id: Iae007306c4d75f650dcd0e319c4d553816e866f3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>