nodebox.graphics
Class Image

java.lang.Object
  extended by nodebox.graphics.AbstractGrob
      extended by nodebox.graphics.Image
All Implemented Interfaces:
Cloneable, Drawable, Grob

public class Image
extends AbstractGrob


Field Summary
static String BLANK_IMAGE
           
 
Constructor Summary
Image()
           
Image(BufferedImage image)
           
Image(File file)
           
Image(Image other)
           
Image(String fname)
           
Image(String fname, double cx, double cy)
           
 
Method Summary
 Image clone()
           
 void draw(Graphics2D g)
           
 boolean equals(Object obj)
           
static Image fromData(byte[] data)
           
 double getAlpha()
           
 BufferedImage getAwtImage()
           
 Rect getBounds()
           
 double getHeight()
           
 double getOriginalHeight()
           
 double getOriginalWidth()
           
 double getScaleFactor()
           
 Size getSize()
           
 double getWidth()
           
 double getX()
           
 double getY()
           
 boolean isEmpty()
           
 void setAlpha(double alpha)
           
 void setHeight(double height)
           
protected  void setupTransform(Graphics2D g)
           
 void setWidth(double width)
           
 void setX(double x)
           
 void setY(double y)
           
 String toString()
           
 
Methods inherited from class nodebox.graphics.AbstractGrob
appendTransform, getTransform, getTransformDelegate, prependTransform, restoreTransform, rotate, rotateRadians, saveTransform, scale, scale, setTransform, setTransformDelegate, skew, skew, transform, translate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BLANK_IMAGE

public static final String BLANK_IMAGE
See Also:
Constant Field Values
Constructor Detail

Image

public Image()

Image

public Image(File file)

Image

public Image(String fname)

Image

public Image(String fname,
             double cx,
             double cy)

Image

public Image(BufferedImage image)

Image

public Image(Image other)
Method Detail

fromData

public static Image fromData(byte[] data)

getOriginalWidth

public double getOriginalWidth()

getOriginalHeight

public double getOriginalHeight()

getWidth

public double getWidth()

setWidth

public void setWidth(double width)

getHeight

public double getHeight()

setHeight

public void setHeight(double height)

getX

public double getX()

setX

public void setX(double x)

getY

public double getY()

setY

public void setY(double y)

getAlpha

public double getAlpha()

setAlpha

public void setAlpha(double alpha)

getAwtImage

public BufferedImage getAwtImage()

getSize

public Size getSize()

setupTransform

protected void setupTransform(Graphics2D g)

isEmpty

public boolean isEmpty()

getBounds

public Rect getBounds()

getScaleFactor

public double getScaleFactor()

draw

public void draw(Graphics2D g)

clone

public Image clone()
Specified by:
clone in interface Grob
Specified by:
clone in class AbstractGrob

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.