<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>In particular, when it comes to LayoutFrames, I have to say that I find the automatic rounding behaviors of Point/Rectangle quite confusing.</p>
<p><br>
</p>
<p>For instance, why does #scaleBy: allow producing float points/rectangles whereas #scaleFrom:to: applies rounding?</p>
<p>In my opinion, the integer/float arithmetic of Point and Rectangle is not really clear. If these classes are intended containing integers only, the "truncation and round off" protocol would be redundant. If they are intended to contain floats as well, it
 is confusing that methods such as #center and #aboveCenter apply rounding. Would it be possible and wise to eliminate that automatic rounding behavior, or is too old and popular for such a breaking change?</p>
<p><br>
</p>
<p>See also this related discussion: <a href="http://forum.world.st/The-Inbox-Graphics-cbc-372-mcz-td4940274.html" class="x_OWAAutoLink" id="LPlnk856513">http://forum.world.st/The-Inbox-Graphics-cbc-372-mcz-td4940274.html</a></p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="x_divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="x__rp_T4" id="x_Item.MessagePartBody"><br>
<div class="x__rp_U4 x_ms-font-weight-regular x_ms-font-color-neutralDark x_rpHighlightAllClass x_rpHighlightBodyClass" id="x_Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="x_divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="x_Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont"></font></div>
</div>
</font></div>
</div>
</div>
</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Best,</div>
<div class="x__rp_T4" id="x_Item.MessagePartBody">Christoph</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Montag, 24. August 2020 13:26:55<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Graphics-ct.437.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Christoph Thiede uploaded a new version of Graphics to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Graphics-ct.437.mcz">http://source.squeak.org/inbox/Graphics-ct.437.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Graphics-ct.437<br>
Author: ct<br>
Time: 24 August 2020, 1:26:40.516818 pm<br>
UUID: 66c6c2fd-6978-6d43-8eda-c22f0a5defca<br>
Ancestors: Graphics-kfr.436<br>
<br>
Proposal: Add Point >> #exactCenter:, complementing Graphics-cbc.372. Refine relevant method comments in Point and Rectangle.<br>
<br>
Usage example:<br>
<br>
        m := Morph new.<br>
        m changeProportionalLayout.<br>
        <br>
        n := Morph new.<br>
        n color: Color red.<br>
        m addMorph: n fullFrame: (LayoutFrame fractions: (<br>
                0.5 @ 0.25 exactCenter: 0.5 @ 0.5)).<br>
        <br>
        m openInHand.<br>
<br>
=============== Diff against Graphics-kfr.436 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Point>>center: (in category 'converting to rectangle') -----<br>
  center: aPoint <br>
+        "Answer a Rectangle whose extent is the receiver and whose center is approximately aPoint (after rounding to integers). This is one of the infix ways of expressing the creation of a rectangle."<br>
-        "Answer a Rectangle whose extent is the receiver and whose center is <br>
-        aPoint. This is one of the infix ways of expressing the creation of a <br>
-        rectangle."<br>
  <br>
+        ^ Rectangle center: aPoint extent: self!<br>
-        ^Rectangle center: aPoint extent: self!<br>
<br>
Item was added:<br>
+ ----- Method: Point>>exactCenter: (in category 'converting to rectangle') -----<br>
+ exactCenter: aPoint <br>
+        "Answer a Rectangle whose extent is the receiver and whose center is exactly aPoint. This is one of the infix ways of expressing the creation of a rectangle."<br>
+ <br>
+        ^ Rectangle exactCenter: aPoint extent: self!<br>
<br>
Item was changed:<br>
  ----- Method: Rectangle class>>center:extent: (in category 'instance creation') -----<br>
  center: centerPoint extent: extentPoint <br>
+        "Answer an instance of me whose center is approximately centerPoint (after rounding to integers) and whose extent is extentPoint."<br>
-        "Answer an instance of me whose center is centerPoint and width <br>
-        by height is extentPoint.  "<br>
  <br>
+        ^ self origin: centerPoint - (extentPoint // 2) extent: extentPoint!<br>
-        ^self origin: centerPoint - (extentPoint//2) extent: extentPoint!<br>
<br>
Item was changed:<br>
  ----- Method: Rectangle class>>exactCenter:extent: (in category 'instance creation') -----<br>
  exactCenter: centerPoint extent: extentPoint <br>
+        "Answer an instance of me whose center is exactly centerPoint and whose extent is extentPoint."<br>
+ <br>
-        "Answer an instance of me whose center is centerPoint and width <br>
-        by height is extentPoint. "<br>
         ^ self origin: centerPoint - (extentPoint / 2) extent: extentPoint<br>
  !<br>
<br>
<br>
</div>
</span></font>
</body>
</html>