Documentation ¶
Overview ¶
TABLES section
Index ¶
- Variables
- func TableTypeString(t TableType) string
- type AppID
- func (a *AppID) Format(f format.Formatter)
- func (a *AppID) FormatString(f format.Formatter) string
- func (a *AppID) Handle() int
- func (a *AppID) IsSymbolTable() bool
- func (a *AppID) Name() string
- func (a *AppID) SetHandle(v *int)
- func (a *AppID) SetOwner(h handle.Handler)
- func (a *AppID) String() string
- type BlockRecord
- func (b *BlockRecord) Format(f format.Formatter)
- func (b *BlockRecord) FormatString(f format.Formatter) string
- func (b *BlockRecord) Handle() int
- func (b *BlockRecord) IsSymbolTable() bool
- func (b *BlockRecord) Name() string
- func (b *BlockRecord) SetHandle(v *int)
- func (b *BlockRecord) SetOwner(h handle.Handler)
- func (b *BlockRecord) String() string
- type DimStyle
- func (d *DimStyle) Format(f format.Formatter)
- func (d *DimStyle) FormatString(f format.Formatter) string
- func (d *DimStyle) Handle() int
- func (d *DimStyle) IsSymbolTable() bool
- func (d *DimStyle) Name() string
- func (d *DimStyle) SetHandle(v *int)
- func (d *DimStyle) SetOwner(h handle.Handler)
- func (d *DimStyle) String() string
- type Layer
- func (l *Layer) Format(f format.Formatter)
- func (l *Layer) FormatString(f format.Formatter) string
- func (l *Layer) Freeze()
- func (l *Layer) Handle() int
- func (l *Layer) IsSymbolTable() bool
- func (l *Layer) Lock()
- func (l *Layer) Name() string
- func (l *Layer) SetFlag(val int)
- func (l *Layer) SetHandle(v *int)
- func (l *Layer) SetLineWidth(w int) int
- func (l *Layer) SetOwner(h handle.Handler)
- func (l *Layer) SetPlotStyle(ps handle.Handler)
- func (l *Layer) String() string
- func (l *Layer) UnFreeze()
- func (l *Layer) UnLock()
- type LineType
- func (lt *LineType) Format(f format.Formatter)
- func (lt *LineType) FormatString(f format.Formatter) string
- func (lt *LineType) Handle() int
- func (lt *LineType) IsSymbolTable() bool
- func (lt *LineType) Name() string
- func (lt *LineType) SetHandle(v *int)
- func (lt *LineType) SetLength(ls []float64)
- func (lt *LineType) SetOwner(h handle.Handler)
- func (lt *LineType) String() string
- func (lt *LineType) TotalLength() float64
- type Style
- func (st *Style) Format(f format.Formatter)
- func (st *Style) FormatString(f format.Formatter) string
- func (st *Style) Handle() int
- func (st *Style) IsSymbolTable() bool
- func (st *Style) Name() string
- func (st *Style) SetHandle(v *int)
- func (st *Style) SetOwner(h handle.Handler)
- func (st *Style) String() string
- type SymbolTable
- type Table
- func (t *Table) Add(st SymbolTable)
- func (t *Table) Clear()
- func (t *Table) Contains(name string) (SymbolTable, error)
- func (t *Table) Format(f format.Formatter)
- func (t *Table) FormatString(f format.Formatter) string
- func (t *Table) Handle() int
- func (t *Table) SetHandle(v *int)
- func (t *Table) String() string
- type TableType
- type Tables
- type Ucs
- type View
- type Viewport
- func (v *Viewport) Format(f format.Formatter)
- func (v *Viewport) FormatString(f format.Formatter) string
- func (v *Viewport) Handle() int
- func (v *Viewport) IsSymbolTable() bool
- func (v *Viewport) Name() string
- func (v *Viewport) SetHandle(h *int)
- func (v *Viewport) SetName(name string)
- func (v *Viewport) SetOwner(h handle.Handler)
- func (v *Viewport) String() string
Constants ¶
This section is empty.
Variables ¶
var ( LT_CONTINUOUS = NewLineType("Continuous", "Solid Line") LT_BYLAYER = NewLineType("ByLayer", "") LT_BYBLOCK = NewLineType("ByBlock", "") LT_HIDDEN = NewLineType("HIDDEN", "Hidden __ __ __ __ __ __ __ __ __ __ __ __ __ _", 0.25, -0.125) LT_DASHDOT = NewLineType("DASHDOT", "Dash dot __ . __ . __ . __ . __ . __ . __ . __", 0.5, -0.25, 0.0, -0.25) )
Default LineTypes.
var (
LY_0 = NewLayer("0", color.White, LT_CONTINUOUS)
)
Default layers.
var LineWidth = map[int]float64{
5: 0.05,
9: 0.09,
13: 0.13,
15: 0.15,
18: 0.18,
20: 0.20,
25: 0.25,
30: 0.30,
35: 0.35,
40: 0.40,
50: 0.50,
53: 0.53,
60: 0.60,
70: 0.70,
80: 0.80,
90: 0.90,
100: 1.00,
106: 1.06,
120: 1.20,
140: 1.40,
158: 1.58,
200: 2.00,
211: 2.11,
}
LineWeight enum value (code 370)
var (
ST_STANDARD = NewStyle("Standard")
)
Default Styles.
Functions ¶
func TableTypeString ¶
TableTypeString converts TableType to string. If TableType is out of range, it returns empty string.
Types ¶
type AppID ¶
type AppID struct {
// contains filtered or unexported fields
}
AppID represents APPID SymbolTable.
func (*AppID) FormatString ¶
FormatString outputs data using given formatter.
func (*AppID) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
type BlockRecord ¶
type BlockRecord struct {
// contains filtered or unexported fields
}
BlockRecord represents BLOCK_RECORD SymbolTable.
func NewBlockRecord ¶
func NewBlockRecord(name string) *BlockRecord
NewBlockRecord creates a new BlockRecord.
func (*BlockRecord) Format ¶
func (b *BlockRecord) Format(f format.Formatter)
Format writes data to formatter.
func (*BlockRecord) FormatString ¶
func (b *BlockRecord) FormatString(f format.Formatter) string
FormatString outputs data using given formatter.
func (*BlockRecord) IsSymbolTable ¶
func (b *BlockRecord) IsSymbolTable() bool
IsSymbolTable is for SymbolTable interface.
func (*BlockRecord) Name ¶
func (b *BlockRecord) Name() string
Name returns a name of BLOCK_RECORD (code 2).
func (*BlockRecord) SetOwner ¶
func (b *BlockRecord) SetOwner(h handle.Handler)
SetOwner sets an owner.
func (*BlockRecord) String ¶
func (b *BlockRecord) String() string
String outputs data using default formatter.
type DimStyle ¶
type DimStyle struct {
// contains filtered or unexported fields
}
DimStyle represents DIMSTYLE SymbolTable.
func (*DimStyle) FormatString ¶
FormatString outputs data using given formatter.
func (*DimStyle) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
type Layer ¶
type Layer struct { Color color.ColorNumber LineType *LineType PlotStyle handle.Handler // contains filtered or unexported fields }
Layer represents LAYER SymbolTable.
func NewLayer ¶
func NewLayer(name string, color color.ColorNumber, lt *LineType) *Layer
NewLayer creates a new Layer.
func (*Layer) FormatString ¶
FormatString outputs data using given formatter.
func (*Layer) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
func (*Layer) SetFlag ¶
SetFlag sets standard flags.
1 = Layer is frozen; otherwise layer is thawed. 2 = Layer is frozen by default in new viewports. 4 = Layer is locked. 16 = If set, table entry is externally dependent on an xref. 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved. 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files.)
func (*Layer) SetLineWidth ¶
SetLineWidth sets line width. As DXF has limitation in line width, it returns the actual value set to Layer.
func (*Layer) SetPlotStyle ¶
SetPlotStyle sets plot style by a handle.
type LineType ¶
type LineType struct { Description string // 3 // contains filtered or unexported fields }
LineType represents LTYPE SymbolTable.
func NewLineType ¶
NewLineType creates a new LineType.
func (*LineType) FormatString ¶
FormatString outputs data using given formatter.
func (*LineType) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
func (*LineType) SetLength ¶
SetLength sets pattern length (code 49).
positive value: Dash 0.0: Dot negative value: Space
func (*LineType) TotalLength ¶
TotalLength returns total pattern length (code 40).
type Style ¶
type Style struct { FontName string // 3 BigFontName string // 4 FixedTextHeight float64 // 40 WidthFactor float64 // 41 LastHeightUsed float64 // 42 ObliqueAngle float64 // 50 // contains filtered or unexported fields }
Style represents STYLE SymbolTable.
func (*Style) FormatString ¶
FormatString outputs data using given formatter.
func (*Style) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
type SymbolTable ¶
type SymbolTable interface { IsSymbolTable() bool Format(format.Formatter) Handle() int SetHandle(*int) SetOwner(handle.Handler) Name() string }
SymbolTable is interface for AcDbSymbolTableRecord.
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
Table represents each TABLE.
func (*Table) Contains ¶
func (t *Table) Contains(name string) (SymbolTable, error)
Contains reports if TABLE has the named SymbolTable.
func (*Table) FormatString ¶
FormatString outputs data using given formatter.
type TableType ¶
type TableType int
TableType represents Table names (code 2)
Table name: code 2
func TableTypeValue ¶
TableTypeValue converts string to TableType. If string is unknown TableType, it returns -1.
type Tables ¶
type Tables []*Table
Tables represents TABLES section.
type Ucs ¶
type Ucs struct {
// contains filtered or unexported fields
}
UCS represents UCS SymbolTable.
func (*Ucs) FormatString ¶
FormatString outputs data using given formatter.
func (*Ucs) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
type View ¶
type View struct {
// contains filtered or unexported fields
}
View represents VIEW SymbolTable.
func (*View) FormatString ¶
FormatString outputs data using given formatter.
func (*View) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.
type Viewport ¶
type Viewport struct { LowerLeft []float64 UpperRight []float64 ViewCenter []float64 SnapBase []float64 SnapSpacing []float64 GridSpacing []float64 ViewDirection []float64 ViewTarget []float64 Height float64 AspectRatio float64 LensLength float64 FrontClip float64 BackClip float64 SnapAngle float64 TwistAngle float64 // contains filtered or unexported fields }
Viewport represents VPORT SymbolTable.
func (*Viewport) FormatString ¶
FormatString outputs data using given formatter.
func (*Viewport) IsSymbolTable ¶
IsSymbolTable is for SymbolTable interface.