LibreOffice Module android (master) 1
FixedZoomTileLayer.java
Go to the documentation of this file.
1package org.mozilla.gecko.gfx;
2
3import android.content.Context;
4import android.graphics.RectF;
5
7 public FixedZoomTileLayer(Context context) {
8 super(context);
9 }
10
11 @Override
12 protected RectF getViewPort(ImmutableViewportMetrics viewportMetrics) {
13 float zoom = getZoom(viewportMetrics);
14 RectF rect = normalizeRect(viewportMetrics.getViewport(), viewportMetrics.zoomFactor, zoom);
16 }
17
18 @Override
19 protected float getZoom(ImmutableViewportMetrics viewportMetrics) {
20 return 1.0f / 16.0f;
21 }
22
23 @Override
24 protected int getTilePriority() {
25 return -1;
26 }
27
29 return new IntSize(tileSize.width, tileSize.height*6);
30 }
31}
static RectF roundToTileSize(RectF input, IntSize tileSize)
static RectF normalizeRect(RectF rect, float sourceFactor, float targetFactor)
static RectF inflate(RectF rect, IntSize inflateSize)
float getZoom(ImmutableViewportMetrics viewportMetrics)
RectF getViewPort(ImmutableViewportMetrics viewportMetrics)
ImmutableViewportMetrics are used to store the viewport metrics in way that we can access a version o...