Get the size of the overlay texture
176930
def getOverlayTextureSize(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayTextureSize
        pWidth = c_uint32()
        pHeight = c_uint32()
        result = fn(ulOverlayHandle, byref(pWidth), byref(pHeight))
        return result, pWidth.value, pHeight.value
623083
public static int getCacheSize(Context ctx) {
		final DisplayMetrics displayMetrics = ctx.getResources().
				getDisplayMetrics();
		final int screenWidth = displayMetrics.widthPixels;
		final int screenHeight = displayMetrics.heightPixels;
		// 4 bytes per pixel
		final int screenBytes = screenWidth * screenHeight * 4;

		return screenBytes * 3;
	}
777161
def tileSize(self, zoom):
        ""
        assert zoom in range(0, len(self.RESOLUTIONS))
        return self.tileSizePx * self.RESOLUTIONS[int(zoom)]
1148539
def getOverlayKey(self, ulOverlayHandle, pchValue, unBufferSize):
        

        fn = self.function_table.getOverlayKey
        pError = EVROverlayError()
        result = fn(ulOverlayHandle, pchValue, unBufferSize, byref(pError))
        return result, pError
765329
def setOverlayTextureBounds(self, ulOverlayHandle):
        """"""

        fn = self.function_table.setOverlayTextureBounds
        pOverlayTextureBounds = VRTextureBounds_t()
        result = fn(ulOverlayHandle, byref(pOverlayTextureBounds))
        return result, pOverlayTextureBounds
678534
def getOverlayAlpha(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayAlpha
        pfAlpha = c_float()
        result = fn(ulOverlayHandle, byref(pfAlpha))
        return result, pfAlpha.value
386060
public static int getThemeAttributeDimensionSize(Context context, int attr) {
        TypedArray a = null;
        try {
            a = context.getTheme().obtainStyledAttributes(new int[]{attr});
            return a.getDimensionPixelSize(0, 0);
        } finally {
            if (a != null) {
                a.recycle();
            }
        }
    }
1181984
function(layerContext, node) {
        var obj = {"width": node.getAttribute("width"), "height": node.getAttribute("height")};
        layerContext.tileSize = obj;
    }
125596
public static int getDisplayWidth(@NonNull final Context context) {
        Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
        return context.getResources().getDisplayMetrics().widthPixels;
    }
1194186
function() {
        var min_size = Infinity;
        var index = null;
        for (var i = 0; i < this.bound_textures.length; i++) {
            var t = this.bound_textures[i];
            if (t.size < min_size) {
                min_size = t.size;
                index = i;
            }
        }
        return index;
    }
286320
def getOverlayWidthInMeters(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayWidthInMeters
        pfWidthInMeters = c_float()
        result = fn(ulOverlayHandle, byref(pfWidthInMeters))
        return result, pfWidthInMeters.value
644832
private void obtainHeight(@StyleRes final int themeResourceId) {
        TypedArray typedArray = getContext().getTheme()
                .obtainStyledAttributes(themeResourceId, new int[]{R.attr.materialDialogHeight});
        int defaultValue = Dialog.WRAP_CONTENT;

        try {
            setHeight(typedArray.getDimensionPixelSize(0, defaultValue));
        } catch (Resources.NotFoundException | UnsupportedOperationException e) {
            setHeight(typedArray.getInteger(0, defaultValue));
        }
    }
112909
function resizeTexture(texture, width, height) {
  const oldWidth = texture.width;
  const oldHeight = texture.height;
  const oldPixels = readPixelsToBuffer(texture, {});

  texture.resize({width, height});

  texture.setSubImageData({
    data: oldPixels,
    x: 0,
    y: height - oldHeight,
    width: oldWidth,
    height: oldHeight,
    parameters: DEFAULT_TEXTURE_PARAMETERS
  });

  texture.generateMipmap();

  oldPixels.delete();
  return texture;
}
146237
public int getLayerSize() {
        if (lookupTable != null && lookupTable.getWeights() != null) {
            return lookupTable.getWeights().columns();
        } else
            return layerSize;
    }
297364
function() {
    var self = this;

    // Calculate the scale of our window from "full" size.
    var scale = window.innerWidth / 3600;

    // Resize and reposition the sprite overlays.
    var keys = Object.keys(self._spriteMap);
    for (var i=0; i<keys.length; i++) {
      var sprite = window[keys[i]];
      sprite.style.width = Math.round(self._width[i] * scale) + 'px';
      if (self._left[i]) {
        sprite.style.left = Math.round(self._left[i] * scale) + 'px';
      }
    }
  }
447065
def setOverlayWidthInMeters(self, ulOverlayHandle, fWidthInMeters):
        """"""

        fn = self.function_table.setOverlayWidthInMeters
        result = fn(ulOverlayHandle, fWidthInMeters)
        return result
1077759
def getOverlayTextureColorSpace(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayTextureColorSpace
        peTextureColorSpace = EColorSpace()
        result = fn(ulOverlayHandle, byref(peTextureColorSpace))
        return result, peTextureColorSpace