localPointToGlobal Overload Request


Hi Jules,

Would you mind adding a convenience method for Component? It would save lots of pointless typing.

Point<int> Component::localPointToGlobal (const int x, const int y) const
    return ComponentHelpers::convertCoordinate (nullptr, this, Point<int>(x, y));


Well… no, not keen on that… I’ve been trying hard to avoid raw coordinates where possible, and to encourage the use of Point.

If you’re finding such a small thing enough of a hassle to post about it, then you must be calling localPointToGlobal a whole lot of times… and whenever you find yourself calling the same function many times, that’s generally means there’s a “repeated code” smell going on… Might be a good idea to look at refactoring your code, maybe wrapping the method call in your own function to remove some of the repeated code.


Had a feeling you were gonna say “refactor”! Fair 'nuff