Corrected left and top offsets.
Use variables rather than hard-coded h- and v-resolution.
Doc changes.