public function border($w)
{
$rect = $this->resource->addChild('rect');
$rect->addAttribute('x', '0px');
$rect->addAttribute('y', '0px');
$rect->addAttribute('width', $this->width . $this->units);
$rect->addAttribute('height', $this->height . $this->units);
$color = null !== $this->strokeColor ? $this->strokeColor : new Rgb(0, 0, 0);
$rect->addAttribute('stroke', $color->get(3, true));
$rect->addAttribute('stroke-width', $w * 2 . $this->units);
if (null !== $this->strokeDashLength && null !== $this->strokeDashGap) {
$rect->addAttribute('stroke-dasharray', $this->strokeDashLength . $this->units . ',' . $this->strokeDashGap . $this->units);
}
$rect->addAttribute('fill', 'none');
return $this;
}