run

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

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) GetColor

func (b *Background) GetColor() string

GetColor 获取前景色

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 设置前景色,不包含#号

func (*Background) SetMask

func (b *Background) SetMask(val string) *Background

SetMask 设置背景模式

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 (r *RPr) GetDefaultXmlBytes() ([]byte, error)

func (*RPr) GetExtraXmlBytes

func (r *RPr) GetExtraXmlBytes() ([]byte, error)

GetExtraXmlBytes 获取外部样式

func (*RPr) GetId

func (r *RPr) GetId() string

func (*RPr) GetInnerXmlBytes

func (r *RPr) GetInnerXmlBytes() ([]byte, error)

GetInnerXmlBytes 获取内联样式

func (*RPr) SetBold

func (r *RPr) SetBold(bold bool) *RPr

SetBold 设置粗体

func (*RPr) SetColor

func (r *RPr) SetColor(color string) *RPr

SetColor 设置文本颜色

func (*RPr) SetDeleteLine

func (r *RPr) SetDeleteLine(deleteLine DeleteLine) *RPr

SetDeleteLine 设置删除线

func (*RPr) SetEmboss

func (r *RPr) SetEmboss(emboss bool) *RPr

SetEmboss 设置浮雕样式

func (*RPr) SetImprint

func (r *RPr) SetImprint(imprint bool) *RPr

SetImprint 设置刻印样式

func (*RPr) SetItalics

func (r *RPr) SetItalics(italics bool) *RPr

SetItalics 设置斜体

func (*RPr) SetShadow

func (r *RPr) SetShadow(shadow bool) *RPr

SetShadow 设置阴影

func (*RPr) SetSize

func (r *RPr) SetSize(size int) *RPr

SetSize 设置字体大小

func (*RPr) SetUnderline

func (r *RPr) SetUnderline(lineType UnderlineType) *RPr

SetUnderline 设置下划线样式

func (*RPr) SetUnderlineWithColor

func (r *RPr) SetUnderlineWithColor(lineType UnderlineType, color string) *RPr

SetUnderlineWithColor 设置下划线样式与颜色

func (*RPr) SetVanish

func (r *RPr) SetVanish(vanish bool) *RPr

SetVanish 仅显示样式,不显示内容

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) AddRawXml

func (r *Run) AddRawXml(xml string) *Run

AddRawXml 添加原始XML字符串 如果不熟悉docx文档格式不要使用此方法

func (*Run) AddText

func (r *Run) AddText(text interface{}) *Run

AddText 添加一段文本内容

func (*Run) AddTextSpace

func (r *Run) AddTextSpace(text interface{}) *Run

AddTextSpace 添加一段文本内容并保留空白

func (*Run) GetProperties

func (r *Run) GetProperties() *RPr

func (*Run) GetXmlBytes

func (r *Run) GetXmlBytes() ([]byte, error)

type Underline

type Underline struct {
	// contains filtered or unexported fields
}

Underline 下划线配置结构

type UnderlineType

type UnderlineType string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL