当前位置: 首页>>代码示例>>Golang>>正文


Golang Formatter.WriteHex方法代码示例

本文整理汇总了Golang中github.com/yofu/dxf/format.Formatter.WriteHex方法的典型用法代码示例。如果您正苦于以下问题:Golang Formatter.WriteHex方法的具体用法?Golang Formatter.WriteHex怎么用?Golang Formatter.WriteHex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/yofu/dxf/format.Formatter的用法示例。


在下文中一共展示了Formatter.WriteHex方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Format

// Format writes data to formatter.
func (v *View) Format(f format.Formatter) {
	f.WriteString(0, "VIEW")
	f.WriteHex(5, v.handle)
	if v.owner != nil {
		f.WriteHex(330, v.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbViewTableRecord")
	f.WriteString(2, v.name)
}
开发者ID:spyle,项目名称:dxf,代码行数:11,代码来源:view.go

示例2: Format

// Format writes data to formatter.
func (u *Ucs) Format(f format.Formatter) {
	f.WriteString(0, "UCS")
	f.WriteHex(5, u.handle)
	if u.owner != nil {
		f.WriteHex(330, u.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbUCSTableRecord")
	f.WriteString(2, u.name)
}
开发者ID:spyle,项目名称:dxf,代码行数:11,代码来源:ucs.go

示例3: Format

// Format writes data to formatter.
func (d *Dictionary) Format(f format.Formatter) {
	f.WriteString(0, "DICTIONARY")
	f.WriteHex(5, d.handle)
	f.WriteString(100, "AcDbDictionary")
	f.WriteInt(281, 1)
	for k, v := range d.item {
		f.WriteString(3, k)
		f.WriteHex(350, v.Handle())
	}
}
开发者ID:spyle,项目名称:dxf,代码行数:11,代码来源:dictionary.go

示例4: Format

// Format writes data to formatter.
func (a *AppID) Format(f format.Formatter) {
	f.WriteString(0, "APPID")
	f.WriteHex(5, a.handle)
	if a.owner != nil {
		f.WriteHex(330, a.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbRegAppTableRecord")
	f.WriteString(2, a.name)
	f.WriteInt(70, 0)
}
开发者ID:spyle,项目名称:dxf,代码行数:12,代码来源:appid.go

示例5: Format

// Format writes data to formatter.
func (d *DimStyle) Format(f format.Formatter) {
	f.WriteString(0, "DIMSTYLE")
	f.WriteHex(105, d.handle)
	if d.owner != nil {
		f.WriteHex(330, d.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbDimStyleTableRecord")
	f.WriteString(2, d.name)
	f.WriteInt(70, 0)
}
开发者ID:spyle,项目名称:dxf,代码行数:12,代码来源:dimstyle.go

示例6: Format

// Format writes data to formatter.
func (b *BlockRecord) Format(f format.Formatter) {
	f.WriteString(0, "BLOCK_RECORD")
	f.WriteHex(5, b.handle)
	if b.owner != nil {
		f.WriteHex(330, b.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbBlockTableRecord")
	f.WriteString(2, b.name)
	f.WriteInt(70, 0)
	f.WriteInt(280, 1)
	f.WriteInt(281, 0)
}
开发者ID:spyle,项目名称:dxf,代码行数:14,代码来源:block_record.go

示例7: Format

// Format writes data to formatter.
func (p *Polyline) Format(f format.Formatter) {
	p.entity.Format(f)
	f.WriteString(100, "AcDb3dPolyline")
	f.WriteInt(66, 1)
	f.WriteString(10, "0.0")
	f.WriteString(20, "0.0")
	f.WriteString(30, "0.0")
	f.WriteInt(70, p.Flag)
	for _, v := range p.Vertices {
		v.Format(f)
	}
	f.WriteString(0, "SEQEND")
	f.WriteHex(5, p.endhandle)
	f.WriteString(100, "AcDbEntity")
	f.WriteString(8, p.Layer().Name())
}
开发者ID:yofu,项目名称:dxf,代码行数:17,代码来源:polyline.go

示例8: Format

// Format writes data to formatter.
func (st *Style) Format(f format.Formatter) {
	f.WriteString(0, "STYLE")
	f.WriteHex(5, st.handle)
	if st.owner != nil {
		f.WriteHex(330, st.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbTextStyleTableRecord")
	f.WriteString(2, st.name)
	f.WriteInt(70, 0)
	f.WriteString(40, "0.0")
	f.WriteString(41, "1.0")
	f.WriteString(50, "0.0")
	f.WriteInt(71, 0)
	f.WriteString(42, "0.2")
	f.WriteString(3, st.FontName)
	f.WriteString(4, st.BigFontName)
}
开发者ID:spyle,项目名称:dxf,代码行数:19,代码来源:style.go

示例9: Format

// Format writes data to formatter.
func (t *Table) Format(f format.Formatter) {
	f.WriteString(0, "TABLE")
	f.WriteString(2, t.name)
	f.WriteHex(5, t.handle)
	f.WriteString(100, "AcDbSymbolTable")
	f.WriteInt(70, t.size)
	if t.name == "DIMSTYLE" {
		f.WriteString(100, "AcDbDimStyleTable")
		f.WriteInt(71, t.size)
		for i := 0; i < t.size; i++ {
			f.WriteHex(340, t.tables[i].Handle())
		}
	}
	for i := 0; i < t.size; i++ {
		t.tables[i].Format(f)
	}
	f.WriteString(0, "ENDTAB")
}
开发者ID:spyle,项目名称:dxf,代码行数:19,代码来源:table.go

示例10: Format

// Format writes data to formatter.
func (lt *LineType) Format(f format.Formatter) {
	f.WriteString(0, "LTYPE")
	f.WriteHex(5, lt.handle)
	if lt.owner != nil {
		f.WriteHex(330, lt.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbLinetypeTableRecord")
	f.WriteString(2, lt.name)
	f.WriteInt(70, 0)
	f.WriteString(3, lt.Description)
	f.WriteInt(72, 65)
	f.WriteInt(73, len(lt.lengths))
	f.WriteFloat(40, lt.TotalLength())
	for _, l := range lt.lengths {
		f.WriteFloat(49, l)
		f.WriteInt(74, 0)
	}
}
开发者ID:spyle,项目名称:dxf,代码行数:20,代码来源:linetype.go

示例11: Format

// Format writes data to formatter.
func (b *Block) Format(f format.Formatter) {
	f.WriteString(0, "BLOCK")
	f.WriteHex(5, b.handle)
	f.WriteString(100, "AcDbEntity")
	f.WriteString(8, b.layer.Name())
	f.WriteString(100, "AcDbBlockBegin")
	f.WriteString(2, b.Name)
	f.WriteInt(70, b.Flag)
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10, b.Coord[i])
	}
	f.WriteString(3, b.Name)
	f.WriteString(1, b.Description)
	f.WriteString(0, "ENDBLK")
	f.WriteHex(5, b.endhandle)
	f.WriteString(100, "AcDbEntity")
	f.WriteString(8, b.layer.Name())
	f.WriteString(100, "AcDbBlockEnd")
}
开发者ID:spyle,项目名称:dxf,代码行数:20,代码来源:block.go

示例12: Format

// Format writes data to formatter.
func (v *Viewport) Format(f format.Formatter) {
	f.WriteString(0, "VPORT")
	f.WriteHex(5, v.handle)
	if v.owner != nil {
		f.WriteHex(330, v.owner.Handle())
	}
	f.WriteString(100, "AcDbSymbolTableRecord")
	f.WriteString(100, "AcDbViewportTableRecord")
	f.WriteString(2, v.name)
	f.WriteInt(70, 0)
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10, v.LowerLeft[i])
	}
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10+1, v.UpperRight[i])
	}
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10+2, v.ViewCenter[i])
	}
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10+3, v.SnapBase[i])
	}
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10+4, v.SnapSpacing[i])
	}
	for i := 0; i < 2; i++ {
		f.WriteFloat((i+1)*10+5, v.GridSpacing[i])
	}
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10+6, v.ViewDirection[i])
	}
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10+7, v.ViewTarget[i])
	}
	f.WriteFloat(40, v.Height)
	f.WriteFloat(41, v.AspectRatio)
	f.WriteFloat(42, v.LensLength)
	f.WriteFloat(43, v.FrontClip)
	f.WriteFloat(44, v.BackClip)
	f.WriteFloat(50, v.SnapAngle)
	f.WriteFloat(51, v.TwistAngle)
}
开发者ID:spyle,项目名称:dxf,代码行数:43,代码来源:viewport.go

