/// <summary>
/// Sets the item's position according to its tikzitem's value
/// </summary>
public override bool AdjustPosition(double Resolution)
{
Rect r = new Rect(0, 0, 0, 0);
bool hasone = false;
foreach (OverlayShape o in children)
{
o.AdjustPosition(Resolution);
Rect rr = o.View.GetBB();
if (hasone)
r.Union(rr);
else
{
r = rr;
hasone = true;
}
}
if (hasone)
{
r.Inflate(20, 20);
//r = new Rect(10, 10, 100, 100);
View.SetSize( r.Width, r.Height);
View.SetPosition(r.X, r.Y);
return true;
}
else return false;
}