Set pixel at position x, y to the given value.  X and Y should be values
        of 0 to 8.  Value should be OFF, GREEN, RED, or YELLOW.
493266
def set_pixel(self, x, y, value):
        
        if x < 0 or x > 7 or y < 0 or y > 7:
            # Ignore out of bounds pixels.
            return
        # Set green LED based on 1st bit in value.
        self.set_led(y * 16 + x, 1 if value & GREEN > 0 else 0)
        # Set red LED based on 2nd bit in value.
        self.set_led(y * 16 + x + 8, 1 if value & RED > 0 else 0)
611118
function(x, y) {
        var imageData = this._context.getImageData(x, y, 1, 1);
        var data = imageData.data;
        return data[3] === 0;
    }
1033731
def set_rgb(self, red, green, blue):
        
        x, y = rgb_to_xy(red, green, blue)
        self.xy = [x, y]
1199533
def set_y(idx, val)
      check_bounds(idx)
      FFIGeos.GEOSCoordSeq_setY_r(Geos.current_handle_pointer, ptr, idx, val.to_f)
    end
248473
def color_point(x, y, fill)
      f = copy
      f.pixel_color(x, y, fill)
      f
    end
1094701
def set_text(self, x, y, text):
        
        col, row = get_pos(x, y)

        for i,c in enumerate(text):
            self.chars[row][col+i] = c
1158243
def tile_at(self, zoom, position):
        
        x, y = self.project_pixels(position, zoom)
        return (zoom, int(x/self.tilesize), int(y/self.tilesize))
767361
def set(self, x, y):
        
        x = normalize(x)
        y = normalize(y)
        col, row = get_pos(x, y)

        if type(self.chars[row][col]) != int:
            return

        self.chars[row][col] |= pixel_map[y % 4][x % 2]
950550
public void setPixelValue(WritableRaster raster, int x, int y,
			int unsignedPixelValue) {
		short pixelValue = getPixelValue(unsignedPixelValue);
		setPixelValue(raster, x, y, pixelValue);
	}
727333
public int getUnsignedPixelValue(short[] pixelValues, int width, int x,
			int y) {
		short pixelValue = getPixelValue(pixelValues, width, x, y);
		int unsignedPixelValue = getUnsignedPixelValue(pixelValue);
		return unsignedPixelValue;
	}
320618
def _set_position(self, value):
        
        pX, pY = self.position
        x, y = value
        dX = x - pX
        dY = y - pY
        self.moveBy((dX, dY))
1308532
def set_colour(self, r, g, b):
        
        if not 0 <= r <= 255:
            raise ValueError("The value for red needs to be between 0 and 255.")
        if not 0 <= g <= 255:
            raise ValueError("The value for green needs to be between 0 and 255.")
        if not 0 <= b <= 255:
            raise ValueError("The value for blue needs to be between 0 and 255.")

        #print(BulbDevice)
        hexvalue = BulbDevice._rgb_to_hexvalue(r, g, b)

        payload = self.generate_payload(SET, {
            self.DPS_INDEX_MODE: self.DPS_MODE_COLOUR,
            self.DPS_INDEX_COLOUR: hexvalue})
        data = self._send_receive(payload)
        return data
90855
public void setCorner(int index, double x, double y) {
        if (index <= 0) {
            this.x1 = x;
            this.y1 = y;
        } else if (index == 1) {
            this.x2 = x;
            this.y2 = y;
        } else if (index == 2) {
            this.x3 = x;
            this.y3 = y;
        } else if (index >= 3) {
            this.x4 = x;
            this.y4 = y;
        }
        calcG();
    }
686634
def setPixelColorRGB(self, n, red, green, blue):
        
        self.setPixelColor(n, Color(red, green, blue))
799553
def pixel(self, x, y, size=None):
        """"""
        if (size is None):
            size = self.sz
        # Have we go to the smallest element?
        if (size <= 3):
            if (_not_diagonal(x, y)):
                return None
            else:
                return (0, 0, 0)
        divisor = size // 3
        if (_not_diagonal(x // divisor, y // divisor)):
            return None
        return self.pixel(x % divisor, y % divisor, divisor)
408791
public void setColor(int color) {
		int x1, y1;
		if(mOrientation) {
			x1 = (mBarLength + mBarPointerHaloRadius);
			y1 = mBarThickness;
		}        else {
			x1 = mBarThickness;
			y1 = (mBarLength + mBarPointerHaloRadius);
		}
		
		Color.colorToHSV(color, mHSVColor);
		shader = new LinearGradient(mBarPointerHaloRadius, 0,
				x1, y1, new int[] {Color.WHITE, color, Color.BLACK}, null,
				Shader.TileMode.CLAMP);
		mBarPaint.setShader(shader);
	    calculateColor(mBarPointerPosition);
		mBarPointerPaint.setColor(mColor);
		if (mPicker != null) {
			mPicker.setNewCenterColor(mColor);
			if(mPicker.hasOpacityBar())
				mPicker.changeOpacityBarColor(mColor);
		}
		invalidate();
	}
678276
def pixels(self, value: int) -> 'Gap':
        """"""
        raise_not_number(value)
        self.gap = '{}px'.format(value)
        return self