diagrams: Ticket #7: Translate causes incorrect bounds.
http://trac.haskell.org/diagrams/ticket/7
<p>
For cases where the translation keeps the origin inside the bounds I would expect <tt>translate</tt> and <tt>rebase</tt> to behave the same:
</p>
<pre class="wiki">test d = do
putStrLn $ "t = " ++ show t ++ ", r = " ++ show r
return $ t == r
where t = bt (1,0)
r = br (1,0)
(Bounds bt) = bounds dt
(Bounds br) = bounds dr
dt = translate (0.1, 0) d
dr = rebase (Const (-0.1, 0)) d
</pre><p>
Currently this gives:
</p>
<pre class="wiki">*Main> test (box :: Diagram Cairo)
t = 1.222222222222222, r = 1.1
False
</pre>en-usdiagramshttp://trac.haskell.org/diagrams/chrome/common/trac_banner.png
http://trac.haskell.org/diagrams/ticket/7
Trac 0.11.1byorgeyWed, 24 Nov 2010 17:58:54 GMTcomment added; resolution set; status changed
http://trac.haskell.org/diagrams/ticket/7#comment:1
http://trac.haskell.org/diagrams/ticket/7#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
</ul>
<p>
This now works properly. The problem was that bounding regions were being transformed improperly by transformations involving translation, since the input vectors were being "translated" even though they ought to be invariant under translation. This is now fixed.
</p>
Ticket