示例13: WriteTo

// WriteTo writes HEADER information to formatter.
func (h *Header) WriteTo(f format.Formatter) {
	f.WriteString(0, "SECTION")
	f.WriteString(2, "HEADER")
	f.WriteString(9, "$ACADVER")
	f.WriteString(1, h.Version)
	f.WriteString(9, "$INSBASE")
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10, h.InsBase[i])
	}
	f.WriteString(9, "$EXTMIN")
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10, h.ExtMin[i])
	}
	f.WriteString(9, "$EXTMAX")
	for i := 0; i < 3; i++ {
		f.WriteFloat((i+1)*10, h.ExtMax[i])
	}
	f.WriteString(9, "$LTSCALE")
	f.WriteFloat(40, h.LtScale)
	f.WriteString(9, "$HANDSEED")
	f.WriteHex(5, h.handseed)
	f.WriteString(0, "ENDSEC")
}
开发者ID:spyle,项目名称:dxf,代码行数:24,代码来源:header.go

示例14: Format

// Format writes data to formatter.
func (p *AcDbPlaceHolder) Format(f format.Formatter) {
	f.WriteString(0, "ACDBPLACEHOLDER")
	f.WriteHex(5, p.handle)
	if p.owner != nil {
		f.WriteString(102, "{ACAD_REACTORS")
		f.WriteHex(330, p.owner.Handle())
		f.WriteString(102, "}")
		f.WriteHex(330, p.owner.Handle())
	}
}
开发者ID:spyle,项目名称:dxf,代码行数:11,代码来源:acdbplaceholder.go

示例15: Format

// Format writes data to formatter.
func (g *Group) Format(f format.Formatter) {
	f.WriteString(0, "GROUP")
	f.WriteHex(5, g.handle)
	f.WriteString(102, "{ACAD_REACTORS")
	f.WriteHex(330, g.owner.Handle())
	f.WriteString(102, "}")
	f.WriteHex(330, g.owner.Handle())
	f.WriteString(100, "AcDbGroup")
	f.WriteString(300, g.Description)
	f.WriteInt(70, 0)
	if g.selectable {
		f.WriteInt(71, 1)
	} else {
		f.WriteInt(71, 0)
	}
	for _, e := range g.entities {
		f.WriteHex(340, e.Handle())
	}
}
开发者ID:spyle,项目名称:dxf,代码行数:20,代码来源:group.go


注:本文中的github.com/yofu/dxf/format.Formatter.WriteHex方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。