1673 ! |
1673 ! |
1674 |
1674 |
1675 pasteExtent |
1675 pasteExtent |
1676 "paste the copied extent to all objects in the selection" |
1676 "paste the copied extent to all objects in the selection" |
1677 |
1677 |
|
1678 |heightToPaste widthToPaste| |
|
1679 |
1678 CopiedExtent notNil ifTrue:[ |
1680 CopiedExtent notNil ifTrue:[ |
1679 self transaction:#pasteExtent dimensionDo:[:v| |
1681 widthToPaste := CopiedExtent x. |
1680 self resize:v corner:(v computeOrigin + CopiedExtent) |
1682 heightToPaste := CopiedExtent y. |
|
1683 ] ifFalse:[ |
|
1684 CopiedLayout notNil ifTrue:[ |
|
1685 CopiedLayout leftFraction = CopiedLayout rightFraction ifTrue:[ |
|
1686 CopiedLayout topFraction = CopiedLayout bottomFraction ifTrue:[ |
|
1687 widthToPaste := (CopiedLayout rightOffset - CopiedLayout leftOffset). |
|
1688 heightToPaste := (CopiedLayout bottomOffset - CopiedLayout topOffset). |
|
1689 ] |
|
1690 ] |
|
1691 ]. |
|
1692 ]. |
|
1693 |
|
1694 widthToPaste notNil ifTrue:[ |
|
1695 heightToPaste notNil ifTrue:[ |
|
1696 self transaction:#pasteExtent dimensionDo:[:v| |
|
1697 self resize:v corner:(v computeOrigin + (widthToPaste@heightToPaste)) |
|
1698 ] |
1681 ] |
1699 ] |
1682 ] |
1700 ] |
1683 ! |
1701 ! |
1684 |
1702 |
1685 pasteHeight |
1703 pasteHeight |
1686 "paste the copied extent's height to all objects in the selection" |
1704 "paste the copied extent's height to all objects in the selection" |
1687 |
1705 |
|
1706 |heightToPaste| |
|
1707 |
1688 CopiedExtent notNil ifTrue:[ |
1708 CopiedExtent notNil ifTrue:[ |
|
1709 heightToPaste := CopiedExtent y. |
|
1710 ] ifFalse:[ |
|
1711 CopiedLayout notNil ifTrue:[ |
|
1712 CopiedLayout topFraction = CopiedLayout bottomFraction ifTrue:[ |
|
1713 heightToPaste := (CopiedLayout bottomOffset - CopiedLayout topOffset) |
|
1714 ] |
|
1715 ]. |
|
1716 ]. |
|
1717 |
|
1718 heightToPaste notNil ifTrue:[ |
1689 self transaction:#pasteHeight dimensionDo:[:v| |
1719 self transaction:#pasteHeight dimensionDo:[:v| |
1690 self resize:v bottom:(v computeOrigin + CopiedExtent y) |
1720 self resize:v bottom:(v computeOrigin + heightToPaste) |
1691 ] |
1721 ]. |
1692 ] |
1722 ^ self. |
|
1723 ]. |
|
1724 |
|
1725 |
|
1726 |
|
1727 |
|
1728 |
|
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 |
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
1693 ! |
1743 ! |
1694 |
1744 |
1695 pasteLayout |
1745 pasteLayout |
1696 "paste the layout to all objects in the selection" |
1746 "paste the layout to all objects in the selection" |
1697 |
1747 |
1703 ! |
1753 ! |
1704 |
1754 |
1705 pasteWidth |
1755 pasteWidth |
1706 "paste the copied extent's width to all objects in the selection" |
1756 "paste the copied extent's width to all objects in the selection" |
1707 |
1757 |
|
1758 |widthToPaste| |
|
1759 |
1708 CopiedExtent notNil ifTrue:[ |
1760 CopiedExtent notNil ifTrue:[ |
|
1761 widthToPaste := CopiedExtent x. |
|
1762 ] ifFalse:[ |
|
1763 CopiedLayout notNil ifTrue:[ |
|
1764 CopiedLayout leftFraction = CopiedLayout rightFraction ifTrue:[ |
|
1765 widthToPaste := (CopiedLayout rightOffset - CopiedLayout leftOffset) |
|
1766 ] |
|
1767 ]. |
|
1768 ]. |
|
1769 |
|
1770 widthToPaste notNil ifTrue:[ |
1709 self transaction:#pasteWidth dimensionDo:[:v| |
1771 self transaction:#pasteWidth dimensionDo:[:v| |
1710 self resize:v right:(v computeOrigin + CopiedExtent x) |
1772 self resize:v right:(v computeOrigin + widthToPaste) |
1711 ] |
1773 ] |
1712 ] |
1774 ] |
1713 ! |
1775 ! |
1714 |
1776 |
1715 setExtent:anExtent |
1777 setExtent:anExtent |