@@ -0,0 +1,1143 @@
+/*******************************************************************************%0A * Caleydo - Visualization for Molecular Biology - http://caleydo.org%0A * Copyright (c) The Caleydo Team. All rights reserved.%0A * Licensed under the new BSD license, available at http://caleydo.org/license%0A *******************************************************************************/%0Apackage org.caleydo.core.view.opengl.layout2;%0A%0Aimport com.jogamp.opengl.util.texture.Texture;%0A%0A/**%0A * Render image and set setSize to size of image on loading.%0A * %0A * @author Thomas Geymayer%0A * %0A */%0Apublic class GLImageElement extends GLElement %7B%0A%0A%09/**%0A%09 * Path to the texture to display%0A%09 */%0A%09protected String texturePath;%0A%0A%09protected Texture texture;%0A%0A%09public GLImageElement(String path) %7B%0A%09%09texturePath = path;%0A%0A%09%09// Default size to prevent culling (will be updated%0A%09%09// during first render pass)%0A%09%09setSize(32, 32);%0A%09%7D%0A%0A%09@Override%0A%09protected void renderImpl(GLGraphics g, float w, float h) %7B%0A%09%09if (texture == null) %7B%0A%09%09%09texture = g.getTexture(texturePath);%0A%09%09%09setSize(texture.getWidth(), texture.getHeight());%0A%09%09%09relayout();%0A%09%09%7D%0A%0A%09%09g.fillImage(texture, 0, 0, w, h);%0A%09%7D%0A%0A%7D%0A

Add GLImageElement