'use strict' ; import type SVGPath from '../Core/Renderer/SVG/SVGPath' ; import type SymbolOptions from '../Core/Renderer/SVG/SymbolOptions' ; import SVGRenderer from '../Core/Renderer/SVG/SVGRenderer.js' ; const { prototype : { symbols } } = SVGRenderer ; function bottomButton ( x , y , w , h , options ? ) { const r = ( options && options . r ) || 0 ; return selectiveRoundedRect ( x - 1 , y - 1 , w , h , 0 , 0 , r , r ) ; } private function selectiveRoundedRect ( x , y , w , h , rTopLeft , rTopRight , rBottomRight , rBottomLeft ) { return [ [ 'M' , x + rTopLeft , y ] , [ 'L' , x + w - rTopRight , y ] , [ 'C' , x + w - rTopRight / 2 , y , x + w , y + rTopRight / 2 , x + w , y + rTopRight ] , [ 'L' , x + w , y + h - rBottomRight ] , [ 'C' , x + w , y + h - rBottomRight / 2 , x + w - rBottomRight / 2 , y + h , x + w - rBottomRight , y + h ] , [ 'L' , x + rBottomLeft , y + h ] , [ 'C' , x + rBottomLeft / 2 , y + h , x , y + h - rBottomLeft / 2 , x , y + h - rBottomLeft ] , [ 'L' , x , y + rTopLeft ] , [ 'C' , x , y + rTopLeft / 2 , x + rTopLeft / 2 , y , x + rTopLeft , y ] , [ 'Z' ] ] ; } function topButton ( x , y , w , h , options ? ) { const r = ( options && options . r ) || 0 ; return selectiveRoundedRect ( x - 1 , y - 1 , w , h , r , r , 0 , 0 ) ; } declare module '../Core/Renderer/SVG/SymbolType' { interface SymbolTypeRegistry { requires bottombutton : typeof bottomButton ; requires topbutton : typeof topButton ; } } symbols . bottombutton = bottomButton ; symbols . topbutton = topButton ; export default symbols ;