original_string: public function add_comment_marker($pageno, $index, $x, $y, $link, $colour = 'yellow') {
          if (!$this->filename) {
              return false;
          }
  
          $fill = '';
          $fillopacity = 0.9;
          switch ($colour) {
              case 'red':
                  $fill = 'rgb(249, 181, 179)';
                  break;
              case 'green':
                  $fill = 'rgb(214, 234, 178)';
                  break;
              case 'blue':
                  $fill = 'rgb(203, 217, 237)';
                  break;
              case 'white':
                  $fill = 'rgb(255, 255, 255)';
                  break;
              case 'clear':
                  $fillopacity = 0;
                  break;
              default: /* Yellow */
                  $fill = 'rgb(255, 236, 174)';
          }
          $marker = '@<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.5 -0.5 12 12" preserveAspectRatio="xMinYMin meet">' .
                  '<path d="M11 0H1C.4 0 0 .4 0 1v6c0 .6.4 1 1 1h1v4l4-4h5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z" fill="' . $fill . '" ' .
                  'fill-opacity="' . $fillopacity . '" stroke="rgb(153, 153, 153)" stroke-width="0.5"/></svg>';
          $label = get_string('commentlabel', 'assignfeedback_editpdf', array('pnum' => $pageno + 1, 'cnum' => $index + 1));
  
          $x *= $this->scale;
          $y *= $this->scale;
          $size = 24 * $this->scale;
          $this->SetDrawColor(51, 51, 51);
          $this->SetFontSize(10 * $this->scale);
          $this->setPage($pageno + 1);
  
          // Add the marker image.
          $this->ImageSVG($marker, $x - 0.5, $y - 0.5, $size, $size, $link);
  
          // Add the label.
          $this->MultiCell($size * 0.95, 0, $label, 0, 'C', false, 1, $x, $y, true, 0, false, true, $size * 0.60, 'M', true);
  
          return true;
      }
code: public function add_comment_marker($pageno, $index, $x, $y, $link, $colour = 'yellow') {
          if (!$this->filename) {
              return false;
          }
  
          $fill = '';
          $fillopacity = 0.9;
          switch ($colour) {
              case 'red':
                  $fill = 'rgb(249, 181, 179)';
                  break;
              case 'green':
                  $fill = 'rgb(214, 234, 178)';
                  break;
              case 'blue':
                  $fill = 'rgb(203, 217, 237)';
                  break;
              case 'white':
                  $fill = 'rgb(255, 255, 255)';
                  break;
              case 'clear':
                  $fillopacity = 0;
                  break;
              default: /* Yellow */
                  $fill = 'rgb(255, 236, 174)';
          }
          $marker = '@<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.5 -0.5 12 12" preserveAspectRatio="xMinYMin meet">' .
                  '<path d="M11 0H1C.4 0 0 .4 0 1v6c0 .6.4 1 1 1h1v4l4-4h5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z" fill="' . $fill . '" ' .
                  'fill-opacity="' . $fillopacity . '" stroke="rgb(153, 153, 153)" stroke-width="0.5"/></svg>';
          $label = get_string('commentlabel', 'assignfeedback_editpdf', array('pnum' => $pageno + 1, 'cnum' => $index + 1));
  
          $x *= $this->scale;
          $y *= $this->scale;
          $size = 24 * $this->scale;
          $this->SetDrawColor(51, 51, 51);
          $this->SetFontSize(10 * $this->scale);
          $this->setPage($pageno + 1);
  
          // Add the marker image.
          $this->ImageSVG($marker, $x - 0.5, $y - 0.5, $size, $size, $link);
  
          // Add the label.
          $this->MultiCell($size * 0.95, 0, $label, 0, 'C', false, 1, $x, $y, true, 0, false, true, $size * 0.60, 'M', true);
  
          return true;
      }
code_tokens: public function add_comment_marker ( $ pageno , $ index , $ x , $ y , $ link , $ colour = 'yellow' ) { if ( ! $ this -> filename ) { return false ; } $ fill = '' ; $ fillopacity = 0.9 ; switch ( $ colour ) { case 'red' : $ fill = 'rgb(249, 181, 179)' ; break ; case 'green' : $ fill = 'rgb(214, 234, 178)' ; break ; case 'blue' : $ fill = 'rgb(203, 217, 237)' ; break ; case 'white' : $ fill = 'rgb(255, 255, 255)' ; break ; case 'clear' : $ fillopacity = 0 ; break ; default : /* Yellow */ $ fill = 'rgb(255, 236, 174)' ; } $ marker = '@<svg xmlns="http://www.w3.org/2000/svg" viewBox="-0.5 -0.5 12 12" preserveAspectRatio="xMinYMin meet">' . '<path d="M11 0H1C.4 0 0 .4 0 1v6c0 .6.4 1 1 1h1v4l4-4h5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z" fill="' . $ fill . '" ' . 'fill-opacity="' . $ fillopacity . '" stroke="rgb(153, 153, 153)" stroke-width="0.5"/></svg>' ; $ label = get_string ( 'commentlabel' , 'assignfeedback_editpdf' , array ( 'pnum' => $ pageno + 1 , 'cnum' => $ index + 1 ) ) ; $ x *= $ this -> scale ; $ y *= $ this -> scale ; $ size = 24 * $ this -> scale ; $ this -> SetDrawColor ( 51 , 51 , 51 ) ; $ this -> SetFontSize ( 10 * $ this -> scale ) ; $ this -> setPage ( $ pageno + 1 ) ; // Add the marker image. $ this -> ImageSVG ( $ marker , $ x - 0.5 , $ y - 0.5 , $ size , $ size , $ link ) ; // Add the label. $ this -> MultiCell ( $ size * 0.95 , 0 , $ label , 0 , 'C' , false , 1 , $ x , $ y , true , 0 , false , true , $ size * 0.60 , 'M' , true ) ; return true ; }
docstring: Add a comment marker to the specified page.
  
  @param int $pageno The page number to add markers to (starting at 0).
  @param int $index The comment index.
  @param int $x The x-coordinate of the marker (in pixels).
  @param int $y The y-coordinate of the marker (in pixels).
  @param int $link The link identifier pointing to the full comment text.
  @param string $colour The fill colour of the marker (red, yellow, green, blue, white, clear).
  @return bool Success status.
docstring_tokens: Add a comment marker to the specified page .