Center on the given item or point.
3021
def center_on(self, item):
        
        if not isinstance(item, GraphicsItem):
            item = coerce_point(item)
        self.proxy.center_on(item)
264572
def ceil(self):
    """"""
    return Point(int(math.ceil(self.x)), int(math.ceil(self.y)))
578370
@Override
	public void setCenter(double cx, double cy, double cz) {
		this.center.set(cx, cy, cz);
	}
611575
def set_pointing_label(self):
	    """"""

	    self.pointings[self.current]['label']['text']=w.plabel.get()
	    self.reset()
465075
def point(self, pos):
        """"""
        return ((1 - pos) ** 3 * self.start) + \
               (3 * (1 - pos) ** 2 * pos * self.control1) + \
               (3 * (1 - pos) * pos ** 2 * self.control2) + \
               (pos ** 3 * self.end)
1155682
@Override
	public void setCenter(Point3D center) {
		this.cx = center.getX();
		this.cy = center.getY();
		this.cz = center.getZ();
	}
586172
def center(self):
        ''''''
        points = np.array(self._points)
        return np.mean(points[:, COLS.XYZ], axis=0)
970904
def _center(code, segment_dict):
    """"""
    while code in segment_dict:
        segment = segment_dict[code]
        yield segment
        code = segment.center
1118348
public Pie center(Object width, Object height) {
        this.center = new Object[]{width, height};
        return this;
    }
1137490
public void setCenterPoint(Coordinate coordinate) {
		this.x = coordinate.getX() - 0.5 * this.width;
		this.y = coordinate.getY() - 0.5 * this.height;
	}
458870
def point(self, x=None, y=None, z=None, m=None, shape=None, part=None, point=None, addr=None):
        """"""
        # shape, part, point
        if shape and part and point:
            try: self._shapes[shape]
            except IndexError: self._shapes.append([])
            try: self._shapes[shape][part]
            except IndexError: self._shapes[shape].append([])
            try: self._shapes[shape][part][point]
            except IndexError: self._shapes[shape][part].append([])
            p = self._shapes[shape][part][point]
            if x: p[0] = x
            if y: p[1] = y
            if z: p[2] = z
            if m: p[3] = m
            self._shapes[shape][part][point] = p
        # shape, part
        elif shape and part and not point:
            try: self._shapes[shape]
            except IndexError: self._shapes.append([])
            try: self._shapes[shape][part]
            except IndexError: self._shapes[shape].append([])
            points = self._shapes[shape][part]
            for i in range(len(points)):
                p = points[i]
                if x: p[0] = x
                if y: p[1] = y
                if z: p[2] = z
                if m: p[3] = m
                self._shapes[shape][part][i] = p
        # shape
        elif shape and not part and not point:
            try: self._shapes[shape]
            except IndexError: self._shapes.append([])

        # point
        # part
        if addr:
            shape, part, point = addr
            self._shapes[shape][part][point] = [x, y, z, m]
        else:
            Writer.point(self, x, y, z, m)
        if self.autoBalance:
            self.balance()
201114
public void centerOnTile (int tx, int ty)
    {
        Rectangle trect = MisoUtil.getTilePolygon(_metrics, tx, ty).getBounds();
        int nx = trect.x + trect.width/2 - _vbounds.width/2;
        int ny = trect.y + trect.height/2 - _vbounds.height/2;
//         Log.info("Centering on t:" + StringUtil.coordsToString(tx, ty) +
//                  " b:" + StringUtil.toString(trect) +
//                  " vb: " + StringUtil.toString(_vbounds) +
//                  ", n:" + StringUtil.coordsToString(nx, ny) + ".");
        setViewLocation(nx, ny);
    }
1360446
def point_in_circle(pt, center, radius):
    '''
    
    '''
    d = np.linalg.norm(np.asarray(pt) - np.asarray(center))
    return d <= radius
1237817
def point(self, t):
        """"""
        distance = self.end - self.start
        return self.start + distance*t
200696
public void setCenterY(float centerY) {
        if ((points == null) || (center == null)) {
        	checkPoints();
        }
        
        float yDiff = centerY - getCenterY();
        setY(y + yDiff);
    }
376217
def place_center(window, width=None, height=None):
    """"""
    screenGeometry = QApplication.desktop().screenGeometry()

    w, h = window.width(), window.height()

    if width is not None or height is not None:
        w = width if width is not None else w
        h = height if height is not None else h
        window.setGeometry(0, 0, w, h)

    x = (screenGeometry.width() - w) / 2
    y = (screenGeometry.height() - h) / 2
    window.move(x, y)
648099
def Point(pos=(0, 0, 0), r=12, c="red", alpha=1):
    """"""
    if len(pos) == 2:
        pos = (pos[0], pos[1], 0)
    actor = Points([pos], r, c, alpha)
    return actor