public static void paintArrow( Graphics2D g, int x, int y, int width, int height,
		int direction, boolean chevron, int arrowSize, float arrowThickness,
		float xOffset, float yOffset )
	{
		// compute arrow width/height
		// - make chevron arrows one pixel smaller because coordinates are based on center of pixels (0.5/0.5)
		// - make triangle arrows one pixel taller (and round height up) to make them look stronger
		float aw = UIScale.scale( arrowSize + (chevron ? -1 : 0) );
		float ah = chevron ? (aw / 2) : UIScale.scale( (arrowSize / 2) + 1 );

		// rotate arrow width/height for horizontal directions
		boolean vert = (direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH);
		if( !vert ) {
			float temp = aw;
			aw = ah;
			ah = temp;
		}

		// chevron lines end 1px outside of width/height
		// --> add 1px to arrow width/height for position calculation
		int extra = chevron ? 1 : 0;

		// compute arrow location
		float ox = ((width - (aw + extra)) / 2f) + UIScale.scale( xOffset );
		float oy = ((height - (ah + extra)) / 2f) + UIScale.scale( yOffset );
		float ax = x + ((direction == SwingConstants.WEST) ? -Math.round( -(ox + aw) ) - aw : Math.round( ox ));
		float ay = y + ((direction == SwingConstants.NORTH) ? -Math.round( -(oy + ah) ) - ah : Math.round( oy ));

		// paint arrow
		g.translate( ax, ay );
/*debug
		debugPaintArrow( g, Color.red, vert, Math.round( aw + extra ), Math.round( ah + extra ) );
debug*/
		Shape arrowShape = createArrowShape( direction, chevron, aw, ah );
		if( chevron ) {
			Stroke oldStroke = g.getStroke();
			g.setStroke( new BasicStroke( UIScale.scale( arrowThickness ) ) );
			drawShapePure( g, arrowShape );
			g.setStroke( oldStroke );
		} else {
			// triangle
			g.fill( arrowShape );
		}
		g.translate( -ax, -ay );
	}
Paints a chevron or triangle arrow in the center of the given rectangle.

@param g the graphics context used for painting
@param x the x coordinate of the rectangle
@param y the y coordinate of the rectangle
@param width the width of the rectangle
@param height the height of the rectangle
@param direction the arrow direction ({@link SwingConstants#NORTH}, {@link SwingConstants#SOUTH}
       {@link SwingConstants#WEST} or {@link SwingConstants#EAST})
@param chevron {@code true} for chevron arrow, {@code false} for triangle arrow
@param arrowSize the width of the painted arrow (for vertical direction) (will be scaled)
@param arrowThickness the thickness of the painted chevron arrow (will be scaled)
@param xOffset an offset added to the x coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled)
@param yOffset an offset added to the y coordinate of the arrow to paint it out-of-center. Usually zero. (will be scaled)

@since 3
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatUIUtils.java