equal
deleted
inserted
replaced
1660 "/ |
1660 "/ |
1661 "/ change scale to make the logo fit exactly |
1661 "/ change scale to make the logo fit exactly |
1662 "/ |
1662 "/ |
1663 scaleH := ((width - hSep) / (logo width)) asFloat. |
1663 scaleH := ((width - hSep) / (logo width)) asFloat. |
1664 scaleV := ((height - vSep) / (logo height)) asFloat. |
1664 scaleV := ((height - vSep) / (logo height)) asFloat. |
|
1665 scaleH <= 0 ifTrue:[scaleH := Float epsilon]. |
|
1666 scaleV <= 0 ifTrue:[scaleV := Float epsilon]. |
1665 self scale:(scaleH @ scaleV). |
1667 self scale:(scaleH @ scaleV). |
1666 x := transformation applyInverseScaleX:x. |
1668 x := transformation applyInverseScaleX:x. |
1667 y := transformation applyInverseScaleY:y. |
1669 y := transformation applyInverseScaleY:y. |
1668 ]. |
1670 ]. |
1669 |
1671 |
1696 "/ |
1698 "/ |
1697 "/ change scale to make the logo fit exactly |
1699 "/ change scale to make the logo fit exactly |
1698 "/ |
1700 "/ |
1699 scaleH := ((width - m2 - hSep) / (labelWidth - hSpace)) asFloat. |
1701 scaleH := ((width - m2 - hSep) / (labelWidth - hSpace)) asFloat. |
1700 scaleV := ((height - m2 - vSep) / (labelHeight - vSpace)) asFloat. |
1702 scaleV := ((height - m2 - vSep) / (labelHeight - vSpace)) asFloat. |
|
1703 scaleH <= 0 ifTrue:[scaleH := Float epsilon]. |
|
1704 scaleV <= 0 ifTrue:[scaleV := Float epsilon]. |
1701 |
1705 |
1702 self scale:(scaleH min:scaleV). |
1706 self scale:(scaleH min:scaleV). |
1703 x := transformation applyInverseScaleX:x. |
1707 x := transformation applyInverseScaleX:x. |
1704 stringLogo ifTrue:[ |
1708 stringLogo ifTrue:[ |
1705 y := y - font ascent + (transformation applyScaleY:font ascent). |
1709 y := y - font ascent + (transformation applyScaleY:font ascent). |
1825 ! ! |
1829 ! ! |
1826 |
1830 |
1827 !Label class methodsFor:'documentation'! |
1831 !Label class methodsFor:'documentation'! |
1828 |
1832 |
1829 version |
1833 version |
1830 ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.123 2004-02-26 12:19:37 cg Exp $' |
1834 ^ '$Header: /cvs/stx/stx/libwidg/Label.st,v 1.124 2004-05-07 12:12:57 stefan Exp $' |
1831 ! ! |
1835 ! ! |