public void draw() {
		pixels = screen.getPixels();
		int xxx = xEnd - xOrigin;
		int yyy = yEnd - yOrigin;
		double d =  (Math.sqrt((xxx*xxx)+(yyy*yyy)));
		double xSeg = xxx/d;
		double ySeg = yyy/d;
		for(int i = 0; i < getLength(); i++){
			if(xOrigin <= 0 || xEnd >= screen.getWidth() || yOrigin <= 0 || yEnd >= screen.getHeight()) continue;
			int xx =(int)  (xSeg * i + xOrigin);
			int yy =(int) (ySeg * i + yOrigin);
			pixels[xx+yy*screen.getWidth()] = col.getColor();
		}
		setPixels(pixels);
	}