mPDF Manual – mPDF functions

RoundedRect()

void RoundedRect( float $x, float $y, float $w, float $h, float $radius [, string $style])

Draws a rectangle with rounded corners directly to the PDF document at the specified position.

Parameters

$x

Abscissa of left edge of box - value in millimeters

$y

Ordinate of top edge of box - value in millimeters

$w

Width of the box - in millimeters

$h

Width of the box - in millimeters

$radius

Radius of the rounded corners

$style

Box style

Values:

  • 'D' or empty string - draw border (default);
  • 'F' - fill;
  • 'DF' or 'FD' - draw and fill

Default: '' i.e. border, no fill

Fork me on GitHub