org.foray.graphic
Class TempImage

java.lang.Object
  extended by org.foray.graphic.TempImage
All Implemented Interfaces:
org.axsl.graphic.Graphic

public class TempImage
extends Object
implements org.axsl.graphic.Graphic

An implementation of the axsl Graphic interface that provides the ability to create a pseudo-graphic that can be used by Renderers.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.axsl.graphic.Graphic
org.axsl.graphic.Graphic.Compression, org.axsl.graphic.Graphic.Type
 
Constructor Summary
TempImage(URL url, int width, int height, byte[] result)
          Constructor.
 
Method Summary
 int absoluteHeight(int pixelsPerInch)
           
 int absoluteWidth(int pixelsPerInch)
           
 boolean canMakeGraphicOutput(String mimeType)
           
 void close()
           
 int getBitsPerComponent()
           
 ColorSpace getColorSpace()
           
 org.axsl.graphic.Graphic.Compression getCompressionType()
           
 byte[] getContent()
           
 int getContentSize()
           
 org.axsl.graphic.output.GraphicOutput getGraphicOutput(String mimeType)
           
 org.axsl.graphic.Graphic.Type getGraphicType()
           
 org.axsl.graphic.GraphicLink[] getLinks()
           
 String getMimeType()
           
 String getName()
           
 byte[] getRawSamples()
           
 Color getTransparentColor()
           
 URL getUrl()
           
 boolean isInverted()
           
 boolean isTransparent()
           
 int pixelHeight()
           
 int pixelWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempImage

public TempImage(URL url,
                 int width,
                 int height,
                 byte[] result)
Constructor.

Parameters:
url - The image's URL.
width - The image width, in millipoints.
height - The image height, in millipoints.
result - The bitmap data for the image.
Method Detail

isInverted

public boolean isInverted()
Specified by:
isInverted in interface org.axsl.graphic.Graphic

getUrl

public URL getUrl()
Specified by:
getUrl in interface org.axsl.graphic.Graphic

pixelWidth

public int pixelWidth()
               throws org.axsl.graphic.GraphicException
Specified by:
pixelWidth in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

pixelHeight

public int pixelHeight()
                throws org.axsl.graphic.GraphicException
Specified by:
pixelHeight in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getColorSpace

public ColorSpace getColorSpace()
                         throws org.axsl.graphic.GraphicException
Specified by:
getColorSpace in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getBitsPerComponent

public int getBitsPerComponent()
                        throws org.axsl.graphic.GraphicException
Specified by:
getBitsPerComponent in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

isTransparent

public boolean isTransparent()
                      throws org.axsl.graphic.GraphicException
Specified by:
isTransparent in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getTransparentColor

public Color getTransparentColor()
                          throws org.axsl.graphic.GraphicException
Specified by:
getTransparentColor in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getContent

public byte[] getContent()
                  throws org.axsl.graphic.GraphicException
Specified by:
getContent in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getContentSize

public int getContentSize()
                   throws org.axsl.graphic.GraphicException
Specified by:
getContentSize in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

close

public void close()
Specified by:
close in interface org.axsl.graphic.Graphic

getGraphicType

public org.axsl.graphic.Graphic.Type getGraphicType()
Specified by:
getGraphicType in interface org.axsl.graphic.Graphic

getCompressionType

public org.axsl.graphic.Graphic.Compression getCompressionType()
Specified by:
getCompressionType in interface org.axsl.graphic.Graphic

getMimeType

public String getMimeType()
Specified by:
getMimeType in interface org.axsl.graphic.Graphic

getName

public String getName()
Specified by:
getName in interface org.axsl.graphic.Graphic

absoluteWidth

public int absoluteWidth(int pixelsPerInch)
                  throws org.axsl.graphic.GraphicException
Specified by:
absoluteWidth in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

absoluteHeight

public int absoluteHeight(int pixelsPerInch)
                   throws org.axsl.graphic.GraphicException
Specified by:
absoluteHeight in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getRawSamples

public byte[] getRawSamples()
                     throws org.axsl.graphic.GraphicException
Specified by:
getRawSamples in interface org.axsl.graphic.Graphic
Throws:
org.axsl.graphic.GraphicException

getLinks

public org.axsl.graphic.GraphicLink[] getLinks()
Specified by:
getLinks in interface org.axsl.graphic.Graphic

getGraphicOutput

public org.axsl.graphic.output.GraphicOutput getGraphicOutput(String mimeType)
Specified by:
getGraphicOutput in interface org.axsl.graphic.Graphic

canMakeGraphicOutput

public boolean canMakeGraphicOutput(String mimeType)
Specified by:
canMakeGraphicOutput in interface org.axsl.graphic.Graphic


Copyright © 2017. All rights reserved.