Working with Graphics

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Working with Graphics

Post by ZSasha » 19 Mar 2014 22:53

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Working with Graphics

Post by Martin » 20 Mar 2014 17:44

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

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: Working with Graphics

Post by ZSasha » 24 Apr 2014 03:04

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.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Working with Graphics

Post by Martin » 25 Apr 2014 07:36

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

Locked