public function render($size, array $parts)
    {
        ArgumentChecker::check($size, 'integer');

        $this->calculateTotal($parts);
        $this->size = $size;
        $this->parts = $parts;

        $r = '';

        foreach ($parts as $color => $x) {
            $bars = $this->valueToBars($x);
            $r .= $this->colorSpaces($bars, $color);
        }

        $r = $this->fillToSize($r);

        return $r;
    }