src/Beluga/Drawing/Image/GdImage.php
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;

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

   }
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 ; }
Draws a single border with defined color around the image.

@param  string|array|\Beluga\Drawing\ColorGD|\Beluga\Drawing\Color $borderColor
@param  bool                                                       $internal    Do not create a new instance?
@return \Beluga\Drawing\Image\IImage
Draws a single border with defined color around the image .