Skip to content

Commit 941db93

Browse files
committed
added addImage method inluding the size argument
1 parent 4a40102 commit 941db93

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

mode/libraries/ar/src/processing/ar/ARTracker.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,25 @@ public ARTracker(PApplet parent) {
5454
}
5555

5656
public void addImage(String name, PImage img) {
57+
addImageImp(name, img, null);
58+
}
59+
60+
public void addImage(String name, PImage img, float size) {
61+
addImageImp(name, img, size);
62+
}
63+
64+
private void addImageImp(String name, PImage img, Float size) {
5765
if (db == null) {
5866
// Creating a new database of augmented images.
5967
db = new AugmentedImageDatabase(g.surfar.session);
6068
}
6169

6270
Bitmap bitmap = (Bitmap)img.getNative();
63-
db.addImage(name, bitmap);
71+
if (size != null) {
72+
db.addImage(name, bitmap, size);
73+
} else {
74+
db.addImage(name, bitmap);
75+
}
6476

6577
// Reset the session config with the updated image database
6678
Config config = new Config(g.surfar.session);

0 commit comments

Comments
 (0)