original_string: public function align($position, $offset_x = 0, $offset_y = 0)
      {
          switch (strtolower($position)) {
  
              case 'top':
              case 'top-center':
              case 'top-middle':
              case 'center-top':
              case 'middle-top':
                  $x = intval($this->width / 2);
                  $y = 0 + $offset_y;
                  break;
  
              case 'top-right':
              case 'right-top':
                  $x = $this->width - $offset_x;
                  $y = 0 + $offset_y;
                  break;
  
              case 'left':
              case 'left-center':
              case 'left-middle':
              case 'center-left':
              case 'middle-left':
                  $x = 0 + $offset_x;
                  $y = intval($this->height / 2);
                  break;
  
              case 'right':
              case 'right-center':
              case 'right-middle':
              case 'center-right':
              case 'middle-right':
                  $x = $this->width - $offset_x;
                  $y = intval($this->height / 2);
                  break;
  
              case 'bottom-left':
              case 'left-bottom':
                  $x = 0 + $offset_x;
                  $y = $this->height - $offset_y;
                  break;
  
              case 'bottom':
              case 'bottom-center':
              case 'bottom-middle':
              case 'center-bottom':
              case 'middle-bottom':
                  $x = intval($this->width / 2);
                  $y = $this->height - $offset_y;
                  break;
  
              case 'bottom-right':
              case 'right-bottom':
                  $x = $this->width - $offset_x;
                  $y = $this->height - $offset_y;
                  break;
  
              case 'center':
              case 'middle':
              case 'center-center':
              case 'middle-middle':
                  $x = intval($this->width / 2);
                  $y = intval($this->height / 2);
                  break;
  
              default:
              case 'top-left':
              case 'left-top':
                  $x = 0 + $offset_x;
                  $y = 0 + $offset_y;
                  break;
          }
  
          $this->pivot->setPosition($x, $y);
  
          return $this;
      }
code: public function align($position, $offset_x = 0, $offset_y = 0)
      {
          switch (strtolower($position)) {
  
              case 'top':
              case 'top-center':
              case 'top-middle':
              case 'center-top':
              case 'middle-top':
                  $x = intval($this->width / 2);
                  $y = 0 + $offset_y;
                  break;
  
              case 'top-right':
              case 'right-top':
                  $x = $this->width - $offset_x;
                  $y = 0 + $offset_y;
                  break;
  
              case 'left':
              case 'left-center':
              case 'left-middle':
              case 'center-left':
              case 'middle-left':
                  $x = 0 + $offset_x;
                  $y = intval($this->height / 2);
                  break;
  
              case 'right':
              case 'right-center':
              case 'right-middle':
              case 'center-right':
              case 'middle-right':
                  $x = $this->width - $offset_x;
                  $y = intval($this->height / 2);
                  break;
  
              case 'bottom-left':
              case 'left-bottom':
                  $x = 0 + $offset_x;
                  $y = $this->height - $offset_y;
                  break;
  
              case 'bottom':
              case 'bottom-center':
              case 'bottom-middle':
              case 'center-bottom':
              case 'middle-bottom':
                  $x = intval($this->width / 2);
                  $y = $this->height - $offset_y;
                  break;
  
              case 'bottom-right':
              case 'right-bottom':
                  $x = $this->width - $offset_x;
                  $y = $this->height - $offset_y;
                  break;
  
              case 'center':
              case 'middle':
              case 'center-center':
              case 'middle-middle':
                  $x = intval($this->width / 2);
                  $y = intval($this->height / 2);
                  break;
  
              default:
              case 'top-left':
              case 'left-top':
                  $x = 0 + $offset_x;
                  $y = 0 + $offset_y;
                  break;
          }
  
          $this->pivot->setPosition($x, $y);
  
          return $this;
      }
code_tokens: public function align ( $ position , $ offset_x = 0 , $ offset_y = 0 ) { switch ( strtolower ( $ position ) ) { case 'top' : case 'top-center' : case 'top-middle' : case 'center-top' : case 'middle-top' : $ x = intval ( $ this -> width / 2 ) ; $ y = 0 + $ offset_y ; break ; case 'top-right' : case 'right-top' : $ x = $ this -> width - $ offset_x ; $ y = 0 + $ offset_y ; break ; case 'left' : case 'left-center' : case 'left-middle' : case 'center-left' : case 'middle-left' : $ x = 0 + $ offset_x ; $ y = intval ( $ this -> height / 2 ) ; break ; case 'right' : case 'right-center' : case 'right-middle' : case 'center-right' : case 'middle-right' : $ x = $ this -> width - $ offset_x ; $ y = intval ( $ this -> height / 2 ) ; break ; case 'bottom-left' : case 'left-bottom' : $ x = 0 + $ offset_x ; $ y = $ this -> height - $ offset_y ; break ; case 'bottom' : case 'bottom-center' : case 'bottom-middle' : case 'center-bottom' : case 'middle-bottom' : $ x = intval ( $ this -> width / 2 ) ; $ y = $ this -> height - $ offset_y ; break ; case 'bottom-right' : case 'right-bottom' : $ x = $ this -> width - $ offset_x ; $ y = $ this -> height - $ offset_y ; break ; case 'center' : case 'middle' : case 'center-center' : case 'middle-middle' : $ x = intval ( $ this -> width / 2 ) ; $ y = intval ( $ this -> height / 2 ) ; break ; default : case 'top-left' : case 'left-top' : $ x = 0 + $ offset_x ; $ y = 0 + $ offset_y ; break ; } $ this -> pivot -> setPosition ( $ x , $ y ) ; return $ this ; }
docstring: Aligns current size's pivot point to given position
  and moves point automatically by offset.
  
  @param  string  $position
  @param  int     $offset_x
  @param  int     $offset_y
  @return \Intervention\Image\Size
docstring_tokens: Aligns current size s pivot point to given position and moves point automatically by offset .