I'm making an analog clock much like 2nd Gig. The minute hand is working perfectly as expected but the hour hand is messing it all up. Heres the code and the images too :─
BTW, I'm also confused on two parameters ValueRemainder and ValueReminder. Dunno what both of them mean, but I saw the latter one for the first time in 2nd gig's code.
Thanx a zilllion times.
You do not have the required permissions to view the files attached to this post.
Be one of the iNEViTABLES - Storm, Earthquake, Lightning, Flood - and the world will bow down to you.
- ValueRemainder, if you'll forgive a simplified explanation, scales the measure value. For an hour hand, you would use ValueRemainder=43200 (60 seconds * 60 minutes * 12 hours).
- ValueReminder is a misspelling of ValueRemainder. It still works for backwards compatibility, but you should use ValueRemainder instead.
- You don't need to use square roots for W and H when your images are perfectly square. Just use the original image dimensions.
- The OffsetX and OffsetY should be exactly half the W and H (200). The X and Y only matter in terms of placing the images in relation to each other, so the larger image (hour) can be at 0,0, and the smaller image (minutes) should be centered within the hour's dimensions (59,59).
- Don't use ImageRotate for the Hour rotator. That seems to have a very different effect from what you need. Instead, either adjust the StartAngle so that the meter starts pointing upward, or - better still - use an image editing program to straighten the image.
damn. I never would have thought that ImageRotate has anything to do with this. I tried fixing it and was baffled that I had to use offsetx/y=272 so the hour rotates around its center. I guess the ImageRotate changes the effective size of the image before the offset is applied.
- ValueRemainder, if you'll forgive a simplified explanation, scales the measure value. For an hour hand, you would use ValueRemainder=43200 (60 seconds * 60 minutes * 12 hours).
- ValueReminder is a misspelling of ValueRemainder. It still works for backwards compatibility, but you should use ValueRemainder instead.
- You don't need to use square roots for W and H when your images are perfectly square. Just use the original image dimensions.
- The OffsetX and OffsetY should be exactly half the W and H (200). The X and Y only matter in terms of placing the images in relation to each other, so the larger image (hour) can be at 0,0, and the smaller image (minutes) should be centered within the hour's dimensions (59,59).
- Don't use ImageRotate for the Hour rotator. That seems to have a very different effect from what you need. Instead, either adjust the StartAngle so that the meter starts pointing upward, or - better still - use an image editing program to straighten the image.
- Those ImageTints aren't doing anything at all.
That makes it work.
Be one of the iNEViTABLES - Storm, Earthquake, Lightning, Flood - and the world will bow down to you.
MerlinTheRed wrote:damn. I never would have thought that ImageRotate has anything to do with this. I tried fixing it and was baffled that I had to use offsetx/y=272 so the hour rotates around its center. I guess the ImageRotate changes the effective size of the image before the offset is applied.
now that is something every one of us should be aware right from this time.
Be one of the iNEViTABLES - Storm, Earthquake, Lightning, Flood - and the world will bow down to you.