|
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
|
2 * This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 package org.mozilla.gecko.gfx; |
|
7 |
|
8 import org.mozilla.gecko.mozglue.generatorannotations.WrapEntireClassForJNI; |
|
9 |
|
10 /** |
|
11 * This is the data structure that's returned by the progressive tile update |
|
12 * callback function. It encompasses the current viewport and a boolean value |
|
13 * representing whether the front-end is interested in the current progressive |
|
14 * update continuing. |
|
15 */ |
|
16 @WrapEntireClassForJNI |
|
17 public class ProgressiveUpdateData { |
|
18 public float x; |
|
19 public float y; |
|
20 public float width; |
|
21 public float height; |
|
22 public float scale; |
|
23 public boolean abort; |
|
24 |
|
25 public void setViewport(ImmutableViewportMetrics viewport) { |
|
26 this.x = viewport.viewportRectLeft; |
|
27 this.y = viewport.viewportRectTop; |
|
28 this.width = viewport.viewportRectRight - this.x; |
|
29 this.height = viewport.viewportRectBottom - this.y; |
|
30 this.scale = viewport.zoomFactor; |
|
31 } |
|
32 } |
|
33 |