HomeUniDoc
...

Package drawing

Overview ▾

Index ▾

type LineJoin
type LineProperties
    func (l LineProperties) SetJoin(e LineJoin)
    func (l LineProperties) SetNoFill()
    func (l LineProperties) SetSolidFill(c color.Color)
    func (l LineProperties) SetWidth(w measurement.Distance)
    func (l LineProperties) X() *dml.CT_LineProperties
type Paragraph
    func MakeParagraph(x *dml.CT_TextParagraph) Paragraph
    func (p Paragraph) AddBreak()
    func (p Paragraph) AddRun() Run
    func (p Paragraph) Properties() ParagraphProperties
    func (p Paragraph) X() *dml.CT_TextParagraph
type ParagraphProperties
    func MakeParagraphProperties(x *dml.CT_TextParagraphProperties) ParagraphProperties
    func (p ParagraphProperties) SetAlign(a dml.ST_TextAlignType)
    func (p ParagraphProperties) SetBulletChar(c string)
    func (p ParagraphProperties) SetBulletFont(f string)
    func (p ParagraphProperties) SetLevel(idx int32)
    func (p ParagraphProperties) SetNumbered(scheme dml.ST_TextAutonumberScheme)
    func (p ParagraphProperties) X() *dml.CT_TextParagraphProperties
type Run
    func MakeRun(x *dml.EG_TextRun) Run
    func (r Run) Properties() RunProperties
    func (r Run) SetText(s string)
    func (r Run) X() *dml.EG_TextRun
type RunProperties
    func MakeRunProperties(x *dml.CT_TextCharacterProperties) RunProperties
    func (r RunProperties) SetBold(b bool)
    func (r RunProperties) SetFont(s string)
    func (r RunProperties) SetSize(sz measurement.Distance)
    func (r RunProperties) SetSolidFill(c color.Color)
type ShapeProperties
    func MakeShapeProperties(x *dml.CT_ShapeProperties) ShapeProperties
    func (s ShapeProperties) GetPosition() (int64, int64)
    func (s ShapeProperties) LineProperties() LineProperties
    func (s ShapeProperties) SetFlipHorizontal(b bool)
    func (s ShapeProperties) SetFlipVertical(b bool)
    func (s ShapeProperties) SetGeometry(g dml.ST_ShapeType)
    func (s ShapeProperties) SetHeight(h measurement.Distance)
    func (s ShapeProperties) SetNoFill()
    func (s ShapeProperties) SetPosition(x, y measurement.Distance)
    func (s ShapeProperties) SetSize(w, h measurement.Distance)
    func (s ShapeProperties) SetSolidFill(c color.Color)
    func (s ShapeProperties) SetWidth(w measurement.Distance)
    func (s ShapeProperties) X() *dml.CT_ShapeProperties

Package files

lineproperties.go paragraph.go paragraphproperties.go run.go runproperties.go shapeproperties.go

type LineJoin

LineJoin is the type of line join

type LineJoin byte

LineJoin types

const (
    LineJoinRound LineJoin = iota
    LineJoinBevel
    LineJoinMiter
)

type LineProperties

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

func (LineProperties) SetJoin

func (l LineProperties) SetJoin(e LineJoin)

SetJoin sets the line join style.

func (LineProperties) SetNoFill

func (l LineProperties) SetNoFill()

func (LineProperties) SetSolidFill

func (l LineProperties) SetSolidFill(c color.Color)

func (LineProperties) SetWidth

func (l LineProperties) SetWidth(w measurement.Distance)

SetWidth sets the line width, MS products treat zero as the minimum width that can be displayed.

func (LineProperties) X

func (l LineProperties) X() *dml.CT_LineProperties

X returns the inner wrapped XML type.

type Paragraph

Paragraph is a paragraph within a document.

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

func MakeParagraph

func MakeParagraph(x *dml.CT_TextParagraph) Paragraph

MakeParagraph constructs a new paragraph wrapper.

func (Paragraph) AddBreak

func (p Paragraph) AddBreak()

AddBreak adds a new line break to a paragraph.

func (Paragraph) AddRun

func (p Paragraph) AddRun() Run

AddRun adds a new run to a paragraph.

func (Paragraph) Properties

func (p Paragraph) Properties() ParagraphProperties

Properties returns the paragraph properties.

func (Paragraph) X

func (p Paragraph) X() *dml.CT_TextParagraph

