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);
    }