private void paintMarker(Graphics g) {

		Rectangle inside = getInside();
		int length = (getOrientation() == HORIZONTAL) ? inside.width
				: inside.height;
		int[] xPoints, yPoints;

		int value = (int) (Math.max(
				0,
				Math.min((1.0 / (getMaximum() - getMinimum()))
						* (getValue() - getMinimum()), 1)) * length);

		int valueBorder;
		if (getOrientation() == HORIZONTAL) {

			int xMiddle = inside.x + value;
			int yTop = inside.y;
			int yMiddle = (int) (inside.y + inside.height * 0.5);

			xPoints = new int[] { xMiddle - yMiddle, xMiddle, xMiddle + yMiddle };
			yPoints = new int[] { yTop, yMiddle, yTop };

			valueBorder = (int) (yMiddle * 0.2);
		} else {

			int yMiddle = (int) (inside.y + inside.height - value);
			int xMiddle = (int) (inside.x + inside.width * 0.5);
			int xTop = (int) (inside.x + inside.width);

			yPoints = new int[] { yMiddle - xMiddle, yMiddle, yMiddle + xMiddle };
			xPoints = new int[] { xTop, xMiddle, xTop };

			valueBorder = (int) (xMiddle * 0.2);
		}
		valueBorder = Math.max(1, valueBorder);

		Color actualColor = Color.YELLOW;

		AimSection[] sections = getSections();
		int position = 0;
		for (int i = 0; i < sections.length; i++) {
			AimSection section = sections[i];

			if (i == sections.length - 1) {
				actualColor = section.getColor();
				break;
			}

			int newPosition = position + (int) (length * section.getSize());
			if (value >= position && value <= newPosition) {
				actualColor = section.getColor();
				break;
			}
			position = newPosition;
		}

		g.setColor(actualColor);
		g.fillPolygon(xPoints, yPoints, 3);

		g.setColor(Null.nvl(getAimColor(), Color.BLACK));
		if (g instanceof Graphics2D) {
			Graphics2D g2d = (Graphics2D) g;

			g2d.setStroke(new BasicStroke(valueBorder, BasicStroke.CAP_ROUND,
					BasicStroke.JOIN_ROUND));
		}
		g.drawPolygon(xPoints, yPoints, 3);
	}