| 112 | |
| 113 | /// {@inheritDoc} |
| 114 | @Override |
| 115 | public void scale(int width, int height) { |
| 116 | int srcWidth = getWidth(); |
| 117 | int srcHeight = getHeight(); |
| 118 | |
| 119 | // no need to scale |
| 120 | if (srcWidth == width && srcHeight == height) { |
| 121 | return; |
| 122 | } |
| 123 | int[] currentArray = new int[srcWidth]; |
| 124 | int[] destinationArray = new int[width * height]; |
| 125 | scaleArray(srcWidth, srcHeight, height, width, currentArray, destinationArray); |
| 126 | |
| 127 | this.width = width; |
| 128 | this.height = height; |
| 129 | this.rgb = destinationArray; |
| 130 | } |
| 131 | |
| 132 | /// Unsupported in the current version, this method will be implemented in a future release |
| 133 | @Override |