// FillRect performs a fast fill of a rectangle with a specific color.
// (https://wiki.libsdl.org/SDL_FillRect)
350270
func (surface *Surface) FillRect(rect *Rect, color uint32) error {
	if C.SDL_FillRect(surface.cptr(), rect.cptr(), C.Uint32(color)) != 0 {
		return GetError()
	}
	return nil
}
917338
func (m *HashMap) Fillrate() uintptr {
	data := m.mapData()
	count := atomic.LoadUintptr(&data.count)
	l := uintptr(len(data.index))
	return (count * 100) / l
}
1223130
func (cr *Context) FillPreserve() {
	C.cairo_fill_preserve(cr.Ptr)
	if err := cr.status(); err != nil {
		panic(err)
	}
}
447926
func (renderer *Renderer) DrawRects(rects []Rect) error {
	return errorFromInt(int(
		C.SDL_RenderDrawRects(
			renderer.cptr(),
			rects[0].cptr(),
			C.int(len(rects)))))
}
186396
func FillDefaultFrom(defaultsList ...interface{}) interface{} {
	if len(defaultsList) == 0 {
		return nil
	}

	rootType := reflect.TypeOf(defaultsList[0])
	if rootType.Kind() != reflect.Ptr {
		panic(fmt.Sprintf("FillDefaultsFrom only takes pointer types, not %s", rootType))
	}
	typeToMake := rootType.Elem()

	existing := reflect.New(typeToMake).Interface()
	existingVal := reflect.ValueOf(existing).Elem()
	existingType := reflect.TypeOf(existing)
	for _, defaults := range defaultsList {
		if defaults == nil {
			continue
		}
		defaultType := reflect.TypeOf(defaults)
		if defaultType != existingType {
			panic(fmt.Sprintf("Uncompatible types %s vs %s", existingType, defaultType))
		}
		defaultsVal := reflect.ValueOf(defaults)
		if defaultsVal.IsNil() {
			continue
		}
		defaultsVal = defaultsVal.Elem()
		singleItemCopy(existingVal, defaultsVal)
	}
	return existing
}
748379
func (v *ViewPort) Fill(ch rune, style tcell.Style) {
	if v.v != nil {
		for y := 0; y < v.height; y++ {
			for x := 0; x < v.width; x++ {
				v.v.SetContent(x+v.physx, y+v.physy, ch, nil, style)
			}
		}
	}
}
1105288
func (s *session) fillRecord(r *sessionRecord, snapshot bool) {
	r.setNextFileNum(s.nextFileNum())

	if snapshot {
		if !r.has(recJournalNum) {
			r.setJournalNum(s.stJournalNum)
		}

		if !r.has(recSeqNum) {
			r.setSeqNum(s.stSeqNum)
		}

		for level, ik := range s.stCompPtrs {
			if ik != nil {
				r.addCompPtr(level, ik)
			}
		}

		r.setComparer(s.icmp.uName())
	}
}
433170
func chunkRectangles(slice rtree.Rectangles, numParts int64) []rtree.Rectangles {
	parts := make([]rtree.Rectangles, numParts)
	for i := int64(0); i < numParts; i++ {
		parts[i] = slice[i*int64(len(slice))/numParts : (i+1)*int64(len(slice))/numParts]
	}
	return parts
}
1338510
func (p *WebPage) ClipRect() (Rect, error) {
	var resp struct {
		Value rectJSON `json:"value"`
	}
	if err := p.ref.process.doJSON("POST", "/webpage/ClipRect", map[string]interface{}{"ref": p.ref.id}, &resp); err != nil {
		return Rect{}, err
	}
	return Rect{
		Top:    resp.Value.Top,
		Left:   resp.Value.Left,
		Width:  resp.Value.Width,
		Height: resp.Value.Height,
	}, nil
}
318283
func (rgc *RasterGraphicContext) FillString(text string) (cursor float64, err error) {
	cursor, err = rgc.FillStringAt(text, 0, 0)
	return
}
422044
func (s *StructInjector) fillStruct() {
	if !s.Has {
		return
	}
	// if field is Static then set it to the value that passed by the caller,
	// so will have the static bindings already and we can just use that value instead
	// of creating new instance.
	destElem := IndirectValue(s.initRef)
	for _, f := range s.fields {
		// if field is Static then set it to the value that passed by the caller,
		// so will have the static bindings already and we can just use that value instead
		// of creating new instance.
		if f.Object.BindType == Static {
			destElem.FieldByIndex(f.FieldIndex).Set(f.Object.Value)
		}
	}
}
376924
func (vr *vectorRenderer) SetFillColor(c drawing.Color) {
	vr.s.FillColor = c
}
868231
func (f *Fpdf) GetFillColor() (int, int, int) {
	return f.color.fill.ir, f.color.fill.ig, f.color.fill.ib
}
1350546
func FilledCircleColor(renderer *sdl.Renderer, x, y, rad int32, color sdl.Color) bool {
	_x := C.Sint16(x)
	_y := C.Sint16(y)
	_rad := C.Sint16(rad)
	_color := C.Uint32(gfxColor(color))
	return C.filledCircleColor((*C.SDL_Renderer)(unsafe.Pointer(renderer)), _x, _y, _rad, _color) == 0
}
1250818
func (rgc *RasterGraphicContext) ClearRect(x1, y1, x2, y2 int) {
	imageColor := image.NewUniform(rgc.current.FillColor)
	draw.Draw(rgc.img, image.Rect(x1, y1, x2, y2), imageColor, image.ZP, draw.Over)
}
1320462
func (surface *Surface) FillRects(rects []Rect, color uint32) error {
	if C.SDL_FillRects(surface.cptr(), rects[0].cptr(), C.int(len(rects)), C.Uint32(color)) != 0 {
		return GetError()
	}
	return nil
}
1018581
func (cr *Context) FillExtents() (float64, float64, float64, float64) {
	var x1 C.double
	var y1 C.double
	var x2 C.double
	var y2 C.double

	C.cairo_fill_extents(cr.Ptr, &x1, &y1, &x2, &y2)
	if err := cr.status(); err != nil {
		panic(err)
	}
	return float64(x1), float64(y1), float64(x2), float64(y2)
}