public Shape createTabCloseIcon ( int x , int y , int w , int h ) { final double xMid = x + w / 2.0 ; final double yMid = y + h / 2.0 ; path . reset ( ) ; final double xOffsetL = w / 2.0 ; final double xOffsetS = w / 2.0 - 1 ; final double yOffsetL = h / 2.0 ; final double yOffsetS = h / 2.0 - 1 ; final double offsetC = 1 ; path . moveTo ( xMid , yMid - offsetC ) ; path . lineTo ( xMid + xOffsetS , yMid - yOffsetL ) ; path . lineTo ( yMid + xOffsetL , yMid - yOffsetS ) ; path . lineTo ( xMid + offsetC , yMid ) ; path . lineTo ( xMid + xOffsetL , yMid + yOffsetS ) ; path . lineTo ( xMid + xOffsetS , yMid + yOffsetL ) ; path . lineTo ( xMid , yMid + offsetC ) ; path . lineTo ( xMid - xOffsetS , yMid + yOffsetL ) ; path . lineTo ( xMid - xOffsetL , yMid + yOffsetS ) ; path . lineTo ( xMid - offsetC , yMid ) ; path . lineTo ( xMid - xOffsetL , yMid - yOffsetS ) ; path . lineTo ( xMid - xOffsetS , yMid - yOffsetL ) ; path . closePath ( ) ; return path ; }
Return a path for a cancel icon . This is a circle with a punched out x in it .