AdvancedHMI Software

General Category => Feature Request => Topic started by: Morgan on June 08, 2016, 01:24:54 PM

Title: GraphicIndicator image rotation
Post by: Morgan on June 08, 2016, 01:24:54 PM
The ability to rotate the 3 images during development.  It would help in development time and overall size of the compiled project because you would not need to have multiple versions on the same image at different angles (depending on the need).

For example:
I created a image of a valve.  In some places I need the valve to be shown vertically and in other places it need to be shown horizontally (depending on the flow and physical space on the Form).  Currently I need to have a minimum of 4 images (2 for each rotation to show status On/Off).
Title: Re: GraphicIndicator image rotation
Post by: Morgan on June 09, 2016, 11:45:43 AM
I created a GraphicIndicator that will allow you to rotate the image.
Additional Properties included: Rotation, MinimumHoldTime, ShowThrough and TransparentColor.
   
Depending on what version you are running, you may have to change
SubScriptions.ComComponent   To   SubScriptions.CommComponent
Title: Re: GraphicIndicator image rotation
Post by: Morgan on June 10, 2016, 02:58:37 PM
Here is a variation that simulates movement by switching between two images.
Title: Re: GraphicIndicator image rotation
Post by: Archie on June 14, 2016, 10:11:44 AM
You actually beat me to this. I made an update to the GraphicIndicator to give it an Rotation property. This update is part of the latest release 3.99j
Title: Re: GraphicIndicator image rotation
Post by: Morgan on June 14, 2016, 12:51:40 PM
I checked it out and I'm glad you included it but I am not sure why put limits on it by only allowing 90º increments.  It doesn't help if I have a screw auger that needs to be shown at 60º.
Title: Re: GraphicIndicator image rotation
Post by: Archie on June 14, 2016, 12:58:38 PM
The difficulty with setting any angle was when using Stretch for the SizeMode. When it stretches at other than a 90 angle, where should it position in the region? How do you stretch X and Y?
Title: Re: GraphicIndicator image rotation
Post by: Morgan on June 14, 2016, 01:38:59 PM
You can look at the control I posted here.  It does not limit the angle.  Feel free to plagiarize, it won't bother me at all.
Title: Re: GraphicIndicator image rotation
Post by: MrPike on June 14, 2016, 11:56:27 PM
Hi Morgan, I loaded you're control and it looks nice.  However it seems the image does not rotate from the same anchor point.  For example the image rotates down from the left with a value of 1-90 degrees.  I cant seem to rotate up from the left anchor.  I would like to use this to show electrical oneline animation.  Also what field causes the rotation?  Thanks
Title: Re: GraphicIndicator image rotation
Post by: Morgan on June 15, 2016, 09:09:00 AM
The GraphicIndicatorRotate control was not created for animation (see the first post).  There already is a standard control that does animation (AnimatingPictureBox) although I have not used it.
Title: Re: GraphicIndicator image rotation
Post by: Godra on August 22, 2016, 11:19:32 AM
This topic also shows possible code for image rotation:

http://advancedhmi.com/forum/index.php?topic=1429.0