Setting node positions with c++

The engine.
Post Reply
wjaeger
Posts: 7
Joined: Thu Aug 13, 2015 10:50 am

Setting node positions with c++

Post by wjaeger »

Hi all,

I'm looking for a way to specify the layout of my network, i.e. the node positions. I found SetNodePosition() for JSMILE, but I couldn't find an equivalent function in SMILE. Is it possible to provide coordinates for a node's position with c++?

Thanks!

Wiebke
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Setting node positions with c++

Post by shooltz[BayesFusion] »

Is it possible to provide coordinates for a node's position with c++?
Follow the code snippet below. Yes, we know this is totally counterintuitive 8)

Code: Select all

DSL_node *node = net.GetNode(handle);
DSL_rectangle &pos = node->Info().Screen().position;
pos.center_X = xcenter;
pos.center_Y = ycenter;
pos.width = width;
pos.height = height;
wjaeger
Posts: 7
Joined: Thu Aug 13, 2015 10:50 am

Re: Setting node positions and colours with c++

Post by wjaeger »

Is there a similar way of setting node colours?

Thanks.
Post Reply