export function commonProps()

in packages/processing-vsvg/src/element_renderers/util.ts [51:92]


export function commonProps(item: SGItem): any {
	const result: { [key: string]: any } = {}

	if (item.fill !== undefined) {
		result.fill = item.fill
	}

	if (item.fillOpacity !== undefined) {
		result.fillOpacity = item.fillOpacity
	}

	if (item.stroke !== undefined) {
		result.stroke = item.stroke
	}

	result.strokeWidth = item.strokeWidth || 1

	if (item.strokeOpacity !== undefined) {
		result.strokeOpacity = item.strokeOpacity
	}

	if (item.strokeJoin !== undefined) {
		result.strokeLinejoin = item.strokeJoin
	}

	if (item.strokeCap !== undefined) {
		result.strokeLinecap = item.strokeCap
	}

	if (item.strokeDash !== undefined) {
		result.strokeDasharray = item.strokeDash
	}

	if (item.strokeDashOffset !== undefined) {
		result.strokeDashoffset = item.strokeDashOffset
	}

	if (item.tabIndex !== undefined) {
		result.tabIndex = item.tabIndex
	}
	return result
}