Ticket #7 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Translate causes incorrect bounds.

Reported by: fryguybob@… Owned by:
Priority: major Milestone:
Component: core Version:
Keywords: Cc:


For cases where the translation keeps the origin inside the bounds I would expect translate and rebase to behave the same:

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

Currently this gives:

*Main> test (box :: Diagram Cairo)
t = 1.222222222222222, r = 1.1

Change History

Changed 7 years ago by byorgey

  • status changed from new to closed
  • resolution set to fixed

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.

Note: See TracTickets for help on using tickets.