Improve code / xml formatting, closes #54
This commit is contained in:
@@ -1,62 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
|
||||
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${app.name}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${app.executable}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${app.id}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${app.name}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${app.version}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${app.build}</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false />
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Icon</string>
|
||||
<string>Icon-72</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${app.name}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${app.executable}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${app.id}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${app.name}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${app.version}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${app.build}</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true />
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true />
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false />
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CFBundleIcons</key>
|
||||
<dict>
|
||||
<key>CFBundlePrimaryIcon</key>
|
||||
<dict>
|
||||
<key>CFBundleIconFiles</key>
|
||||
<array>
|
||||
<string>Icon</string>
|
||||
<string>Icon-72</string>
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
<pattern>com.android.org.bouncycastle.jce.provider.BouncyCastleProvider</pattern>
|
||||
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.BC$Mappings</pattern>
|
||||
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi</pattern>
|
||||
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std</pattern>
|
||||
<pattern>com.android.org.bouncycastle.jcajce.provider.keystore.bc.BcKeyStoreSpi$Std
|
||||
</pattern>
|
||||
<pattern>com.android.org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi</pattern>
|
||||
<pattern>com.android.org.bouncycastle.crypto.digests.AndroidDigestFactoryOpenSSL</pattern>
|
||||
<pattern>org.apache.harmony.security.provider.cert.DRLCertFactory</pattern>
|
||||
@@ -44,4 +45,4 @@
|
||||
<framework>AudioToolbox</framework>
|
||||
<framework>AVFoundation</framework>
|
||||
</frameworks>
|
||||
</config>
|
||||
</config>
|
||||
|
||||
@@ -2,6 +2,7 @@ package org.oscim.ios;
|
||||
|
||||
import com.badlogic.gdx.backends.iosrobovm.IOSApplication;
|
||||
import com.badlogic.gdx.backends.iosrobovm.IOSApplicationConfiguration;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
@@ -25,7 +26,7 @@ public class RobovmLauncher extends IOSApplication.Delegate {
|
||||
config.orientationPortrait = true;
|
||||
config.stencilFormat = GLKViewDrawableStencilFormat._8;
|
||||
|
||||
float scale = (float)(getIosVersion() >= 8 ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen()
|
||||
float scale = (float) (getIosVersion() >= 8 ? UIScreen.getMainScreen().getNativeScale() : UIScreen.getMainScreen()
|
||||
.getScale());
|
||||
|
||||
CanvasAdapter.dpi *= scale;
|
||||
@@ -53,7 +54,7 @@ public class RobovmLauncher extends IOSApplication.Delegate {
|
||||
}
|
||||
|
||||
|
||||
private int getIosVersion () {
|
||||
private int getIosVersion() {
|
||||
String systemVersion = UIDevice.getCurrentDevice().getSystemVersion();
|
||||
return Integer.parseInt(systemVersion.split("\\.")[0]);
|
||||
}
|
||||
|
||||
@@ -16,11 +16,18 @@ package org.oscim.ios.backend;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
import org.oscim.backend.GL;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Color;
|
||||
import org.robovm.apple.coregraphics.*;
|
||||
import org.robovm.apple.coregraphics.CGBitmapContext;
|
||||
import org.robovm.apple.coregraphics.CGBlendMode;
|
||||
import org.robovm.apple.coregraphics.CGColor;
|
||||
import org.robovm.apple.coregraphics.CGColorSpace;
|
||||
import org.robovm.apple.coregraphics.CGImage;
|
||||
import org.robovm.apple.coregraphics.CGImageAlphaInfo;
|
||||
import org.robovm.apple.coregraphics.CGRect;
|
||||
import org.robovm.apple.foundation.NSData;
|
||||
import org.robovm.apple.uikit.UIColor;
|
||||
import org.robovm.apple.uikit.UIImage;
|
||||
|
||||
@@ -14,17 +14,16 @@
|
||||
*/
|
||||
package org.oscim.ios.backend;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Canvas;
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* iOS specific implementation of {@link CanvasAdapter}<br>
|
||||
* <br>
|
||||
@@ -32,44 +31,44 @@ import org.slf4j.LoggerFactory;
|
||||
*/
|
||||
public class IosGraphics extends CanvasAdapter {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(IosGraphics.class);
|
||||
static final Logger log = LoggerFactory.getLogger(IosGraphics.class);
|
||||
|
||||
public static void init() {
|
||||
CanvasAdapter.init(new IosGraphics());
|
||||
}
|
||||
public static void init() {
|
||||
CanvasAdapter.init(new IosGraphics());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Canvas newCanvasImpl() {
|
||||
return new IosCanvas();
|
||||
}
|
||||
@Override
|
||||
protected Canvas newCanvasImpl() {
|
||||
return new IosCanvas();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Paint newPaintImpl() {
|
||||
return new IosPaint();
|
||||
}
|
||||
@Override
|
||||
protected Paint newPaintImpl() {
|
||||
return new IosPaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Bitmap newBitmapImpl(int width, int height, int format) {
|
||||
return new IosBitmap(width, height, format);
|
||||
}
|
||||
@Override
|
||||
protected Bitmap newBitmapImpl(int width, int height, int format) {
|
||||
return new IosBitmap(width, height, format);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Bitmap decodeBitmapImpl(InputStream inputStream) {
|
||||
try {
|
||||
return new IosBitmap(inputStream);
|
||||
} catch (IOException e) {
|
||||
log.error("decodeBitmapImpl",e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected Bitmap decodeBitmapImpl(InputStream inputStream) {
|
||||
try {
|
||||
return new IosBitmap(inputStream);
|
||||
} catch (IOException e) {
|
||||
log.error("decodeBitmapImpl", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Bitmap loadBitmapAssetImpl(String fileName) {
|
||||
try {
|
||||
return new IosBitmap(fileName);
|
||||
} catch (IOException e) {
|
||||
log.error("loadBitmapAssetImpl",e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
protected Bitmap loadBitmapAssetImpl(String fileName) {
|
||||
try {
|
||||
return new IosBitmap(fileName);
|
||||
} catch (IOException e) {
|
||||
log.error("loadBitmapAssetImpl", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package org.oscim.ios.backend;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import org.robovm.apple.coregraphics.CGAffineTransform;
|
||||
import org.robovm.apple.coregraphics.CGBitmapContext;
|
||||
import org.robovm.apple.coregraphics.CGBlendMode;
|
||||
@@ -27,7 +26,6 @@ import org.robovm.apple.uikit.NSAttributedStringAttributes;
|
||||
import org.robovm.apple.uikit.UIColor;
|
||||
import org.robovm.apple.uikit.UIFont;
|
||||
import org.robovm.apple.uikit.UIFontWeight;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user