mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-01 22:17:29 +08:00
Add SetText method to the styled paragraph component
This commit is contained in:
parent
9db7496508
commit
8cbb57960d
@ -119,6 +119,12 @@ func (p *StyledParagraph) Reset() {
|
||||
p.chunks = []*TextChunk{}
|
||||
}
|
||||
|
||||
// SetText replaces all the of the paragraph with the specified one.
|
||||
func (p *StyledParagraph) SetText(text string) *TextChunk {
|
||||
p.Reset()
|
||||
return p.Append(text)
|
||||
}
|
||||
|
||||
// SetTextAlignment sets the horizontal alignment of the text within the space provided.
|
||||
func (p *StyledParagraph) SetTextAlignment(align TextAlignment) {
|
||||
p.alignment = align
|
||||
|
Loading…
x
Reference in New Issue
Block a user