void CDiagramEntityContainer::MakeSameSizeSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double width = obj->GetRight() - obj->GetLeft();
			double height = obj->GetBottom() - obj->GetTop();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				obj->SetRect( obj->GetLeft(), obj->GetTop(), obj->GetLeft() + width, obj->GetTop() + height );
			}

		}
		SetModified( TRUE );
	}
}
void CDiagramEntityContainer::BottomAlignSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double bottom = obj->GetBottom();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				double height = obj->GetBottom() - obj->GetTop();
				double top = bottom - height;
				obj->SetRect( obj->GetLeft(), top, obj->GetRight(), bottom );
			}

		}
		SetModified( TRUE );
	}
}
void CDiagramEntityContainer::RightAlignSelected()
{
	if( GetSelectCount() > 1 )
	{
		CDiagramEntity* obj = GetSelectedObject();
		if( obj )
		{
			double right = obj->GetRight();
			int count = 0;
			while (obj = GetAt( count++ ))
			{
				if (!obj->IsSelected()) continue;
				double width = obj->GetRight() - obj->GetLeft();
				double left = right - width;
				obj->SetRect( left, obj->GetTop(), right, obj->GetBottom() );
			}

		}
		SetModified( TRUE );
	}
}
Пример #4
0
func Script211()
{
	if (GetSelectCount(0)<3) return(goto(211));
	SetPlrShowControl(0,"012345678_012345678 __________");
	TutorialMessage("$TxtNowmoveallclonksback$");
}