A Basic Watch

Previous Next

So far, we created some graphics, and an xml file that displays an empty watch face. Let's create the first Paper Watch, the basic model. That one has an hour, minute and second hand, all centrally arranged.

To add a hand, you have to specify two coordinates: the offset on the watch face, and the centre of rotation on the hand itself. Imagine you are pinning the hand to the face with a needle, and measure where in the hand and the face the holes need to go. Measuring is best done in your graphics editor of choice, since the values are in pixels. Graphics tools usually display the position of the cursor somewhere. See below, where the position is displayed in the lower left corner. So, the x-offset is 206, and the y-offset 191


similarly, measure the centre of the axis in the minute hand:

You now have 2 coordinates, and can add the minute hand to the settings file:

<WatchData Name="Basic Paper Watch">

   <Dial image="face.png" />









Then add the hour and second hands, choosing the type "hour" and "second" respectively, Once you added all three hands to the specs file, start the application, right click to select a watch, and choose your basic Paper Watch. If something went wrong, you can compare your file to the example in the paper basic folder. You should see a watch like this, displaying the current system time:

Created with the Personal Edition of HelpNDoc: Full featured Documentation generator