Hi Martin,
Any plans to introduce some functions to work with graphics?
Draw dots, lines, rectangles, ellipses etc with different colours would be great to start with.
I was thinking about making some battery-analyser flow but now it won't be able to draw any diagrams - text only which is not a perfect solution.
Thanks.
Working with Graphics
Moderator: Martin
Re: Working with Graphics
Hi,
You could create a custom widget to show some values graphically: http://automagic4android.com/en/help/cr ... tom-widget
Script function setWidgetElementProperty allows to modify most aspects of the appearance of the elements placed on a widget from a flow (color, size, position etc.).
For example you could modify the width of a rectangle to show the remaining battery level or use an ellipse element with property Arc checked to show a simple pie chart.
Regards,
Martin
You could create a custom widget to show some values graphically: http://automagic4android.com/en/help/cr ... tom-widget
Script function setWidgetElementProperty allows to modify most aspects of the appearance of the elements placed on a widget from a flow (color, size, position etc.).
For example you could modify the width of a rectangle to show the remaining battery level or use an ellipse element with property Arc checked to show a simple pie chart.
Regards,
Martin
Re: Working with Graphics
Okay, it may work. But so far we can get and set some properties that had been defined first.
Is it possible to dynamically create/delete some elements on a custom widget?
Let's say I want to draw some simple line graphs but I don't know how many lines I need so I want to be able to add or remove elements when necessary.
Thanks.
Is it possible to dynamically create/delete some elements on a custom widget?
Let's say I want to draw some simple line graphs but I don't know how many lines I need so I want to be able to add or remove elements when necessary.
Thanks.
Re: Working with Graphics
Hi,
Creating/deleting elements is not supported yet but I can add it to the todo-list.
You could create a few lines with a width of 0 manually and then use a script to change the width to the desired value when you want to show the line element.
Regards,
Martin
Creating/deleting elements is not supported yet but I can add it to the todo-list.
You could create a few lines with a width of 0 manually and then use a script to change the width to the desired value when you want to show the line element.
Regards,
Martin