This tutorial aims to aid your understanding of what Scale and Offset are.
This will guide you through the steps of coding a plugin.