move a fence point
762428
def move(self, i, lat, lng, change_time=True):
        ''''''
        if i < 0 or i >= self.count():
            print("Invalid fence point number %u" % i)
        self.points[i].lat = lat
        self.points[i].lng = lng
        # ensure we close the polygon
        if i == 1:
                self.points[self.count()-1].lat = lat
                self.points[self.count()-1].lng = lng
        if i == self.count() - 1:
                self.points[1].lat = lat
                self.points[1].lng = lng
        if change_time:
            self.last_change = time.time()
465675
def move(self, x, y):
        """"""
        SetWindowPos(self._hwnd, None, x, y, 0, 0, SWP_NOSIZE)
986382
private void moveTo(int posX, int posY) {

        posX = (posX < 0)
        ? 0
        : (((posX + m_currentSelection.getWidth()) >= m_elementWidth)
        ? m_elementWidth - m_currentSelection.getWidth()
        : posX);
        posY = (posY < 0)
        ? 0
        : (((posY + m_currentSelection.getHeight()) >= m_elementHeight)
        ? m_elementHeight - m_currentSelection.getHeight()
        : posY);

        m_markerStyle.setTop(posY, Unit.PX);
        m_markerStyle.setLeft(posX, Unit.PX);

        m_overlayLeftStyle.setWidth(posX, Unit.PX);

        m_overlayTopStyle.setLeft(posX, Unit.PX);
        m_overlayTopStyle.setHeight(posY, Unit.PX);

        m_overlayBottomStyle.setLeft(posX, Unit.PX);
        m_overlayBottomStyle.setHeight(m_elementHeight - posY - m_currentSelection.getHeight(), Unit.PX);

        m_overlayRightStyle.setWidth(m_elementWidth - posX - m_currentSelection.getWidth(), Unit.PX);

        m_currentSelection.setTop(posY);
        m_currentSelection.setLeft(posX);
    }
1199033
def move_pointing(self, event):
        """"""

        (ra, dec) = self.c2p((self.canvasx(event.x),
                              self.canvasy(event.y)))
        closest = None
        this_pointing = None
        this_index = -1
        index = -1
        for pointing in self.pointings:
            index = index + 1
            # Find the camera we clicked closest too
            ds = pointing["camera"].separation(ra, dec)
            if this_pointing is None or ds < closest:
                this_index = index
                closest = ds
                this_pointing = pointing
        if this_pointing is None:
            return
        self.plabel.set(this_pointing['label']['text'])
        this_pointing["camera"].set_coord((ra*units.radian, dec*units.radian))
        ccds = numpy.radians(this_pointing["camera"].geometry)
        items = this_pointing["items"]
        label = this_pointing["label"]
        (x1, y1) = self.p2c((this_pointing["camera"].ra.radian, this_pointing["camera"].dec.radian))
        self.coords(label["id"], x1, y1)
        for i in range(len(ccds)):
            ccd = ccds[i]
            item = items[i]
            if len(ccd) == 4:
                (x1, y1) = self.p2c((ccd[0], ccd[1]))
                (x2, y2) = self.p2c((ccd[2], ccd[3]))
            else:
                (x1, y1) = self.p2c((ccd[0] - ccd[2]), ccd[1] - ccd[2])
                (x2, y2) = self.p2c((ccd[0] + ccd[2]), ccd[1] + ccd[2])
            self.coords(item, x1, y1, x2, y2)
        self.current_pointing(this_index)
710045
private void moveTo(double extrp, int dx, int dy)
    {
        final Force force = getMovementForce(transformable.getX(), transformable.getY(), dx, dy);
        final double sx = force.getDirectionHorizontal();
        final double sy = force.getDirectionVertical();

        // Move object
        moveX = sx;
        moveY = sy;
        transformable.moveLocation(extrp, force);
        moving = true;

        // Object arrived, next step
        final boolean arrivedX = checkArrivedX(extrp, sx, dx);
        final boolean arrivedY = checkArrivedY(extrp, sy, dy);

        if (arrivedX && arrivedY)
        {
            // When object arrived on next step, we place it on step location, in order to avoid bug
            // (to be sure object location is correct)
            setLocation(path.getX(currentStep), path.getY(currentStep));

            // Go to next step
            final int next = currentStep + 1;
            if (currentStep < getMaxStep() - 1)
            {
                updateObjectId(currentStep, next);
            }
            if (!pathStoppedRequested && !skip)
            {
                currentStep = next;
            }
            // Check if a new path has been assigned (this allow the object to change its path before finishing it)
            if (currentStep > 0 && !skip)
            {
                checkPathfinderChanges();
            }
        }
    }
