com.opera.core.systems.model
Class Canvas

java.lang.Object
  extended by com.opera.core.systems.model.Canvas

public class Canvas
extends java.lang.Object

A canvas object to use in taking screenshots of Opera's viewport. The screenshot can be relative to viewport or to the window

Author:
Deniz Turkoglu

Field Summary
protected  int height
           
protected  boolean viewPortRelative
           
protected  int width
           
protected  int x
           
protected  int y
           
 
Constructor Summary
Canvas()
           
Canvas(int x, int y, int width, int height)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getHeight()
           
 int getWidth()
           
 int getX()
           
 int getY()
           
 int hashCode()
           
 boolean isViewPortRelative()
           
 void setHeight(int height)
           
 void setViewPortRelative(boolean viewPortRelative)
          Sets the screenshots to be relative to screen or to window, default is window.
 void setWidth(int width)
           
 void setX(int x)
           
 void setY(int y)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

protected int x

y

protected int y

width

protected int width

height

protected int height

viewPortRelative

protected boolean viewPortRelative
Constructor Detail

Canvas

public Canvas(int x,
              int y,
              int width,
              int height)

Canvas

public Canvas()
Method Detail

isViewPortRelative

public boolean isViewPortRelative()

setViewPortRelative

public void setViewPortRelative(boolean viewPortRelative)
Sets the screenshots to be relative to screen or to window, default is window.

Parameters:
viewPortRelative - true if relative to window

getX

public int getX()

setX

public void setX(int x)

getY

public int getY()

setY

public void setY(int y)

getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getHeight

public int getHeight()

setHeight

public void setHeight(int height)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2011. All Rights Reserved.