public final function drawSingleBorder( $borderColor, bool $internal = true )
      : IImage
   {

      $borderColor = $this->getGdColorObject( $borderColor, 'bordercolor' );

      if ( $internal )
      {

         \imagerectangle( $this->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );

         return $this;

      }

      $res = clone $this;
      \imagerectangle( $res->r, 1, 1, $this->getWidth() - 2, $this->getHeight() - 2, $borderColor->getGdValue() );

      return $res;

   }