Change game directory
Add width and height to scale image Signed-off-by: Chris Cromer <chris@cromer.cl>
This commit is contained in:
parent
e38fca75b6
commit
15c713fed4
1
.idea/.name
Normal file
1
.idea/.name
Normal file
@ -0,0 +1 @@
|
||||
Azaraka
|
@ -2,11 +2,11 @@
|
||||
<artifact type="jar" name="Azaraka:jar">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/Azaraka_jar</output-path>
|
||||
<root id="archive" name="Azaraka.jar">
|
||||
<element id="module-output" name="Game" />
|
||||
<element id="module-output" name="Azaraka" />
|
||||
<element id="directory" name="javadoc">
|
||||
<element id="dir-copy" path="$PROJECT_DIR$/javadoc" />
|
||||
<element id="dir-copy" path="$PROJECT_DIR$/../Azaraka/javadoc" />
|
||||
</element>
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/lib/gson-2.8.5.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$PROJECT_DIR$/../Azaraka/lib/gson-2.8.5.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -1,10 +1,10 @@
|
||||
<component name="libraryTable">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib" />
|
||||
<root url="file://$PROJECT_DIR$/../Azaraka/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/../Azaraka/lib" recursive="false" />
|
||||
</library>
|
||||
</component>
|
@ -6,6 +6,6 @@
|
||||
<option name="OPEN_IN_BROWSER" value="false" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 Oracle" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
<output url="file://$PROJECT_DIR$/../Azaraka/out" />
|
||||
</component>
|
||||
</project>
|
@ -2,7 +2,7 @@
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Game.iml" filepath="$PROJECT_DIR$/Game.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/../Azaraka/Azaraka.iml" filepath="$PROJECT_DIR$/../Azaraka/Azaraka.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../Azaraka" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -66,11 +66,13 @@ public class Animation implements Cloneable, Constantes {
|
||||
* Scale an image
|
||||
*
|
||||
* @param image The image to scale
|
||||
* @param width The new width
|
||||
* @param height The new height
|
||||
* @return Returns the scaled image
|
||||
*/
|
||||
static public BufferedImage scaleImage(BufferedImage image) {
|
||||
Image tmp = image.getScaledInstance(16, 16, BufferedImage.SCALE_SMOOTH);
|
||||
BufferedImage resized = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB);
|
||||
static public BufferedImage scaleImage(BufferedImage image, int width, int height) {
|
||||
Image tmp = image.getScaledInstance(width, height, BufferedImage.SCALE_SMOOTH);
|
||||
BufferedImage resized = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
|
||||
Graphics2D g2d = resized.createGraphics();
|
||||
g2d.drawImage(tmp, 0, 0, null);
|
||||
g2d.dispose();
|
||||
|
Loading…
Reference in New Issue
Block a user