Exemple #1
0
// New creates a new Drawing.
func New() *Drawing {
	d := new(Drawing)
	d.Layers = make(map[string]*table.Layer)
	d.Layers["0"] = table.LY_0
	d.Groups = make(map[string]*object.Group)
	d.CurrentLayer = d.Layers["0"]
	d.Styles = make(map[string]*table.Style)
	d.Styles["STANDARD"] = table.ST_STANDARD
	d.CurrentStyle = d.Styles["STANDARD"]
	d.formatter = format.NewASCII()
	d.formatter.SetPrecision(16)
	d.Sections = []Section{
		header.New(),
		class.New(),
		table.New(),
		block.New(),
		entity.New(),
		object.New(),
	}
	d.dictionary = object.NewDictionary()
	d.addObject(d.dictionary)
	wd, ph := object.NewAcDbDictionaryWDFLT(d.dictionary)
	d.dictionary.AddItem("ACAD_PLOTSTYLENAME", wd)
	d.addObject(wd)
	d.addObject(ph)
	d.groupdict = object.NewDictionary()
	d.addObject(d.groupdict)
	d.dictionary.AddItem("ACAD_GROUP", d.groupdict)
	d.PlotStyle = ph
	d.Layers["0"].SetPlotStyle(d.PlotStyle)
	return d
}
Exemple #2
0
// String outputs data using default formatter.
func (f *ThreeDFace) String() string {
	fm := format.NewASCII()
	return f.FormatString(fm)
}
Exemple #3
0
// String outputs data using default formatter.
func (e *entity) String() string {
	f := format.NewASCII()
	return e.FormatString(f)
}
Exemple #4
0
// String outputs data using default formatter.
func (v *Viewport) String() string {
	f := format.NewASCII()
	return v.FormatString(f)
}
Exemple #5
0
// String outputs data using default formatter.
func (lt *LineType) String() string {
	f := format.NewASCII()
	return lt.FormatString(f)
}
Exemple #6
0
// String outputs data using default formatter.
func (d *DimStyle) String() string {
	f := format.NewASCII()
	return d.FormatString(f)
}
Exemple #7
0
// String outputs data using default formatter.
func (a *AppID) String() string {
	f := format.NewASCII()
	return a.FormatString(f)
}
Exemple #8
0
// String outputs data using default formatter.
func (p *Point) String() string {
	f := format.NewASCII()
	return p.FormatString(f)
}
Exemple #9
0
// String outputs data using default formatter.
func (v *Vertex) String() string {
	f := format.NewASCII()
	return v.FormatString(f)
}
Exemple #10
0
Fichier : ucs.go Projet : spyle/dxf
// String outputs data using default formatter.
func (u *Ucs) String() string {
	f := format.NewASCII()
	return u.FormatString(f)
}
Exemple #11
0
// String outputs data using default formatter.
func (l *Layer) String() string {
	f := format.NewASCII()
	return l.FormatString(f)
}
Exemple #12
0
// String outputs data using default formatter.
func (d *Dictionary) String() string {
	f := format.NewASCII()
	return d.FormatString(f)
}
Exemple #13
0
// String outputs data using default formatter.
func (b *Block) String() string {
	f := format.NewASCII()
	return b.FormatString(f)
}
Exemple #14
0
// String outputs data using default formatter.
func (t *Text) String() string {
	f := format.NewASCII()
	return t.FormatString(f)
}
Exemple #15
0
// String outputs data using default formatter.
func (g *Group) String() string {
	f := format.NewASCII()
	return g.FormatString(f)
}
Exemple #16
0
// String outputs data using default formatter.
func (c *Class) String() string {
	f := format.NewASCII()
	return c.FormatString(f)
}
Exemple #17
0
// String outputs data using default formatter.
func (st *Style) String() string {
	f := format.NewASCII()
	return st.FormatString(f)
}
Exemple #18
0
// String outputs data using default formatter.
func (l *LwPolyline) String() string {
	f := format.NewASCII()
	return l.FormatString(f)
}
Exemple #19
0
// String outputs data using default formatter.
func (p *AcDbPlaceHolder) String() string {
	f := format.NewASCII()
	return p.FormatString(f)
}