SBIO Cluster Demo

Crank Storyboard Designer samples and code snippets.

Moderator: jamiev

SBIO Cluster Demo

Postby atinir » Wed Mar 08, 2017 12:57 pm


In the sample SBIO Cluster Demo
SBIO_Cluster_Demo.jpg (53.48 KiB) Viewed 6897 times
is it possible to get the x,y position of the red arrow(image pointer_speedometer2.png) that is moving. This image Is located in control pointer_speedometer .

With this code I get the angle

local data = {}
print("Arrow X"..data1["speedometer.pointer_speedometer.rot"])

In the properties of the control there is a position x=140 and y=0. It seems they are fixed. I need the x,y position of red arrow as it moves.

Thank you :)

All the best,
Posts: 25
Joined: Thu Apr 21, 2016 9:20 am

Re: SBIO Cluster Demo

Postby mlove » Fri Mar 17, 2017 12:32 pm


That sample doesn't change the x and y position of the image render extension. What is happening is the image is being rotated around a point in the center of the control. The exact x and y position for where that image is rendered isn't available, this is calculated during the rendering of the image render extension. Is there a particular reason you need these coordinates?


Matt L
Posts: 24
Joined: Tue Apr 17, 2012 1:26 pm

Re: SBIO Cluster Demo

Postby atinir » Wed Mar 22, 2017 4:29 am

Hi Matt,

Thank you for your reply. Yes, I really need the x,y position of the tip of the arrow because I need to track how the arrow position changes.

In order to solve this, since I always can get the angle of rotation, I used this angle and trigonometric functions to find x,y position.
This mathematical manipulation worked for me.

local redArrowAngle=gre.get_data("ArrowLayer.redArrowTop.rot")
local redArrowRadian=math.rad(redArrowAngle["ArrowLayer.redArrowTop.rot"])
local redArrowHeight =gre.get_control_attrs("ArrowLayer.redArrowTop","height")
local redArrowWidth =gre.get_control_attrs("ArrowLayer.redArrowTop","width")
local redArrowControlX, redArrowControlY
local pointer_speedometer2Height =111

Posts: 25
Joined: Thu Apr 21, 2016 9:20 am

Re: SBIO Cluster Demo

Postby saiteja » Fri Sep 15, 2017 1:47 am

How the front end App and back end App is communicating?
How the storyboard I/O is registering for the external events?
How actually storyboard I/O is working with the frontend and backend(external cpp file)?
How the event mapping was happening at both the front end and back end?
Posts: 3
Joined: Thu Sep 14, 2017 4:12 am

Re: SBIO Cluster Demo

Postby rdowdall » Fri Sep 15, 2017 8:24 am

Hello Saiteja

Please have a read through this document: ... 02s02.html

For information about how events are communicated through Storyboard and external applications. Designer allows you to create events dynamically. For more information on how events are registered and setup, please see this document: ... /ch24.html

To add in a custom event to Designer, first read this: ... /ch07.html

To add your custom action, you can open up the "Add Action" dialog, which will look like this:


Click on the add button, and this will bring up a new dialog that will allow you to create your new action.

Posts: 125
Joined: Mon Nov 02, 2009 9:46 pm

Return to Samples

Who is online

Users browsing this forum: No registered users and 1 guest