984985
private void moveHorizontally(int offset) {
        if (offset < 0) {
            moveLeft(Math.abs(offset));
        } else if (offset > 0) {
            moveRight(offset);
        }
    }
1354347
private void moveToPrevBlock() {
		blk = new BlockId(blk.fileName(), blk.number() + 1);
		pg.read(blk);
		currentRec = 0 + pointerSize;
	}
668149
def move(self, place, distance = 1):
        """"""
        for d in range(distance):
            self.stream.write(self._get_cap('move '+place))
        self.flush()
150689
def move_pos(self, line=1, column=1):
        
        return self.chained(move.pos(line=line, column=column))
188265
def load_fence(self, filename):
        ''''''
        try:
            self.fenceloader.target_system = self.target_system
            self.fenceloader.target_component = self.target_component
            self.fenceloader.load(filename.strip('"'))
        except Exception as msg:
            print("Unable to load %s - %s" % (filename, msg))
            return
        print("Loaded %u geo-fence points from %s" % (self.fenceloader.count(), filename))
        self.send_fence()
1052219
function MoveTo (opts) {
    MoveTo.superclass.constructor.call(this, opts)

    this.endPosition = util.copy(opts.position)
}
1260756
function () {
    var self = this;
    if (self === DDPServer._CurrentWriteFence.get())
      throw Error("Can't arm the current fence");
    self.armed = true;
    self._maybeFire();
  }
1097932
def cmd_fence_remove(self, args):
        ''''''
        if len(args) < 1:
            print("Usage: fence remove FENCEPOINTNUM")
            return
        if not self.have_list:
            print("Please list fence points first")
            return

        idx = int(args[0])
        if idx <= 0 or idx > self.fenceloader.count():
            print("Invalid fence point number %u" % idx)
            return

        # note we don't subtract 1, as first fence point is the return point
        self.fenceloader.remove(idx)
        if self.send_fence():
            print("Removed fence point %u" % idx)
        else:
            print("Failed to remove fence point %u" % idx)
1004888
function (point) {
		var chart = this.chart,
			label = this.label, 
			pos = (this.options.positioner || this.getPosition).call(
				this,
				label.width,
				label.height,
				point
			);

		// do the move
		this.move(
			mathRound(pos.x), 
			mathRound(pos.y), 
			point.plotX + chart.plotLeft, 
			point.plotY + chart.plotTop
		);
	}
450702
public void addPointToTail( int x , int y ) {
		int index = tail.start + tail.length*2;

		int block[];
		int blockIndex = tail.block + index/blockLength;
		if( blockIndex == blocks.size ) {
			tailBlockSize = 0;
			block = blocks.grow();
		} else {
			block = blocks.get( blockIndex );
		}
		tailBlockSize += 2;
		index %= blockLength;

		block[index ] = x;
		block[index+1 ] = y;
		tail.length += 1;
	}
728242
def moveTo(self, vector):
        
        self._position = vector
        if self.isPenDown(): 
            self._pointsOfPolyline.append(self._position)
69358
def list_fence(self, filename):
        ''''''
        self.fenceloader.clear()
        count = self.get_mav_param('FENCE_TOTAL', 0)
        if count == 0:
            print("No geo-fence points")
            return
        for i in range(int(count)):
            p = self.fetch_fence_point(i)
            if p is None:
                return
            self.fenceloader.add(p)

        if filename is not None:
            try:
                self.fenceloader.save(filename.strip('"'))
            except Exception as msg:
                print("Unable to save %s - %s" % (filename, msg))
                return
            print("Saved %u geo-fence points to %s" % (self.fenceloader.count(), filename))
        else:
            for i in range(self.fenceloader.count()):
                p = self.fenceloader.point(i)
                self.console.writeln("lat=%f lng=%f" % (p.lat, p.lng))
        if self.status.logdir is not None:
            fname = 'fence.txt'
            if self.target_system > 1:
                fname = 'fence_%u.txt' % self.target_system
            fencetxt = os.path.join(self.status.logdir, fname)
            self.fenceloader.save(fencetxt.strip('"'))
            print("Saved fence to %s" % fencetxt)
        self.have_list = True