Menu

#108 X/Y, Row/Column

open-fixed
API (20)
5
2008-02-05
2002-11-26
James Smith
No

Point2dC and Vector2dC (and maybe others) store their
coordinates in row,column format. However, the access
functions are X() and Y(), in that order. This means
that X() gives the row coordinate, and Y() gives the
column coord. This it totally counter-intuitive and
confusing. Perhaps these classes should have Row() and
Col() accessors, and X() and Y() could be reversed.

Discussion

  • James Smith

    James Smith - 2003-01-08

    Logged In: YES
    user_id=194054

    I think in fact that the X() and Y() functions will be
    completely removed to avoid breaking code subtly, and
    replaced with only Row() and Col().

     
  • James Smith

    James Smith - 2003-01-24
    • assigned_to: nobody --> vap-james
     
  • James Smith

    James Smith - 2003-04-03

    Logged In: YES
    user_id=194054

    This is in progress - Row() and Col() accessors for Point2dC
    have been added, and X() and Y() will be removed from both
    Point2dC and Vector2dC in the near future.

     
  • Bill Christmas

    Bill Christmas - 2003-06-06

    Logged In: YES
    user_id=231365

    This "feature" was an innovation of Radek. It is
    well-explained in the documentation. The idea was that:
    a) you get a counter-clockwise coordinate system, consistent
    with mathematics throughout the world
    b) we talk about Row/Col, X/Y, [0]/[1] i.e. whichever we
    use, the vertical one is the 1st of the pair, & the 2nd the
    horizontal one.
    c) the image processing community does not have a standard
    anyway. E.g. TV people use x right, y down, whereas
    Postscript uses x right, y up.

    I argued with him considerably at the time, but eventually
    decided he had a point.
    Cheers,
    Bill.

     
  • Bill Christmas

    Bill Christmas - 2008-02-05
    • status: open --> open-fixed