API changes to support future functionality
This commit is contained in:
parent
388a113a01
commit
14deec24f5
12
setter.go
12
setter.go
@ -117,10 +117,10 @@ func (setter *TypeSetter) SetWrap (wrap bool) {
|
||||
}
|
||||
|
||||
// SetAlign sets the alignment method of the typesetter.
|
||||
func (setter *TypeSetter) SetAlign (align Align) {
|
||||
if setter.align == align { return }
|
||||
func (setter *TypeSetter) SetAlign (horizontal, vertical Align) {
|
||||
if setter.align == horizontal { return }
|
||||
setter.alignClean = false
|
||||
setter.align = align
|
||||
setter.align = horizontal
|
||||
}
|
||||
|
||||
// SetText sets the text content of the typesetter.
|
||||
@ -138,11 +138,9 @@ func (setter *TypeSetter) SetFace (face font.Face) {
|
||||
setter.face = face
|
||||
}
|
||||
|
||||
// TODO rename to SetWidth and SetHeight
|
||||
|
||||
// SetWidth sets the width of the typesetter. Text will still be able
|
||||
// to overflow outside of this width if wrapping is disabled.
|
||||
func (setter *TypeSetter) SetMaxWidth (width int) {
|
||||
func (setter *TypeSetter) SetWidth (width int) {
|
||||
if setter.maxWidth == width { return }
|
||||
setter.layoutClean = false
|
||||
setter.alignClean = false
|
||||
@ -152,7 +150,7 @@ func (setter *TypeSetter) SetMaxWidth (width int) {
|
||||
// SetHeight sets the height of the typesetter. If the height is greater than
|
||||
// zero, no lines will be laid out past it. If the height is zero, the text's
|
||||
// maximum height will not be constrained.
|
||||
func (setter *TypeSetter) SetMaxHeight (heignt int) {
|
||||
func (setter *TypeSetter) SetHeight (heignt int) {
|
||||
if setter.maxHeight == heignt { return }
|
||||
setter.layoutClean = false
|
||||
setter.alignClean = false
|
||||
|
Loading…
Reference in New Issue
Block a user