tables

package
v0.0.0-...-e1e991c Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitTagChunks

func SplitTagChunks(tags core.TagSlice, stopTag *core.Tag, chunkDelimiter *core.Tag) []core.TagSlice

SplitTagChunks splits a TagSlice into a series of TagSlices delimited by chunkDelimiter tags. The Iteration ends at stopTag.

func TableEntryTags

func TableEntryTags(tags core.TagSlice) ([]core.TagSlice, error)

TableEntryTags splits a slice of tags that contains the TABLES entry of a DXF file, validates its basic structure and returns only the tags to be parsed as tables. (Removes the initial and final markup tags for table).

Types

type AppID

type AppID struct {
	core.DxfParseable
	Name string
}

AppID representation.

func NewAppID

func NewAppID(tags core.TagSlice) (*AppID, error)

NewAppID builds a new AppID from a tag slice.

func (AppID) Equals

func (l AppID) Equals(other core.DxfElement) bool

Equals tests equality against another AppID. It only considers the values of the attributes on AppID struct, not on parent core.DxfParseable.

type Layer

type Layer struct {
	core.DxfParseable
	Name     string
	Color    int
	LineType string
	Locked   bool
	Frozen   bool
	On       bool
}

Layer representation.

func NewLayer

func NewLayer(tags core.TagSlice) (*Layer, error)

NewLayer builds a new Layer from a tag slice.

func (Layer) Equals

func (l Layer) Equals(other core.DxfElement) bool

Equals tests equality against another Layer. It only considers the values of the attributes on Layer struct, not on parent core.DxfParseable.

type LineElement

type LineElement struct {
	Length           float64
	AbsoluteRotation bool
	IsTextString     bool
	IsShape          bool
	ShapeNumber      int
	Scale            float64
	RotationAngle    float64
	XOffset          float64
	YOffset          float64
	Text             string
}

LineElement represents a single element in a LineType.

func (LineElement) Equals

func (e LineElement) Equals(other LineElement) bool

Equals compares two LineElement objects for equality.

type LineType

type LineType struct {
	core.DxfParseable
	Name        string
	Description string
	Length      float64
	Pattern     []*LineElement
}

LineType representation

func NewLineType

func NewLineType(tags core.TagSlice) (*LineType, error)

NewLineType creates a new LineType object from a slice of tags.

func (LineType) Equals

func (ltype LineType) Equals(other core.DxfElement) bool

Equals compares two LineType objects for equality.

type Style

type Style struct {
	core.DxfParseable
	Name           string
	Height         float64
	Width          float64
	Oblique        float64
	IsBackwards    bool
	IsUpsideDown   bool
	IsShape        bool
	IsVerticalText bool
	Font           string
	BigFont        string
}

Style Table representation

func NewStyle

func NewStyle(tags core.TagSlice) (*Style, error)

NewStyle creates a new Style object from a slice of tags.

func (Style) Equals

func (style Style) Equals(other core.DxfElement) bool

Equals compares two Style objects for equality.

type Table

type Table map[string]core.DxfElement

Table representation.

func NewAppIDTable

func NewAppIDTable(tags core.TagSlice) (Table, error)

NewAppIDTable parses the slice of tags into a table that maps the AppID name to the parsed AppID object.

func NewLayerTable

func NewLayerTable(tags core.TagSlice) (Table, error)

NewLayerTable parses the slice of tags into a table that maps the layer name to the parsed Layer object.

func NewLineTypeTable

func NewLineTypeTable(tags core.TagSlice) (Table, error)

NewLineTypeTable parses the slice of tags into a table that maps the LineType name to the parsed LineType object.

func NewStyleTable

func NewStyleTable(tags core.TagSlice) (Table, error)

NewStyleTable parses the slice of tags into a table that maps the Style name to the parsed Style object.

func (Table) Equals

func (t Table) Equals(other core.DxfElement) bool

Equals Compare two Tables for equality

type TablesSection

type TablesSection struct {
	AppID     Table
	Layers    Table
	Styles    Table
	LineTypes Table
}

TablesSection representation

func NewTablesSection

func NewTablesSection(tags core.TagSlice) (*TablesSection, error)

NewTablesSection parses the TablesSection from a slice of tags.

func (TablesSection) Equals

func (t TablesSection) Equals(other core.DxfElement) bool

Equals Compare two TablesSection for equality

Jump to

Keyboard shortcuts

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