protected function setAttributes(
        &$element,
        $posX = null,
        $posY = null,
        $width = null,
        $height = null,
        $background = null,
        $fontFamily = null,
        $fontSize = null,
        $fontColor = null,
        $lineHeight = null,
        $textAlign = null
    ) {
        if ($posX) {
            $element['PosX'] = $posX;
        } elseif (!isset($element['PosX'])) {
            $element['PosX'] = 0;
        }
        if ($posY) {
            $element['PosY'] = $posY;
        } elseif (!isset($element['PosY'])) {
            $element['PosY'] = 0;
        }
        if ($width) {
            $element['Width'] = $width;
        } elseif (!isset($element['Width'])) {
            $element['Width'] = 0;
        }
        if ($height) {
            $element['Height'] = $height;
        } elseif (!isset($element['Height'])) {
            $element['Height'] = 0;
        }
        if (!empty($background)) {
            $element['Background'] = $background;
        } elseif (!isset($element['Background'])) {
            $element['Background'] = 'transparent';
        }
        if (!empty($fontFamily)) {
            $element['FontFamily'] = $fontFamily;
        } elseif (!isset($element['FontFamily'])) {
            $element['FontFamily'] = $this->defaultFontFamily;
        }
        if ($fontSize) {
            $element['FontSize'] = $fontSize;
        } elseif (!isset($element['FontSize'])) {
            $element['FontSize'] = $this->defaultFontSize;
        }
        if (!empty($fontColor)) {
            $element['FontColor'] = $fontColor;
        } elseif (!isset($element['FontColor'])) {
            $element['FontColor'] = $this->defaultFontColor;
        }
        if ($lineHeight) {
            $element['LineHeight'] = $lineHeight;
        } elseif (!isset($element['LineHeight'])) {
            $element['LineHeight'] = $this->defaultLineHeight;
        }
        if (!empty($textAlign)) {
            $element['TextAlign'] = $textAlign;
        } elseif (!isset($element['TextAlign'])) {
            $element['TextAlign'] = $this->defaultTextAlign;
        }

        return $this;
    }