// New creates a new empty IMDraw. An optional Picture can be used to draw with a Picture.
//
// If you just want to draw primitive shapes, pass nil as the Picture.
557477
func New(pic pixel.Picture) *IMDraw {
	tri := &pixel.TrianglesData{}
	im := &IMDraw{
		tri:   tri,
		batch: pixel.NewBatch(tri, pic),
	}
	im.SetMatrix(pixel.IM)
	im.SetColorMask(pixel.Alpha(1))
	im.Reset()
	return im
}
407128
func New() *SkipList {
	comparator := func(left, right interface{}) bool {
		return left.(Ordered).LessThan(right.(Ordered))
	}
	return NewCustomMap(comparator)

}
1204394
func New(imageFsInfoProvider ImageFsInfoProvider, rootPath string, usingLegacyStats bool) (Interface, error) {
	client, err := winstats.NewPerfCounterClient()
	return &cadvisorClient{
		rootPath:       rootPath,
		winStatsClient: client,
	}, err
}
611016
func (g *Generator) New() (string, error) {
	if err := g.check(); err != nil {
		return "", err
	}
	f := strconv.Itoa(int(g.timestampGet()))
	s := g.macAddrFormat(g.macAddrGet())
	t := g.rHexString()
	s = s[len(s)-4:]
	id := fmt.Sprintf("%s%s%s", f, s, t)

	return id, nil
}
326746
func New(query string, distance int) (*Levenshtein, error) {
	lev := &dynamicLevenshtein{
		query:    query,
		distance: uint(distance),
	}
	dfabuilder := newDfaBuilder(lev)
	dfa, err := dfabuilder.build()
	if err != nil {
		return nil, err
	}
	return &Levenshtein{
		prog: lev,
		dfa:  dfa,
	}, nil
}
232088
func New(options ...Options) *Render {
	var o Options
	if len(options) > 0 {
		o = options[0]
	}

	r := Render{
		opt: o,
	}

	r.prepareOptions()
	r.compileTemplates()

	return &r
}
1256222
func New(o *data.Operation, i data.Input, x interface{}) (*Request, error) {
	input := reflect.ValueOf(i)
	if input.IsValid() && input.Elem().IsValid() {
		err := i.Validate()
		if err != nil {
			return nil, err
		}
	}
	output := reflect.ValueOf(x)

	return &Request{
		Operation: o,
		Input:     &input,
		Output:    &output,
	}, nil
}
289608
func New(kind GraphType) *Graph {
	g := &Graph{}
	if kind == Directed {
		g.Kind = Directed
	}
	return g
}
261056
func New(args map[string]string) *Pattern {
	var phrase, generator, color, baseColor string

	phrase = fmt.Sprintf("%s", time.Now().Local())

	if args["phrase"] != "" {
		phrase = args["phrase"]
	}

	if args["generator"] != "" {
		generator = args["generator"]
	}

	if args["color"] != "" {
		color = args["color"]
	}

	if args["baseColor"] != "" {
		baseColor = args["baseColor"]
	}

	return &Pattern{BaseColor: baseColor, Color: color, Generator: generator, Hash: utils.Hash(phrase), Svg: new(svg.SVG)}
}
672372
func New(bus embd.I2CBus) *BMP180 {
	return &BMP180{Bus: bus, Poll: pollDelay}
}
284213
func new(precision uint8, sparse bool) (*Sketch, error) {
	if precision < 4 || precision > 18 {
		return nil, fmt.Errorf("p has to be >= 4 and <= 18")
	}
	m := uint32(math.Pow(2, float64(precision)))
	s := &Sketch{
		m:     m,
		p:     precision,
		alpha: alpha(float64(m)),
	}
	if sparse {
		s.sparse = true
		s.tmpSet = set{}
		s.sparseList = newCompressedList(int(m))
	} else {
		s.regs = newRegisters(m)
	}
	return s, nil
}
644422
func New(typesMap derive.TypesMap, p derive.Printer, deps map[string]derive.Dependency) derive.Generator {
	return &gen{
		TypesMap:   typesMap,
		printer:    p,
		strconvPkg: p.NewImport("strconv", "strconv"),
		bytesPkg:   p.NewImport("bytes", "bytes"),
		fmtPkg:     p.NewImport("fmt", "fmt"),
	}
}
1105657
func New(opts ...Option) *Interpolator {
	opts2 := &Options{}
	setOptions(opts, newOptionSetter(opts2))
	return NewWithOptions(opts2)
}
427175
func New(c *client.Client, appID string, image string,
	procfile map[string]string) (api.Build, error) {

	u := fmt.Sprintf("/v1/apps/%s/builds/", appID)

	req := api.CreateBuildRequest{Image: image, Procfile: procfile}

	body, err := json.Marshal(req)

	if err != nil {
		return api.Build{}, err
	}

	resBody, err := c.BasicRequest("POST", u, body)

	if err != nil {
		return api.Build{}, err
	}

	build := api.Build{}
	if err = json.Unmarshal([]byte(resBody), &build); err != nil {
		return api.Build{}, err
	}

	return build, nil
}
905498
func NewDrawable(X *xgbutil.XUtil, did xproto.Drawable) (*Image, error) {
	// Get the geometry of the pixmap for use in the GetImage request.
	pgeom, err := xwindow.RawGeometry(X, xproto.Drawable(did))
	if err != nil {
		return nil, err
	}

	// Get the image data for each pixmap.
	pixmapData, err := xproto.GetImage(X.Conn(), xproto.ImageFormatZPixmap,
		did,
		0, 0, uint16(pgeom.Width()), uint16(pgeom.Height()),
		(1<<32)-1).Reply()
	if err != nil {
		return nil, err
	}

	// Now create the xgraphics.Image and populate it with data from
	// pixmapData and maskData.
	ximg := New(X, image.Rect(0, 0, pgeom.Width(), pgeom.Height()))

	// We'll try to be a little flexible with the image format returned,
	// but not completely flexible.
	err = readDrawableData(X, ximg, did, pixmapData,
		pgeom.Width(), pgeom.Height())
	if err != nil {
		return nil, err
	}

	return ximg, nil
}
1163994
func New(w, h int) *TextGraphics {
	tg := TextGraphics{}
	tg.tb = NewTextBuf(w, h)
	tg.w, tg.h = w, h
	tg.xoff = -1
	return &tg
}
657794
func New(bus embd.I2CBus) *BMP085 {
	return &BMP085{Bus: bus, Poll: pollDelay}
}