// DrawString draws the specified text at the specified point.
321997
func (dc *Context) DrawString(s string, x, y float64) {
	dc.DrawStringAnchored(s, x, y, 0, 0)
}
1023719
func (w *Writer) writeString(s string) error {
	_, err := io.WriteString(w.Writer, s)
	return err
}
566157
func (dc *Context) DrawImage(im image.Image, x, y int) {
	dc.DrawImageAnchored(im, x, y, 0, 0)
}
801657
func (dc *Context) MeasureString(s string) (w, h float64) {
	d := &font.Drawer{
		Face: dc.fontFace,
	}
	a := d.MeasureString(s)
	return float64(a >> 6), dc.fontHeight
}
1075758
func (g graph) String() string {
	return fmt.Sprintf("&graph{\n%s\n}",
		indent(fmt.Sprintf("definitions: %s", g.fmtDefinitions()), 1),
	)
}
1276906
func (g *Geometry) String() string {
	str, err := g.ToWKT()
	if err != nil {
		return "" // XXX: better to panic?
	}
	return str
}
467316
func (t *Text) SetString(fs string, argv ...interface{}) {
	indices := []rune(fmt.Sprintf(fs, argv...))
	if t.MaxRuneCount > 0 && len(indices) > t.MaxRuneCount+1 {
		indices = indices[0:t.MaxRuneCount]
	}
	t.String = string(indices)

	// ebo, vbo data
	glfloat_size := int32(4)

	t.vboIndexCount = len(indices) * 4 * 2 * 2 // 4 indexes per rune (containing 2 position + 2 texture)
	t.eboIndexCount = len(indices) * 6         // each rune requires 6 triangle indices for a quad
	t.RuneCount = len(indices)
	t.vboData = make([]float32, t.vboIndexCount, t.vboIndexCount)
	t.eboData = make([]int32, t.eboIndexCount, t.eboIndexCount)

	// generate the basic vbo data and bounding box
	// center the vbo data around the orthographic (0,0) point
	t.X1 = gltext.Point{0, 0}
	t.X2 = gltext.Point{0, 0}
	t.makeBufferData(indices)
	t.centerTheData(t.getLowerLeft())

	if gltext.IsDebug {
		prefix := gltext.DebugPrefix()
		fmt.Printf("%s bounding box %v %v\n", prefix, t.X1, t.X2)
		fmt.Printf("%s text vbo data\n%v\n", prefix, t.vboData)
		fmt.Printf("%s text ebo data\n%v\n", prefix, t.eboData)
	}
	if len(indices) > 0 {
		// in the event that we have no data to draw dont bother here
		gl.BindVertexArray(t.vao)
		gl.BindBuffer(gl.ARRAY_BUFFER, t.vbo)
		gl.BufferData(
			gl.ARRAY_BUFFER, int(glfloat_size)*t.vboIndexCount, gl.Ptr(t.vboData), gl.DYNAMIC_DRAW)
		gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, t.ebo)
		gl.BufferData(
			gl.ELEMENT_ARRAY_BUFFER, int(glfloat_size)*t.eboIndexCount, gl.Ptr(t.eboData), gl.DYNAMIC_DRAW)
		gl.BindVertexArray(0)

		// possibly not necesssary?
		gl.BindBuffer(gl.ARRAY_BUFFER, 0)
		gl.BindBuffer(gl.ELEMENT_ARRAY_BUFFER, 0)
	}

	// SetString can be called at anytime.  we want to make sure that if the user is updating the text,
	// the previous position will be maintained
	t.SetPosition(t.Position)
}
1145220
func (c *Context) DrawElements(mode, count, typ, offset int) {
	c.Call("drawElements", mode, count, typ, offset)
}
754857
func (w *ByteWriter) WriteString(val string, offset int) (int, error) {
	_, err := w.Write([]byte(val), offset)
	return offset + len(val), err
}
498237
func (ag *ArgGroup) ArgString() string {
	args := make([]string, len(ag.grp))
	for i, arg := range ag.grp {
		args[i] = arg.ArgString()
	}
	return strings.Join(args, "|")
}
262665
func LineString(ls orb.LineString, z maptile.Zoom) maptile.Set {
	set := make(maptile.Set)
	line(set, ls, z, nil)

	return set
}
658875
func (p *Path) String() string {
	if len(p.PointSet) == 0 {
		return "EMPTY"
	}

	buff := bytes.NewBuffer(nil)
	fmt.Fprintf(buff, "LINESTRING(%g %g", p.PointSet[0][0], p.PointSet[0][1])

	for i := 1; i < len(p.PointSet); i++ {
		fmt.Fprintf(buff, ",%g %g", p.PointSet[i][0], p.PointSet[i][1])
	}

	buff.Write([]byte(")"))
	return buff.String()
}
764367
func (f *File) drawingParser(path string) (*xlsxWsDr, int) {
	cNvPrID := 1
	if f.Drawings[path] == nil {
		content := xlsxWsDr{}
		content.A = NameSpaceDrawingML
		content.Xdr = NameSpaceDrawingMLSpreadSheet
		_, ok := f.XLSX[path]
		if ok { // Append Model
			decodeWsDr := decodeWsDr{}
			_ = xml.Unmarshal(namespaceStrictToTransitional(f.readXML(path)), &decodeWsDr)
			content.R = decodeWsDr.R
			cNvPrID = len(decodeWsDr.OneCellAnchor) + len(decodeWsDr.TwoCellAnchor) + 1
			for _, v := range decodeWsDr.OneCellAnchor {
				content.OneCellAnchor = append(content.OneCellAnchor, &xdrCellAnchor{
					EditAs:       v.EditAs,
					GraphicFrame: v.Content,
				})
			}
			for _, v := range decodeWsDr.TwoCellAnchor {
				content.TwoCellAnchor = append(content.TwoCellAnchor, &xdrCellAnchor{
					EditAs:       v.EditAs,
					GraphicFrame: v.Content,
				})
			}
		}
		f.Drawings[path] = &content
	}
	return f.Drawings[path], cNvPrID
}
1329816
func (b *ByteBuf) WriteString(v string) error {
	_, err := b.Write(StringToSlice(v))
	return err
}
854183
func ReadString(r Reader) (String, error) {
	var s String
	err := s.ReadFrom(r, UNKNOWN_LEN)
	return s, err
}
336486
func (b *Bytes) WriteString(str string) (int, error) {
	return b.Write([]byte(str))
}
8625
func (b bitboard) Draw() string {
	s := "\n A B C D E F G H\n"
	for r := 7; r >= 0; r-- {
		s += Rank(r).String()
		for f := 0; f < numOfSquaresInRow; f++ {
			sq := getSquare(File(f), Rank(r))
			if b.Occupied(sq) {
				s += "1"
			} else {
				s += "0"
			}
			s += " "
		}
		s += "\n"
	}
	return s
}