PDA

View Full Version : Image Needle questions


nickpoore
04-03-2010, 10:23 AM
Hey.

I recently started playing with the "Image Needle" option in DashWare.
(First Gauge attached.)

I stole the "Noble-Cluster-Tachometer-Needle.png" from one of your other Gauges.

However, when I implement the Needle Image, it is off by 90 degrees.
The reason, of course, is that DashWare assumes that the needle is pointing to 0 at "3 o'clock" on the dial, but that this image is pointing to "6 o'clock" on the dial.

It would be nice to have a way to adjust the "Zero" point of the needle.

Thanks.
Nick.

Rolf
04-05-2010, 01:07 PM
Hi Nick,

0 degrees is straight up (12 o'clock), however the image needle orientation affects this (as you have noticed). If you make sure your image file has your needle pointing to the right o---> then the degrees will act like you expect and you can sync with an Analog Gauge Face (see attached screenshot).

FYI: You can rotate an image in Windows if you double click on the image and bring up the Windows default slide show / picture viewer. The rotation buttons on the bottom will rotate the image permanently in the file. You could also download Paint.NET which is an awesome free photo editing program.

This rotation tip is called out in the help, however we did not do this in some of our sample gauges... so I can see how it's a bit confusing.

Hope that helps.
Rolf

nickpoore
04-05-2010, 10:11 PM
I'm not sure what you mean when you say 0 degrees is straight up (12-o'clock.)
Every gauge I've designed, 0 degrees is at 3 o'clcok.
In your example, your gauge goes from -225 to +45. (If 0 degrees was at 12-o'clock then it would go from -135 to +135.)
(I've attached an image that makes it pretty clear where 0 degrees is.)

The point was...
Since the software is so good at rotating the image (which is not particularly easy), then it should be faily easy to an a "rotation offset" to the image, in much the same way that you can resize the image.

Yes, I know that Windows has built in file rotation (in 90 degree increments), but I thought the suggestion of adding an offset to DashWare would be easy.

Rolf
04-06-2010, 12:38 PM
You're right. I spoke too soon. I only hastily verified that I could sync with the analog face without looking at the angle values.

I just pass the angles into .NET graphics calls, and for some reason their angle is based on the X axis:

startAngle
Angle in degrees measured clockwise from the x-axis to the starting point of the arc.

sweepAngle
Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc.

I can add your offset angle suggestion to the list :)