package shape

import (
	

	
	
	
)

type shapeParallelogram struct {
	*baseShape
}

const parallelWedgeWidth = 26.

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

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

func parallelogramPath( *geo.Box) *svg.SvgPathContext {
	 := parallelWedgeWidth
	// Note: box width should always be larger than parallelWedgeWidth
	// this just handles after collapsing into a line
	if .Width <=  {
		 = .Width / 2.0
	}
	 := svg.NewSVGPathContext(.TopLeft, 1, 1)
	.StartAt(.Absolute(, 0))
	.L(false, .Width, 0)
	.L(false, .Width-, .Height)
	.L(false, 0, .Height)
	.L(false, 0, .Height)
	.Z()
	return 
}

func ( shapeParallelogram) () []geo.Intersectable {
	return parallelogramPath(.Box).Path
}

func ( shapeParallelogram) () []string {
	return []string{
		parallelogramPath(.Box).PathData(),
	}
}

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