trimmed mobile.
This commit is contained in:
@@ -2,19 +2,22 @@
|
||||
:description "FIXME: write description"
|
||||
:dependencies [[com.badlogicgames.gdx/gdx "1.9.4"]
|
||||
[com.badlogicgames.gdx/gdx-backend-robovm "1.9.4"]
|
||||
[org.clojure/data.priority-map "0.0.5"]
|
||||
[org.clojure/core.async "0.2.385"]
|
||||
#_[org.clojure/core.async "0.2.385"]
|
||||
[org.clojure/core.async "0.1.346.0-17112a-alpha" :exclusions [org.clojure/clojure]]
|
||||
[org.clojars.notid/tools.logging "0.3.2-SNAPSHOT"]
|
||||
[log4j/log4j "1.2.16"]
|
||||
[org.clojure/clojure "1.8.0"]
|
||||
[org.skummet/clojure "1.7.0-r2"]
|
||||
[com.mobidevelop.robovm/robovm-cocoatouch "2.3.0"]
|
||||
[com.mobidevelop.robovm/robovm-rt "2.3.0"]
|
||||
[play-clj "0.4.6-BRYCE"]]
|
||||
[play-clj "0.4.6-BRYCE" :exclusions [com.badlogicgames.gdx/gdx-box2d com.badlogicgames.gdx/gdx-bullet]]]
|
||||
:exclusions [[org.clojure/clojure]]
|
||||
:source-paths ["src/clojure" "../desktop/src-common"]
|
||||
:java-source-paths ["src/java"]
|
||||
:plugins [[lein-fruit "0.2.4-SNAPSHOT"]]
|
||||
:plugins [[lein-fruit "0.2.4-SNAPSHOT"]
|
||||
[org.skummet/lein-skummet "0.2.2"]
|
||||
]
|
||||
:javac-options ["-target" "1.7" "-source" "1.7" "-Xlint:-options"]
|
||||
:jvm-opts ["-Dno-steam=true"]
|
||||
:jvm-opts ["-Dno-steam=true" "-Dclojure.compiler.direct-linking=true" ]
|
||||
:ios {:robovm-opts ["-config" "robovm.xml"]
|
||||
:robovm-path "/Users/brycecovert/.robovm-sdks/robovm-2.2.1-SNAPSHOT"
|
||||
:version 2.1}
|
||||
|
||||
@@ -25,10 +25,17 @@
|
||||
</resource>
|
||||
</resources>
|
||||
<forceLinkClasses>
|
||||
<pattern>clojure.tools.logging.**</pattern>
|
||||
<pattern>advent.**</pattern>
|
||||
<pattern>clojure.**</pattern>
|
||||
<pattern>com.badlogic.**</pattern>
|
||||
<pattern>clojure.core*</pattern>
|
||||
<pattern>clojure.**</pattern> <!-- change this to optimize -->
|
||||
<pattern>clojure.core.**</pattern>
|
||||
<pattern>clojure.tools.**</pattern>
|
||||
<pattern>clojure.data.**</pattern>
|
||||
<pattern>clojure.java.io*</pattern>
|
||||
<pattern>play_clj.**</pattern>
|
||||
<pattern>clojure.*</pattern>
|
||||
<pattern>com.badlogic.**</pattern>
|
||||
<pattern>java.util.logging.**</pattern>
|
||||
</forceLinkClasses>
|
||||
<libs>
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.badlogic.gdx.*;
|
||||
import com.badlogic.gdx.backends.iosrobovm.*;
|
||||
|
||||
import org.robovm.apple.foundation.*;
|
||||
import org.robovm.apple.uikit.*;
|
||||
import org.robovm.apple.uikit.UIApplication;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableColorFormat;
|
||||
import org.robovm.apple.glkit.GLKViewDrawableDepthFormat;
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
package advent.core;
|
||||
|
||||
import org.robovm.apple.uikit.*;
|
||||
import org.robovm.apple.coregraphics.*;
|
||||
import org.robovm.apple.foundation.*;
|
||||
import com.badlogic.gdx.*;
|
||||
import com.badlogic.gdx.graphics.*;
|
||||
import com.badlogic.gdx.backends.iosrobovm.*;
|
||||
|
||||
public class Saver {
|
||||
|
||||
public static Pixmap flipPixmap(Pixmap src) {
|
||||
final int width = src.getWidth();
|
||||
final int height = src.getHeight();
|
||||
Pixmap flipped = new Pixmap(width, height, src.getFormat());
|
||||
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
flipped.drawPixel(x, y, src.getPixel(x, height - y -1));
|
||||
}
|
||||
}
|
||||
return flipped;
|
||||
}
|
||||
|
||||
public static UIImage takeScreenshot(){
|
||||
|
||||
UIImage newImage;
|
||||
//((IOSApplication) Gdx.app).getUIViewController().getView().setTransform(CGAffineTransform.createScale(1, -1));
|
||||
UIView view = ((IOSApplication) Gdx.app).getUIViewController().getView();
|
||||
UIGraphics.beginImageContext(new CGSize(view.getFrame().getWidth(), view.getFrame().getHeight()), true, 0.0);
|
||||
view.drawViewHierarchy(
|
||||
new CGRect(0, 0, view.getFrame().getWidth(), view.getFrame().getHeight()), true);
|
||||
newImage = UIGraphics.getImageFromCurrentImageContext();
|
||||
UIGraphics.endImageContext();
|
||||
//((IOSApplication) Gdx.app).getUIViewController().getView().setTransform(CGAffineTransform.createScale(1, 1));
|
||||
return newImage;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user