package shape

import (
	

	
	
	
)

type shapeDocument struct {
	*baseShape
}

const (
	// the shape is taller than where the bottom of the path ends
	docPathHeight      = 18.925
	docPathInnerBottom = 14
	docPathBottom      = 16.3
)

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

func ( shapeDocument) () *geo.Box {
	 := .Box.Height * docPathInnerBottom / docPathHeight
	return geo.NewBox(.Box.TopLeft.Copy(), .Box.Width, )
}

func documentPath( *geo.Box) *svg.SvgPathContext {
	 := svg.NewSVGPathContext(.TopLeft, .Width, .Height)
	.StartAt(.Absolute(0, docPathBottom/docPathHeight))
	.L(false, 0, 0)
	.L(false, 1, 0)
	.L(false, 1, docPathBottom/docPathHeight)
	.C(false, 5/6.0, 12.8/docPathHeight, 2/3.0, 12.8/docPathHeight, 1/2.0, docPathBottom/docPathHeight)
	.C(false, 1/3.0, 19.8/docPathHeight, 1/6.0, 19.8/docPathHeight, 0, docPathBottom/docPathHeight)
	.Z()
	return 
}

func ( shapeDocument) () []geo.Intersectable {
	return documentPath(.Box).Path
}

func ( shapeDocument) () []string {
	return []string{
		documentPath(.Box).PathData(),
	}
}

func ( shapeDocument) (, , ,  float64) (float64, float64) {
	 := ( + ) * docPathHeight / docPathInnerBottom
	return math.Ceil( + ), math.Ceil()
}

func ( shapeDocument) () (,  float64) {
	return defaultPadding, defaultPadding * docPathInnerBottom / docPathHeight
}