Sweet Home 3D 3.4

com.eteks.sweethome3d.model
Class BackgroundImage

java.lang.Object
  extended by com.eteks.sweethome3d.model.BackgroundImage
All Implemented Interfaces:
java.io.Serializable

public class BackgroundImage
extends java.lang.Object
implements java.io.Serializable

The image displayed in background of the plan.

Author:
Emmanuel Puybaret
See Also:
Serialized Form

Constructor Summary
BackgroundImage(Content image, float scaleDistance, float scaleDistanceXStart, float scaleDistanceYStart, float scaleDistanceXEnd, float scaleDistanceYEnd, float xOrigin, float yOrigin)
          Creates a visible background image.
BackgroundImage(Content image, float scaleDistance, float scaleDistanceXStart, float scaleDistanceYStart, float scaleDistanceXEnd, float scaleDistanceYEnd, float xOrigin, float yOrigin, boolean visible)
          Creates a background image.
 
Method Summary
 Content getImage()
          Returns the image content of this background image.
 float getScale()
          Returns the scale of this image.
static float getScale(float scaleDistance, float scaleDistanceXStart, float scaleDistanceYStart, float scaleDistanceXEnd, float scaleDistanceYEnd)
          Returns the scale equal to scaleDistance divided by the distance between the points (scaleDistanceXStart, scaleDistanceYStart) and (scaleDistanceXEnd, scaleDistanceYEnd).
 float getScaleDistance()
          Returns the distance used to compute the scale of this image.
 float getScaleDistanceXEnd()
          Returns the abcissa of the end point used to compute the scale of this image.
 float getScaleDistanceXStart()
          Returns the abcissa of the start point used to compute the scale of this image.
 float getScaleDistanceYEnd()
          Returns the ordinate of the end point used to compute the scale of this image.
 float getScaleDistanceYStart()
          Returns the ordinate of the start point used to compute the scale of this image.
 float getXOrigin()
          Returns the origin abscissa of this image.
 float getYOrigin()
          Returns the origin ordinate of this image.
 boolean isVisible()
          Returns true if this image is visible in plan.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackgroundImage

public BackgroundImage(Content image,
                       float scaleDistance,
                       float scaleDistanceXStart,
                       float scaleDistanceYStart,
                       float scaleDistanceXEnd,
                       float scaleDistanceYEnd,
                       float xOrigin,
                       float yOrigin)
Creates a visible background image.


BackgroundImage

public BackgroundImage(Content image,
                       float scaleDistance,
                       float scaleDistanceXStart,
                       float scaleDistanceYStart,
                       float scaleDistanceXEnd,
                       float scaleDistanceYEnd,
                       float xOrigin,
                       float yOrigin,
                       boolean visible)
Creates a background image.

Since:
1.8
Method Detail

getImage

public Content getImage()
Returns the image content of this background image.


getScaleDistance

public float getScaleDistance()
Returns the distance used to compute the scale of this image.


getScaleDistanceXStart

public float getScaleDistanceXStart()
Returns the abcissa of the start point used to compute the scale of this image.


getScaleDistanceYStart

public float getScaleDistanceYStart()
Returns the ordinate of the start point used to compute the scale of this image.


getScaleDistanceXEnd

public float getScaleDistanceXEnd()
Returns the abcissa of the end point used to compute the scale of this image.


getScaleDistanceYEnd

public float getScaleDistanceYEnd()
Returns the ordinate of the end point used to compute the scale of this image.


getScale

public float getScale()
Returns the scale of this image.


getScale

public static float getScale(float scaleDistance,
                             float scaleDistanceXStart,
                             float scaleDistanceYStart,
                             float scaleDistanceXEnd,
                             float scaleDistanceYEnd)
Returns the scale equal to scaleDistance divided by the distance between the points (scaleDistanceXStart, scaleDistanceYStart) and (scaleDistanceXEnd, scaleDistanceYEnd).


getXOrigin

public float getXOrigin()
Returns the origin abscissa of this image.


getYOrigin

public float getYOrigin()
Returns the origin ordinate of this image.


isVisible

public boolean isVisible()
Returns true if this image is visible in plan.

Since:
1.8

Sweet Home 3D 3.4

? Copyrights 2006-2011 eTeks - All rights reserved
Distributed under GNU General Public License