Skip to content

Commit

Permalink
Add locational frame size getters
Browse files Browse the repository at this point in the history
  • Loading branch information
nervo committed Oct 12, 2023
1 parent f093bc1 commit e47690f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions get.go
Expand Up @@ -386,6 +386,30 @@ func (s Style) GetStrikethroughSpaces() bool {
return s.getAsBool(strikethroughSpacesKey, false)
}

// GetTopFrameSize returns the sum of the style's top margins, padding
// and border widths.
func (s Style) GetTopFrameSize() int {
return s.GetMarginTop() + s.GetPaddingTop() + s.GetBorderTopSize()
}

// GetRightFrameSize returns the sum of the style's right margins, padding
// and border widths.
func (s Style) GetRightFrameSize() int {
return s.GetMarginRight() + s.GetPaddingRight() + s.GetBorderRightSize()
}

// GetBottomFrameSize returns the sum of the style's bottom margins, padding
// and border widths.
func (s Style) GetBottomFrameSize() int {
return s.GetMarginBottom() + s.GetPaddingBottom() + s.GetBorderBottomSize()
}

// GetLeftFrameSize returns the sum of the style's left margins, padding
// and border widths.
func (s Style) GetLeftFrameSize() int {
return s.GetMarginLeft() + s.GetPaddingLeft() + s.GetBorderLeftSize()
}

// GetHorizontalFrameSize returns the sum of the style's horizontal margins, padding
// and border widths.
//
Expand Down

0 comments on commit e47690f

Please sign in to comment.