// See cairo_mesh_pattern_move_to().
//
// C API documentation: http://cairographics.org/manual/cairo-cairo-pattern-t.html#cairo-mesh-pattern-move-to
960167
func (pattern *MeshPattern) MoveTo(x, y float64) {
	C.cairo_mesh_pattern_move_to(pattern.Ptr, C.double(x), C.double(y))
	if err := pattern.status(); err != nil {
		panic(err)
	}
}
90498
func (m *Matrix) Reshape(r, c uint) (*Matrix, error) {
	if r*c != m.Rows*m.Cols {
		return nil, fmt.Errorf("Size is not same")
	}
	row := 0
	col := 0
	newMat := make([][]float32, r)
	for y := 0; y < int(r); y++ {
		newMat[y] = make([]float32, c)
		for x := 0; x < int(c); x++ {
			if col > int(m.Cols)-1 {
				row++
				col = 0
			}
			newMat[y][x] = m.M[row][col]
			col++
		}
	}
	return NewMatrix(newMat), nil
}
178509
func (l *List) MoveToFront(e *Element) {
	if e.list != l || l.root.next == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), &l.root)
}
1339866
func (c Circle) Moved(delta Vec) Circle {
	return Circle{
		Center: c.Center.Add(delta),
		Radius: c.Radius,
	}
}
1036743
func PatternCreateRGB(red, green, blue float64) *Pattern {
	ret := wrapPattern(C.cairo_pattern_create_rgb(C.double(red), C.double(green), C.double(blue)))
	if err := ret.status(); err != nil {
		panic(err)
	}
	return ret
}
375849
func moveCursorUp(printTo io.Writer, numLines int) {
	if numLines > 0 {
		fmt.Fprintf(printTo, "\033[%dA", numLines)
	}
}
316481
func (l *ItemList) MoveToFront(e *ItemElement) {
	if e.list != l || l.root.next == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), &l.root)
}
868144
func (converter PatternToListConverter) Convert(value interface{}, item AttributeAccessor) (interface{}, error) {
	result := []string{}
	i := 0
	for {
		key := AttributeExpression(strings.Replace(converter.pattern, "?", strconv.Itoa(i), 1))
		if v := item.Get(key); v != nil {
			result = append(result, v.(string))
		} else {
			break
		}
		i++
	}
	return result, nil
}
1096292
func (mat *T) Translate(v *vec2.T) *T {
	mat[2][0] += v[0]
	mat[2][1] += v[1]
	return mat
}
1320367
func (cr *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64) {
	C.cairo_curve_to(cr.Ptr, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x3), C.double(y3))
	if err := cr.status(); err != nil {
		panic(err)
	}
}
842407
func Translate2D(Tx, Ty float32) Mat3 {
	return Mat3{1, 0, 0, 0, 1, 0, float32(Tx), float32(Ty), 1}
}
1141087
func PatternCreateRadial(cx0, cy0, radius0, cx1, cy1, radius1 float64) *Pattern {
	ret := wrapPattern(C.cairo_pattern_create_radial(C.double(cx0), C.double(cy0), C.double(radius0), C.double(cx1), C.double(cy1), C.double(radius1)))
	if err := ret.status(); err != nil {
		panic(err)
	}
	return ret
}
1252956
func (matrix *Matrix) Invert() error {
	ret := Status(C.cairo_matrix_invert((*C.cairo_matrix_t)(unsafe.Pointer(matrix)))).toError()
	return ret
}
335337
func (mat *T) Translate(v *vec3.T) *T {
	mat[3][0] += v[0]
	mat[3][1] += v[1]
	mat[3][2] += v[2]
	return mat
}
22836
func (pattern *MeshPattern) CurveTo(x1, y1, x2, y2, x3, y3 float64) {
	C.cairo_mesh_pattern_curve_to(pattern.Ptr, C.double(x1), C.double(y1), C.double(x2), C.double(y2), C.double(x3), C.double(y3))
	if err := pattern.status(); err != nil {
		panic(err)
	}
}
1082253
func (r *RuneBuffer) MoveToLineStart() {
	for i := r.idx; i > 0; i-- {
		if r.buf[i-1] == '\n' {
			r.idx = i
			return
		}
	}
	r.idx = 0
}
761394
func (l *list) MoveToFront(e *element) {
	if e.list != l || l.root.next == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), &l.root)
}