X returns the inner wrapped XML type.

type ParagraphProperties

ParagraphProperties allows controlling paragraph properties.

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

func MakeParagraphProperties

func MakeParagraphProperties(x *dml.CT_TextParagraphProperties) ParagraphProperties

MakeParagraphProperties constructs a new ParagraphProperties wrapper.

func (ParagraphProperties) SetAlign

func (p ParagraphProperties) SetAlign(a dml.ST_TextAlignType)

SetAlign controls the paragraph alignment

func (ParagraphProperties) SetBulletChar

func (p ParagraphProperties) SetBulletChar(c string)

SetBulletChar sets the bullet character for the paragraph.

func (ParagraphProperties) SetBulletFont

func (p ParagraphProperties) SetBulletFont(f string)

SetBulletFont controls the font for the bullet character.

func (ParagraphProperties) SetLevel

func (p ParagraphProperties) SetLevel(idx int32)

SetLevel sets the level of indentation of a paragraph.

func (ParagraphProperties) SetNumbered

func (p ParagraphProperties) SetNumbered(scheme dml.ST_TextAutonumberScheme)

SetNumbered controls if bullets are numbered or not.

func (ParagraphProperties) X

func (p ParagraphProperties) X() *dml.CT_TextParagraphProperties

X returns the inner wrapped XML type.

type Run

Run is a run within a paragraph.

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

func MakeRun

func MakeRun(x *dml.EG_TextRun) Run

MakeRun constructs a new Run wrapper.

func (Run) Properties

func (r Run) Properties() RunProperties

Properties returns the run's properties.

func (Run) SetText

func (r Run) SetText(s string)

SetText sets the run's text contents.

func (Run) X

func (r Run) X() *dml.EG_TextRun

X returns the inner wrapped XML type.

type RunProperties

RunProperties controls the run properties.

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

func MakeRunProperties

func MakeRunProperties(x *dml.CT_TextCharacterProperties) RunProperties

MakeRunProperties constructs a new RunProperties wrapper.

func (RunProperties) SetBold

func (r RunProperties) SetBold(b bool)

SetBold controls the bolding of a run.

func (RunProperties) SetFont

func (r RunProperties) SetFont(s string)

SetFont controls the font of a run.

func (RunProperties) SetSize

func (r RunProperties) SetSize(sz measurement.Distance)

SetSize sets the font size of the run text

func (RunProperties) SetSolidFill

func (r RunProperties) SetSolidFill(c color.Color)

SetSolidFill controls the text color of a run.

type ShapeProperties

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

func MakeShapeProperties

func MakeShapeProperties(x *dml.CT_ShapeProperties) ShapeProperties

func (ShapeProperties) GetPosition

func (s ShapeProperties) GetPosition() (int64, int64)

GetPosition gets the position of the shape in EMU.

func (ShapeProperties) LineProperties

func (s ShapeProperties) LineProperties() LineProperties

func (ShapeProperties) SetFlipHorizontal

func (s ShapeProperties) SetFlipHorizontal(b bool)

SetFlipHorizontal controls if the shape is flipped horizontally.

func (ShapeProperties) SetFlipVertical

func (s ShapeProperties) SetFlipVertical(b bool)

SetFlipVertical controls if the shape is flipped vertically.

func (ShapeProperties) SetGeometry

func (s ShapeProperties) SetGeometry(g dml.ST_ShapeType)

SetGeometry sets the shape type of the shape

func (ShapeProperties) SetHeight

func (s ShapeProperties) SetHeight(h measurement.Distance)

SetHeight sets the height of the shape.

func (ShapeProperties) SetNoFill

func (s ShapeProperties) SetNoFill()

func (ShapeProperties) SetPosition

func (s ShapeProperties) SetPosition(x, y measurement.Distance)

SetPosition sets the position of the shape.

func (ShapeProperties) SetSize

func (s ShapeProperties) SetSize(w, h measurement.Distance)

SetSize sets the width and height of the shape.

func (ShapeProperties) SetSolidFill

func (s ShapeProperties) SetSolidFill(c color.Color)

func (ShapeProperties) SetWidth

func (s ShapeProperties) SetWidth(w measurement.Distance)

SetWidth sets the width of the shape.

func (ShapeProperties) X

func (s ShapeProperties) X() *dml.CT_ShapeProperties

X returns the inner wrapped XML type.