package shape

import (
	

	
	
	
)

type shapeStep struct {
	*baseShape
}

func ( *geo.Box) Shape {
	 := shapeStep{
		baseShape: &baseShape{
			Type: STEP_TYPE,
			Box:  ,
		},
	}
	.FullShape = go2.Pointer(Shape())
	return 
}

const STEP_WEDGE_WIDTH = 35.0

func ( shapeStep) () *geo.Box {
	 := .Box.Width
	 := .Box.TopLeft.Copy()
	 -= 2 * STEP_WEDGE_WIDTH
	.X += STEP_WEDGE_WIDTH
	return geo.NewBox(, , .Box.Height)
}

func stepPath( *geo.Box) *svg.SvgPathContext {
	 := STEP_WEDGE_WIDTH
	if .Width <=  {
		 = .Width / 2.0
	}
	 := svg.NewSVGPathContext(.TopLeft, 1, 1)
	.StartAt(.Absolute(0, 0))
	.L(false, .Width-, 0)
	.L(false, .Width, .Height/2)
	.L(false, .Width-, .Height)
	.L(false, 0, .Height)
	.L(false, , .Height/2)
	.Z()
	return 
}

func ( shapeStep) () []geo.Intersectable {
	return stepPath(.Box).Path
}

func ( shapeStep) () []string {
	return []string{
		stepPath(.Box).PathData(),
	}
}

func ( shapeStep) (, , ,  float64) (float64, float64) {
	 :=  +  + 2*STEP_WEDGE_WIDTH
	return math.Ceil(), math.Ceil( + )
}

func ( shapeStep) () (,  float64) {
	return defaultPadding / 4, defaultPadding + STEP_WEDGE_WIDTH
}