Transform the feature's coordinates by the given offset.
329375
def transform(self, offset, newseqid=None):
        """"""
        for feature in self:
            feature._range.transform(offset)
            if newseqid is not None:
                feature.seqid = newseqid
691363
def window_to_offset(self, win_x, win_y):
        """"""
        arr_pts = np.asarray((win_x, win_y)).T
        return self.tform['cartesian_to_native'].from_(arr_pts).T[:2]
943710
def from_offset(tu, file, offset):
        
        return conf.lib.clang_getLocationForOffset(tu, file, offset)
517569
def get_transformation(self, coordinates):
        """"""
        atom1, atom2 = self.hinge_atoms
        direction = coordinates[atom1] - coordinates[atom2]
        direction /= np.linalg.norm(direction)
        direction *= np.random.uniform(-self.max_amplitude, self.max_amplitude)
        result = Translation(direction)
        return result
1260757
def offset(self, offset):
        
        query = self._copy()
        query._offset = offset
        return query
412651
def _reassigned_axes_event(event, ax):
    """"""
    event = copy.copy(event)
    event.xdata, event.ydata = (
        ax.transData.inverted().transform_point((event.x, event.y)))
    return event
247008
def __update_offsets(self, fileobj, atoms, delta, offset):
        """"""
        if delta == 0:
            return
        moov = atoms[b"moov"]
        for atom in moov.findall(b'stco', True):
            self.__update_offset_table(fileobj, ">%dI", atom, delta, offset)
        for atom in moov.findall(b'co64', True):
            self.__update_offset_table(fileobj, ">%dQ", atom, delta, offset)
        try:
            for atom in atoms[b"moof"].findall(b'tfhd', True):
                self.__update_tfhd(fileobj, atom, delta, offset)
        except KeyError:
            pass
143486
def _flip_feature(self, feature, parent_len):
    '''

    '''
    copy = feature.copy()
    # Put on the other strand
    if copy.strand == 0:
        copy.strand = 1
    else:
        copy.strand = 0
    # Adjust locations - guarantee that start is always less than end
    copy.start = parent_len - copy.start
    copy.stop = parent_len - copy.stop
    copy.start, copy.stop = copy.stop, copy.start
    return copy
184616
function (dx, dy) {
        var self = this, rect = self.layoutRect();

        self.moveTo(rect.x + dx, rect.y + dy);

        return self;
      }
1361091
def setLocation(self, x, y):
        """"""
        self.x = int(x)
        self.y = int(y)
        return self
1342620
def _convert_point(cls, feature):
        """"""
        lon, lat = feature['geometry']['coordinates']
        popup = feature['properties'].get('name', '')
        return cls(lat, lon)
898721
def get_offset(self):
        """"""
        return self.p1.y-self.get_slope()*self.p1.x
364882
function (x, y) {

      var t = this._currentTransform,
          o = this._offset;

      if (t.target.lockRotation) return;

      var lastAngle = atan2(t.ey - t.top - o.top, t.ex - t.left - o.left),
          curAngle = atan2(y - t.top - o.top, x - t.left - o.left);

      t.target._theta = (curAngle - lastAngle) + t.theta;
    }
1209095
function _transformShape(canvas, ctx, params, width, height) {

	// Get conversion factor for radians
	params._toRad = (params.inDegrees ? (PI / 180) : 1);

	params._transformed = true;
	ctx.save();

	// Optionally measure (x, y) position from top-left corner
	if (!params.fromCenter && !params._centered && width !== undefined) {
		// Always draw from center unless otherwise specified
		if (height === undefined) {
			height = width;
		}
		params.x += width / 2;
		params.y += height / 2;
		params._centered = true;
	}
	// Optionally rotate shape
	if (params.rotate) {
		_rotateCanvas(ctx, params, null);
	}
	// Optionally scale shape
	if (params.scale !== 1 || params.scaleX !== 1 || params.scaleY !== 1) {
		_scaleCanvas(ctx, params, null);
	}
	// Optionally translate shape
	if (params.translate || params.translateX || params.translateY) {
		_translateCanvas(ctx, params, null);
	}

}
486455
public static Point transform (float x, float y, float sx, float sy, float rotation,
                                   float tx, float ty, Point result) {
        return transform(x, y, sx, sy, FloatMath.sin(rotation), FloatMath.cos(rotation), tx, ty,
                         result);
    }
55754
def _coord2offset(self, coord):
        """"""
        size = self.size
        offset = 0
        for dim, index in enumerate(coord):
            size //= self._normshape[dim]
            offset += size * index
        return offset
315504
def _coordinates_changed(self):
        """"""
        if self._are_coordinates_valid():
            point1 = QgsPointXY(
                self.x_minimum.value(),
                self.y_maximum.value())
            point2 = QgsPointXY(
                self.x_maximum.value(),
                self.y_minimum.value())
            rect = QgsRectangle(point1, point2)

            self.tool.set_rectangle(rect)