Home | History | Annotate | Download | only in image_editor

Lines Matching refs:Viewport

8  * Viewport class controls the way the image is displayed (scale, offset etc).
11 function Viewport() {
27 * Viewport modification.
33 Viewport.prototype.setScaleControl = function(scaleControl) {
41 Viewport.prototype.setImageSize = function(width, height) {
51 Viewport.prototype.setScreenSize = function(width, height) {
63 Viewport.prototype.sizeByFrame = function(frame) {
72 Viewport.prototype.sizeByFrameAndFit = function(frame) {
84 Viewport.prototype.getScale = function() { return this.scale_ };
90 Viewport.prototype.setScale = function(scale, notify) {
100 Viewport.prototype.getFittingScale = function() {
105 return Math.min(1 / Viewport.getDevicePixelRatio(), scaleX, scaleY);
111 Viewport.prototype.fitImage = function() {
118 * @return {number} X-offset of the viewport.
120 Viewport.prototype.getOffsetX = function() { return this.offsetX_ };
123 * @return {number} Y-offset of the viewport.
125 Viewport.prototype.getOffsetY = function() { return this.offsetY_ };
128 * Set the image offset in the viewport.
133 Viewport.prototype.setOffset = function(x, y, ignoreClipping) {
156 Viewport.prototype.createOffsetSetter = function(
176 * Access to the current viewport state.
182 Viewport.prototype.getImageBounds = function() { return this.imageBounds_ };
187 Viewport.prototype.getScreenBounds = function() { return this.screenBounds_ };
192 Viewport.prototype.getImageClipped = function() { return this.imageClipped_ };
197 Viewport.prototype.getScreenClipped = function() { return this.screenClipped_ };
200 * A counter that is incremented with each viewport state change.
201 * Clients that cache anything that depends on the viewport state should keep
205 Viewport.prototype.getCacheGeneration = function() { return this.generation_ };
210 Viewport.prototype.invalidateCaches = function() { this.generation_++ };
215 Viewport.prototype.getImageBoundsOnScreen = function() {
227 Viewport.prototype.screenToImageSize = function(size) {
235 Viewport.prototype.screenToImageX = function(x) {
243 Viewport.prototype.screenToImageY = function(y) {
251 Viewport.prototype.screenToImageRect = function(rect) {
263 Viewport.prototype.imageToScreenSize = function(size) {
271 Viewport.prototype.imageToScreenX = function(x) {
279 Viewport.prototype.imageToScreenY = function(y) {
287 Viewport.prototype.imageToScreenRect = function(rect) {
298 Viewport.getDevicePixelRatio = function() { return window.devicePixelRatio };
309 Viewport.prototype.screenToDeviceRect = function(rect) {
310 var ratio = Viewport.getDevicePixelRatio();
324 Viewport.prototype.getDeviceClipped = function() {
331 Viewport.prototype.isClipped = function() {
340 Viewport.prototype.getMarginX_ = function() {
350 Viewport.prototype.getMarginY_ = function() {
360 Viewport.prototype.clampOffsetX_ = function(x) {
370 Viewport.prototype.clampOffsetY_ = function(y) {
376 * Recalculate the viewport parameters.
378 Viewport.prototype.update = function() {
419 Viewport.prototype.addRepaintCallback = function(callback) {
426 Viewport.prototype.repaint = function() {