original_string: public final function drawText(
        string $text, $font, $fontSize, $color, Point $point, bool $internal = true )
        : IImage
     {
  
        $color = $this->getGdColorObject( $color, 'textcolor' );
  
        if ( ! empty( $font ) && \file_exists( $font ) )
        {
           if ( $internal )
           {
              \imagettftext( $this->r, $fontSize, 0, $point->x, $point->y, $color->getGdValue(), $font, $text );
              return $this;
           }
           $res = clone $this;
           \imagettftext( $res->r, $fontSize, 0, $point->x, $point->y, $color->getGdValue(), $font, $text );
           return $res;
        }
        
        if ( $internal )
        {
           \imagestring( $this->r, $fontSize, $point->x, $point->y, $text, $color->getGdValue() );
           return $this;
        }
        
        $res = clone $this;
        \imagestring( $res->r, $fontSize, $point->x, $point->y, $text, $color->getGdValue() );
        
        return $res;
        
     }
code: public final function drawText(
        string $text, $font, $fontSize, $color, Point $point, bool $internal = true )
        : IImage
     {
  
        $color = $this->getGdColorObject( $color, 'textcolor' );
  
        if ( ! empty( $font ) && \file_exists( $font ) )
        {
           if ( $internal )
           {
              \imagettftext( $this->r, $fontSize, 0, $point->x, $point->y, $color->getGdValue(), $font, $text );
              return $this;
           }
           $res = clone $this;
           \imagettftext( $res->r, $fontSize, 0, $point->x, $point->y, $color->getGdValue(), $font, $text );
           return $res;
        }
        
        if ( $internal )
        {
           \imagestring( $this->r, $fontSize, $point->x, $point->y, $text, $color->getGdValue() );
           return $this;
        }
        
        $res = clone $this;
        \imagestring( $res->r, $fontSize, $point->x, $point->y, $text, $color->getGdValue() );
        
        return $res;
        
     }
code_tokens: public final function drawText ( string $ text , $ font , $ fontSize , $ color , Point $ point , bool $ internal = true ) : IImage { $ color = $ this -> getGdColorObject ( $ color , 'textcolor' ) ; if ( ! empty ( $ font ) && \ file_exists ( $ font ) ) { if ( $ internal ) { \ imagettftext ( $ this -> r , $ fontSize , 0 , $ point -> x , $ point -> y , $ color -> getGdValue ( ) , $ font , $ text ) ; return $ this ; } $ res = clone $ this ; \ imagettftext ( $ res -> r , $ fontSize , 0 , $ point -> x , $ point -> y , $ color -> getGdValue ( ) , $ font , $ text ) ; return $ res ; } if ( $ internal ) { \ imagestring ( $ this -> r , $ fontSize , $ point -> x , $ point -> y , $ text , $ color -> getGdValue ( ) ) ; return $ this ; } $ res = clone $ this ; \ imagestring ( $ res -> r , $ fontSize , $ point -> x , $ point -> y , $ text , $ color -> getGdValue ( ) ) ; return $ res ; }
docstring: Draws a text at declared position into current image.
  
  @param  string $text       The text that should be drawn.
  @param  string $font       The font that should be used. For example: For GdImage you can define here
  the path of the *.ttf font file or NULL. If you define null the parameter
  $fontSize declares the size + font (1-4). If a path is defined here $fontSize
  should declare the size in points.
  @param  int    $fontSize   The size of the font.
  @param  string|array|\Beluga\Drawing\Color|\Beluga\Drawing\ColorGD $color The text color
  @param  \Beluga\Drawing\Point                                      $point The top left point where to start the text
  @param  bool   $internal   Do not create a new instance?
  @return \Beluga\Drawing\Image\IImage
docstring_tokens: Draws a text at declared position into current image .