diff --git a/lib/shape/shape.go b/lib/shape/shape.go index 84468ad7b..484719d99 100644 --- a/lib/shape/shape.go +++ b/lib/shape/shape.go @@ -48,9 +48,7 @@ type Shape interface { // placing a rectangle of the given size and padding inside the shape, return the position relative to the shape's TopLeft GetInsidePlacement(width, height, padding float64) geo.Point - // TODO note change to interface GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) - GetDefaultPadding() (paddingX, paddingY float64) // Perimeter returns a slice of geo.Intersectables that together constitute the shape border @@ -92,10 +90,6 @@ func (s baseShape) GetInsidePlacement(_, _, padding float64) geo.Point { return *geo.NewPoint(s.Box.TopLeft.X+padding, s.Box.TopLeft.Y+padding) } -func (s baseShape) GetInnerTopLeft(_, _, padding float64) geo.Point { - return *geo.NewPoint(s.Box.TopLeft.X+padding, s.Box.TopLeft.Y+padding) -} - // return the minimum shape dimensions needed to fit content (width x height) // in the shape's innerBox with padding func (s baseShape) GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) { diff --git a/lib/shape/shape_cloud.go b/lib/shape/shape_cloud.go index 710d7b4c8..5e3b19cb7 100644 --- a/lib/shape/shape_cloud.go +++ b/lib/shape/shape_cloud.go @@ -59,7 +59,6 @@ func (s shapeCloud) GetInnerBox() *geo.Box { } func (s shapeCloud) GetDimensionsToFit(width, height, paddingX, paddingY float64) (float64, float64) { - // TODO /2? width += paddingX height += paddingY aspectRatio := width / height @@ -75,7 +74,6 @@ func (s shapeCloud) GetDimensionsToFit(width, height, paddingX, paddingY float64 func (s shapeCloud) GetInsidePlacement(width, height, padding float64) geo.Point { r := s.Box - // only using padding/2 since there's already quite a bit of padding away from the corners width += padding height += padding aspectRatio := width / height