final public static function getAlignedPos(Base $object, $newHalign, $newValign)
    {
        $newPosX = self::getAlignedPosX(
                $object->getPosnX(), $object->getRealSizeX(), $object->getHalign(), $newHalign);
        $newPosY = self::getAlignedPosY(
                $object->getPosnY(), $object->getRealSizeY(), $object->getValign(), $newValign);
        return array('x' => $newPosX, 'y' => $newPosY);
    }
final public static function getAlignedPos(Base $object, $newHalign, $newValign)
    {
        $newPosX = self::getAlignedPosX(
                $object->getPosnX(), $object->getRealSizeX(), $object->getHalign(), $newHalign);
        $newPosY = self::getAlignedPosY(
                $object->getPosnY(), $object->getRealSizeY(), $object->getValign(), $newValign);
        return array('x' => $newPosX, 'y' => $newPosY);
    }
final public static function getAlignedPos ( Base $ object , $ newHalign , $ newValign ) { $ newPosX = self :: getAlignedPosX ( $ object -> getPosnX ( ) , $ object -> getRealSizeX ( ) , $ object -> getHalign ( ) , $ newHalign ) ; $ newPosY = self :: getAlignedPosY ( $ object -> getPosnY ( ) , $ object -> getRealSizeY ( ) , $ object -> getValign ( ) , $ newValign ) ; return array ( 'x' => $ newPosX , 'y' => $ newPosY ) ; }
Returns the position of an element in relation to another element and
according to their respective alignments

@param Base Parent element
@param string Horizontal alignement of the element you want to place
@param string Vertical alignement of the element you want to place
@return array Calculated position of the element you want to place. The
array contains 2 elements with "x" and "y" indexes
Returns the position of an element in relation to another element and according to their respective alignments