src/main/java/com/mxgraph/canvas/mxGraphicsCanvas2D.java
protected final Graphics2D createImageGraphics(double x, double y, double w,
			double h, boolean flipH, boolean flipV)
	{
		Graphics2D g2 = state.g;

		if (flipH || flipV)
		{
			g2 = (Graphics2D) g2.create();

			if (flipV && flipH)
			{
				g2.rotate(Math.toRadians(180), x + w / 2, y + h / 2);
			}
			else
			{
				int sx = 1;
				int sy = 1;
				int dx = 0;
				int dy = 0;

				if (flipH)
				{
					sx = -1;
					dx = (int) (-w - 2 * x);
				}

				if (flipV)
				{
					sy = -1;
					dy = (int) (-h - 2 * y);
				}

				g2.scale(sx, sy);
				g2.translate(dx, dy);
			}
		}

		return g2;
	}
/**
	 * Creates a graphic instance for rendering an image.
	 */
Creates a graphic instance for rendering an image.
Creates a graphic instance for rendering an image .
protected final Graphics2D createImageGraphics(double x, double y, double w,
			double h, boolean flipH, boolean flipV)
	{
		Graphics2D g2 = state.g;
		if (flipH || flipV)
		{
			g2 = (Graphics2D) g2.create();
			if (flipV && flipH)
			{
				g2.rotate(Math.toRadians(180), x + w / 2, y + h / 2);
			}
			else
			{
				int sx = 1;
				int sy = 1;
				int dx = 0;
				int dy = 0;
				if (flipH)
				{
					sx = -1;
					dx = (int) (-w - 2 * x);
				}
				if (flipV)
				{
					sy = -1;
					dy = (int) (-h - 2 * y);
				}
				g2.scale(sx, sy);
				g2.translate(dx, dy);
			}
		}
		return g2;
	}
protected final Graphics2D createImageGraphics ( double x , double y , double w , double h , boolean flipH , boolean flipV ) { Graphics2D g2 = state . g ; if ( flipH || flipV ) { g2 = ( Graphics2D ) g2 . create ( ) ; if ( flipV && flipH ) { g2 . rotate ( Math . toRadians ( 180 ) , x + w / 2 , y + h / 2 ) ; } else { int sx = 1 ; int sy = 1 ; int dx = 0 ; int dy = 0 ; if ( flipH ) { sx = - 1 ; dx = ( int ) ( - w - 2 * x ) ; } if ( flipV ) { sy = - 1 ; dy = ( int ) ( - h - 2 * y ) ; } g2 . scale ( sx , sy ) ; g2 . translate ( dx , dy ) ; } } return g2 ; }
Creates a graphic instance for rendering an image.
Creates a graphic instance for rendering an image .