Documentation ¶
Index ¶
- Constants
- type Background
- func (b *Background) GetBackgroundColor() string
- func (b *Background) GetColor() string
- func (b *Background) GetXmlBytes() ([]byte, error)
- func (b *Background) SetBackgroundColor(color string) *Background
- func (b *Background) SetColor(color string) *Background
- func (b *Background) SetMask(val string) *Background
- type BreakLineClearType
- type BreakLineType
- type DeleteLine
- type RPr
- func (r *RPr) GetBackground() *Background
- func (r *RPr) GetDefaultXmlBytes() ([]byte, error)
- func (r *RPr) GetExtraXmlBytes() ([]byte, error)
- func (r *RPr) GetId() string
- func (r *RPr) GetInnerXmlBytes() ([]byte, error)
- func (r *RPr) SetBold(bold bool) *RPr
- func (r *RPr) SetColor(color string) *RPr
- func (r *RPr) SetDeleteLine(deleteLine DeleteLine) *RPr
- func (r *RPr) SetEmboss(emboss bool) *RPr
- func (r *RPr) SetImprint(imprint bool) *RPr
- func (r *RPr) SetItalics(italics bool) *RPr
- func (r *RPr) SetShadow(shadow bool) *RPr
- func (r *RPr) SetSize(size int) *RPr
- func (r *RPr) SetUnderline(lineType UnderlineType) *RPr
- func (r *RPr) SetUnderlineWithColor(lineType UnderlineType, color string) *RPr
- func (r *RPr) SetVanish(vanish bool) *RPr
- type Run
- func (r *Run) AddBreakLine(breakLineType BreakLineType, breakLineClearType BreakLineClearType)
- func (r *Run) AddRawXml(xml string) *Run
- func (r *Run) AddText(text interface{}) *Run
- func (r *Run) AddTextSpace(text interface{}) *Run
- func (r *Run) GetProperties() *RPr
- func (r *Run) GetXmlBytes() ([]byte, error)
- type Underline
- type UnderlineType
Constants ¶
View Source
const ( // BreakLineTypeDefault 下一行开始 // 此类型为默认类型 BreakLineTypeDefault = BreakLineType("textWrapping") // BreakLineTypePage 从下一页开始 // 设置为此类型时,新的内容将从下一页开始 BreakLineTypePage = BreakLineType("page") // BreakLineTypePage 从下一列开始 BreakLineTypeColumn = BreakLineType("column") )
View Source
const ( // BreakLineClearTypeDefault 不设置clear // 这是默认值 BreakLineClearTypeDefault = BreakLineClearType("none") // BreakLineClearTypeLeft 从左侧开始 BreakLineClearTypeLeft = BreakLineClearType("left") // BreakLineClearTypeRight 从右侧开始 BreakLineClearTypeRight = BreakLineClearType("right") // BreakLineClearTypeAll BreakLineClearTypeAll = BreakLineClearType("all") )
View Source
const ( DeleteLineDoubleStrike = DeleteLine("dstrike") DeleteLineStrike = DeleteLine("strike") )
View Source
const ( UnderlineDash = UnderlineType("dash") UnderlineDashDotDotHeavy = UnderlineType("dashDotDotHeavy") UnderlineDashDotHeavy = UnderlineType("dashDotHeavy") UnderlineDashedHeavy = UnderlineType("dashedHeavy") UnderlineDashLong = UnderlineType("dashLong") UnderlineDashLongHeavy = UnderlineType("dashLongHeavy") UnderlineDotDash = UnderlineType("dotDash") UnderlineDotDotDash = UnderlineType("dotDotDash") UnderlineDotted = UnderlineType("dotted") UnderlineDottedHeavy = UnderlineType("dottedHeavy") UnderlineDouble = UnderlineType("double") UnderlineNone = UnderlineType("none") UnderlineSingle = UnderlineType("single") UnderlineThick = UnderlineType("thick") UnderlineWave = UnderlineType("wave") UnderlineWavyDouble = UnderlineType("wavyDouble") UnderlineWavyHeavy = UnderlineType("wavyHeavy") UnderlineWords = UnderlineType("words") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Background ¶
type Background struct {
// contains filtered or unexported fields
}
func (*Background) GetBackgroundColor ¶
func (b *Background) GetBackgroundColor() string
GetBackgroundColor 获取背景色
func (*Background) GetXmlBytes ¶
func (b *Background) GetXmlBytes() ([]byte, error)
func (*Background) SetBackgroundColor ¶
func (b *Background) SetBackgroundColor(color string) *Background
SetBackgroundColor 设置背景色,不包含#号
func (*Background) SetColor ¶
func (b *Background) SetColor(color string) *Background
SetColor 设置前景色,不包含#号
type BreakLineClearType ¶
type BreakLineClearType string
type BreakLineType ¶
type BreakLineType string
type DeleteLine ¶
type DeleteLine string
type RPr ¶
type RPr struct {
// contains filtered or unexported fields
}
RPr 内容样式定义
func (*RPr) GetBackground ¶
func (r *RPr) GetBackground() *Background
func (*RPr) GetDefaultXmlBytes ¶
func (*RPr) GetExtraXmlBytes ¶
GetExtraXmlBytes 获取外部样式
func (*RPr) GetInnerXmlBytes ¶
GetInnerXmlBytes 获取内联样式
func (*RPr) SetDeleteLine ¶
func (r *RPr) SetDeleteLine(deleteLine DeleteLine) *RPr
SetDeleteLine 设置删除线
func (*RPr) SetUnderline ¶
func (r *RPr) SetUnderline(lineType UnderlineType) *RPr
SetUnderline 设置下划线样式
func (*RPr) SetUnderlineWithColor ¶
func (r *RPr) SetUnderlineWithColor(lineType UnderlineType, color string) *RPr
SetUnderlineWithColor 设置下划线样式与颜色
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
Run 内容的结构定义
func (*Run) AddBreakLine ¶
func (r *Run) AddBreakLine(breakLineType BreakLineType, breakLineClearType BreakLineClearType)
AddBreakLine 添加换行符
func (*Run) AddTextSpace ¶
AddTextSpace 添加一段文本内容并保留空白
func (*Run) GetProperties ¶
func (*Run) GetXmlBytes ¶
type Underline ¶
type Underline struct {
// contains filtered or unexported fields
}
Underline 下划线配置结构
type UnderlineType ¶
type UnderlineType string
Click to show internal directories.
Click to hide internal directories.