public void scale(int width, int height) { int targetWidth = width; int targetHeight = height; if (targetWidth == -1) { targetWidth = (int)(getWidth() * ((double)targetHeight / getHeight())); } if (targetHeight == -1) { targetHeight = (int)(getHeight() * ((double)targetWidth / getWidth())); } _image.scaleAbsolute(targetWidth, targetHeight); }
public void scale(int width, int height) { int targetWidth = width; int targetHeight = height; if (targetWidth == -1) { targetWidth = (int)(getWidth() * ((double)targetHeight / getHeight())); } if (targetHeight == -1) { targetHeight = (int)(getHeight() * ((double)targetWidth / getWidth())); } _image.scaleAbsolute(targetWidth, targetHeight); }
public void scale(int width, int height) { if (width > 0 || height > 0) { int currentWith = getWidth(); int currentHeight = getHeight(); int targetWidth = width; int targetHeight = height; if (targetWidth == -1) { targetWidth = (int)(currentWith * ((double)targetHeight / currentHeight)); } if (targetHeight == -1) { targetHeight = (int)(currentHeight * ((double)targetWidth / currentWith)); } if (currentWith != targetWidth || currentHeight != targetHeight) { _image.scaleAbsolute(targetWidth, targetHeight); } } }
public void scale(int width, int height) { if (width > 0 || height > 0) { int currentWith = getWidth(); int currentHeight = getHeight(); int targetWidth = width; int targetHeight = height; if (targetWidth == -1) { targetWidth = (int)(currentWith * ((double)targetHeight / currentHeight)); } if (targetHeight == -1) { targetHeight = (int)(currentHeight * ((double)targetWidth / currentWith)); } if (currentWith != targetWidth || currentHeight != targetHeight) { _image.scaleAbsolute(targetWidth, targetHeight); } } }
public void scale(int width, int height) { if (width > 0 || height > 0) { int currentWith = getWidth(); int currentHeight = getHeight(); int targetWidth = width; int targetHeight = height; if (targetWidth == -1) { targetWidth = (int)(currentWith * ((double)targetHeight / currentHeight)); } if (targetHeight == -1) { targetHeight = (int)(currentHeight * ((double)targetWidth / currentWith)); } if (currentWith != targetWidth || currentHeight != targetHeight) { _image.scaleAbsolute(targetWidth, targetHeight); } } }