Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Questions and Answers >> Resizing adornments & maintaining relative positio
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1469803313

Message started by Derek Van Ittersum on Jul 29th, 2016, 10:41am

Title: Resizing adornments & maintaining relative positio
Post by Derek Van Ittersum on Jul 29th, 2016, 10:41am

So I've been working on a map and now realized I've made the adornments too small. It's time to make all the adornments larger and I'm wondering if there's some automated way to select them all and make them 3 times as big while maintaining their relative positions to each other. Bonus points if this works with notes too (I have many notes that are overlapping two adornments and am looking to maintain their positions).

Clearly I can do this manually without too much fuss, but just curious if anyone has approached this programmatically yet. Would be useful for future cases.

Title: Re: Resizing adornments & maintaining relative positio
Post by Mark Anderson on Jul 29th, 2016, 11:51am

Note that $Height and $Width so the seeming easy route - using a common prototype is hard. Plus, agents never match adornments (story for another day).  Best route is a stamp with the code:

$Height = ($Height * 3);
$Width = ($Width * 3);


Then select all the adornments/notes as required and apply the stamp.

For notes only, you could use an agent with a query finding all the desired notes and this action:

$Height(original) = ($Height(original) * 3);
$Width(original) = ($Width(original) * 3);



Title: Re: Resizing adornments & maintaining relative positio
Post by Derek Van Ittersum on Jul 29th, 2016, 12:45pm

This does work to enlarge them all at the same time, but they don't keep their relative positions--adornments that were bordering each other prior to the stamp overlap after the stamp. Which is what I expected. Was just curious if there was some way to use XPos /YPos or similar to maintain relative positioning with regard to other adornments.

Title: Re: Resizing adornments & maintaining relative positio
Post by Mark Anderson on Jul 29th, 2016, 1:34pm

I don't think there's a way to make items not overlap whilst resizing.  There isn't an overlap-aware operator AFAIK.

Title: Re: Resizing adornments & maintaining relative positio
Post by Mark Bernstein on Jul 31st, 2016, 7:38pm

If you have a way of finding the adjacent adornment -- if it's the elder sibling, perhaps -- your stamp could set

     $Xpos = $Xpos(previousSibling)+0.5;

Some better tools for this are coming (in part already available backstage).  

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.