package shape

import (
	

	
	
	
)

type shapeDiamond struct {
	*baseShape
}

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

func ( shapeDiamond) () *geo.Box {
	 := .Box.Width
	 := .Box.Height
	 := .Box.TopLeft.Copy()
	.X +=  / 4.
	.Y +=  / 4.
	 /= 2.
	 /= 2.
	return geo.NewBox(, , )
}

func diamondPath( *geo.Box) *svg.SvgPathContext {
	 := svg.NewSVGPathContext(.TopLeft, .Width/77, .Height/76.9)
	.StartAt(.Absolute(38.5, 76.9))
	.C(true, -0.3, 0, -0.5, -0.1, -0.7, -0.3)
	.L(false, 0.3, 39.2)
	.C(true, -0.4, -0.4, -0.4, -1, 0, -1.4)
	.L(false, 37.8, 0.3)
	.C(true, 0.4, -0.4, 1, -0.4, 1.4, 0)
	.L(true, 37.5, 37.5)
	.C(true, 0.4, 0.4, 0.4, 1, 0, 1.4)
	.L(false, 39.2, 76.6)
	.C(false, 39, 76.8, 38.8, 76.9, 38.5, 76.9)
	.Z()
	return 
}

func ( shapeDiamond) () []geo.Intersectable {
	return diamondPath(.Box).Path
}

func ( shapeDiamond) () []string {
	return []string{
		diamondPath(.Box).PathData(),
	}
}

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

func ( shapeDiamond) () (,  float64) {
	return defaultPadding / 4, defaultPadding / 2
}