@Override
  public void render(GL10 gl) {
    if (frames == null) {
      frames = TextureManager.getTexture(resId);
      return;
    }

    if (alpha != 0) {
      if (!cutout.isGenerated()) cutout.generate(frames.getWidth(), frames.getHeight());

      final float width = scale.x * cutout.frameWidth;
      final float height = scale.y * cutout.frameHeight;

      frames.prepare(gl, cutout.textureBuffers[currentFrame], GL10.GL_CLAMP_TO_EDGE);
      frames.draw(gl, pos.x, pos.y, width, height, rotation);
    }
  }
Beispiel #2
0
 public void setCutOut(Rect r, List<Location> geoR, List<GisLayer> myLayers) {
   cutOut = new Cutout();
   cutOut.r = r;
   cutOut.geoR = geoR;
   this.myLayers = myLayers;
 }