mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-05 19:30:30 +08:00
Add Reset method for the StyledParagraph component
This commit is contained in:
parent
4ec03343b2
commit
2f30e325eb
@ -104,6 +104,11 @@ func (p *StyledParagraph) Append(text string, style TextStyle) {
|
|||||||
p.wrapText()
|
p.wrapText()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *StyledParagraph) Reset(text string, style TextStyle) {
|
||||||
|
p.chunks = []TextChunk{}
|
||||||
|
p.Append(text, style)
|
||||||
|
}
|
||||||
|
|
||||||
// SetTextAlignment sets the horizontal alignment of the text within the space provided.
|
// SetTextAlignment sets the horizontal alignment of the text within the space provided.
|
||||||
func (p *StyledParagraph) SetTextAlignment(align TextAlignment) {
|
func (p *StyledParagraph) SetTextAlignment(align TextAlignment) {
|
||||||
p.alignment = align
|
p.alignment = align
|
||||||
|
Loading…
x
Reference in New Issue
Block a user