@Override
	public void draw(PortablePixmap pixMap) {


		//We need to calculate the actual coordinates for the PixMap using the relative coordinates provided
		int absoluteOriginX = convertToAbsoluteValues(this.originX, pixMap.getWidth());//<--this will get the actual origin X for PixMap
		int absoluteOriginY = convertToAbsoluteValues(this.originY, pixMap.getHeight());//<--this will get the actual origin Y for PixMap

		//We need to calculate the actual values for the Trapezoid using the relative values provided
		int absoluteOuterRadius = convertToAbsoluteValues(this.outerRadius, pixMap.getWidth());
		int absoluteInnerRadius = convertToAbsoluteValues(this.innerRadius, pixMap.getWidth());
		
		int absoluteOuterRadiusSquared = (int) Math.pow(absoluteOuterRadius, 2);
		int absoluteInnerRadiusSquared = (int) Math.pow(absoluteInnerRadius, 2);
		
		/*
		 * My algorithm for drawing a semi-ring:
		 * 
		 * 1. Convert the x and y origins, and inner and outer radius relative parameters to actual 
		 * pixel coordinates
		 * 2. Iterate over all the pixels in the PixelMap using a for loop. 
		 * 3. Check if the pixel is part of the shape by checking and then color it in if it is part of the shape
		 * 4. To check this, we will use the distance formula. We will use the distance from the origin to the Y axis and then then the 
		 * distance from this point to the (0,0) coordinate. At this point we will have an A side that is from the origin of the ring 
		 * to the Y axis and a B side that is from this point to the 0 position of the Y axis. We will use these A and B sides in 
		 * combination with the Pythagorean theorem to calculate side C of our triangle. We will check if C is less than or equal to 
		 * the radius squared of our ring. If so we know that the pixel we are in is within the range of our ring.
		 * 5. If the pixel we are at is less than or equal to the distance to the origin of the ring and within the range of the outer 
		 * and inner radius then we will fill that pixel in 
		 * with the color specified.
		 * 6. We will keep calculating a dynamic C side and checking if C is less than or equal to the radius squared to check if it is 
		 * within or inside our circle. We will do this until we have gone through all the pixels of the PixMap
		 * 7. To draw only a semi ring we will use the A side and B side as guides and fill in the appropriate direction to set the pixels
		 * 
		 */

		//Two loops are used to iterate through the pixel points of the image
		for (int row = 0; row < pixMap.getHeight(); row++) {
			for (int column = 0; column < pixMap.getWidth(); column++) {
				// Compare the location of <row,column> with the range of this Ring
				// x is the horizontal distance between origin of circle and current pixel
				double x = absoluteOriginX - column;
				// y is the vertical distance between origin of circle and current pixel
				double y = absoluteOriginY - row;
				//Here I use Pythagorean theorem to ensure that a point is within the range of distance between origin and current pixel
				double r = x * x + y * y;
				//If and only if the distance between current pixel and center of the ring is between the inner radius and outer radius
				if (r >= absoluteInnerRadiusSquared && r <= absoluteOuterRadiusSquared) {
					//We will use a switch statement to draw the half of our circle in the corresponding manner to direction integer provided
					switch (direction) {
					case 0:
						if (x >= 0)
							pixMap.setPixel(row, column, this.color);
						break;
					case 1:
						if (y >= 0)
							pixMap.setPixel(row, column, this.color);
						break;
					case 2:
						if (x <= 0)
							pixMap.setPixel(row, column, this.color);
						break;
					default:
						if (y <= 0)
							pixMap.setPixel(row, column, this.color);
						break;
					}
				}
			}
		}
	}//end of draw method