com.flagstone.transform.util.image
Class ImageShape

java.lang.Object
  extended by com.flagstone.transform.util.image.ImageShape

public final class ImageShape
extends Object

ImageShape is used to generate the shape definition that is required to display images in a Flash file.


Constructor Summary
ImageShape()
           
 
Method Summary
 ShapeTag defineShape(int uid, ImageTag image)
          Generates the shape definition used to display an image using the predefined registration point and border style.
 ShapeTag defineShape(int uid, ImageTag image, int xOrigin, int yOrigin, LineStyle border)
          Generates the shape definition used to display an image.
 void setRegistration(HorizontalAlign halign, VerticalAlign valign)
          Set the registration point, definition the position of the image relative to the origin of the shape.
 void setStyle(LineStyle lineStyle)
          Set the line style used to draw the border around the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageShape

public ImageShape()
Method Detail

setStyle

public void setStyle(LineStyle lineStyle)
Set the line style used to draw the border around the image.

Parameters:
lineStyle - a LineStyle. May be null if no border will be drawn.

setRegistration

public void setRegistration(HorizontalAlign halign,
                            VerticalAlign valign)
Set the registration point, definition the position of the image relative to the origin of the shape.

Parameters:
halign - the alignment along the x-axis.
valign - the alignment along the y-axis.

defineShape

public ShapeTag defineShape(int uid,
                            ImageTag image)
Generates the shape definition used to display an image using the predefined registration point and border style.

Parameters:
uid - an unique identifier that is used to reference the shape definition in a Flash movie.
image - the image definition.
Returns:
the shape that is used to display the image in a Flash movie.

defineShape

public ShapeTag defineShape(int uid,
                            ImageTag image,
                            int xOrigin,
                            int yOrigin,
                            LineStyle border)
Generates the shape definition used to display an image.

Parameters:
uid - an unique identifier that is used to reference the shape definition in a Flash movie.
image - the image definition.
xOrigin - the offset in pixels along the x-axis, relative to the top left corner of the image, where the origin (0,0) of the shape will be located.
yOrigin - the offset in pixels along the y-axis, relative to the top left corner of the image, where the origin (0,0) of the shape will be located.
border - the style drawn around the border of the image. May be null if no border is drawn.
Returns:
the shape that is used to display the image in a Flash movie.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.