magick
Class DrawInfo

java.lang.Object
  extended by magick.Magick
      extended by magick.DrawInfo

public class DrawInfo
extends Magick

Encapsulation of the ImageMagick DrawInfo structure.

Author:
Eric Yeo

Constructor Summary
DrawInfo(ImageInfo imageInfo)
          Constructor.
 
Method Summary
protected  void finalize()
          If the garbabe collector removes us, we had better release the memory we occupy.
 PixelPacket getBorderColor()
          Get the border_color attribute in the DrawInfo handle.
 int getDecorate()
          Get the decorate attribute in the DrawInfo handle.
 PixelPacket getFill()
          Get the fill attribute in the DrawInfo handle.
 java.lang.String getFont()
          Get the font field in the DrawInfo.
 java.lang.String getGeometry()
          Get the geometry field in the DrawInfo.
 int getGravity()
          Get the gravity attribute in the DrawInfo handle.
 int getOpacity()
          Get the opacity attribute in the DrawInfo handle.
 double getPointsize()
          Get the pointsize attribute in the DrawInfo handle.
 java.lang.String getPrimitive()
          Get the primitive field in the DrawInfo.
 PixelPacket getStroke()
          Get the stroke attribute in the DrawInfo handle.
 boolean getStrokeAntialias()
          Return the stroke_antialias attribute in the DrawInfo handle.
 double getStrokeWidth()
          Get the stroke_width attribute in the DrawInfo handle.
 java.lang.String getText()
          Get the text field in the DrawInfo.
 boolean getTextAntialias()
          Return the text_antialias attribute in the DrawInfo handle.
 MagickImage getTile()
          Get the tile image from the DrawInfo.
 PixelPacket getUnderColor()
          Get the undercolor attribute in the DrawInfo handle.
 void setBorderColor(PixelPacket borderColor)
          Set the border_color attribute in the DrawInfo handle.
 void setDecorate(int decoration)
          Set the decorate attribute in the DrawInfo handle.
 void setFill(PixelPacket fill)
          Set the fill attribute in the DrawInfo handle.
 void setFont(java.lang.String font)
          Set the font field in the DrawInfo.
 void setGeometry(java.lang.String geometry)
          Set the geometry field in the DrawInfo.
 void setGravity(int gravity)
          Set the gravity attribute in the DrawInfo handle.
 void setOpacity(int opacity)
          Set the opacity attribute in the DrawInfo handle.
 void setPointsize(double pointsize)
          Set the pointsize attribute in the DrawInfo handle.
 void setPrimitive(java.lang.String primitive)
          Set the primitive field in the DrawInfo.
 void setStroke(PixelPacket stroke)
          Set the stroke attribute in the DrawInfo handle.
 void setStrokeAntialias(boolean strokeAntialias)
          Set the stroke_antialias attribute in the DrawInfo handle.
 void setStrokeWidth(double strokeWidth)
          Set the stroke_width attribute in the DrawInfo handle.
 void setText(java.lang.String text)
          Set the text field in the DrawInfo.
 void setTextAntialias(boolean textAntialias)
          Set the text_antialias attribute in the DrawInfo handle.
 void setTile(MagickImage image)
          Set the tile image in the DrawInfo.
 void setUnderColor(PixelPacket underColor)
          Set the undercolor attribute in the DrawInfo handle.
 
Methods inherited from class magick.Magick
parseImageGeometry
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawInfo

public DrawInfo(ImageInfo imageInfo)
         throws MagickException
Constructor. Create a DrawInfo structure from defaults in the ImageInfo structure.

Parameters:
imageInfo - default values for DrawInfo this taken from this
Throws:
MagickException
Method Detail

finalize

protected void finalize()
If the garbabe collector removes us, we had better release the memory we occupy.

Overrides:
finalize in class java.lang.Object

setPrimitive

public void setPrimitive(java.lang.String primitive)
                  throws MagickException
Set the primitive field in the DrawInfo.

Parameters:
primitive - value of the primitive field
Throws:
MagickException

getPrimitive

public java.lang.String getPrimitive()
                              throws MagickException
Get the primitive field in the DrawInfo.

Returns:
value of the primitive field.
Throws:
MagickException

getText

public java.lang.String getText()
                         throws MagickException
Get the text field in the DrawInfo.

Returns:
value of the text field.
Throws:
MagickException

setText

public void setText(java.lang.String text)
             throws MagickException
Set the text field in the DrawInfo.

Parameters:
text - value of the text field
Throws:
MagickException

getGeometry

public java.lang.String getGeometry()
                             throws MagickException
Get the geometry field in the DrawInfo.

Returns:
value of the geometry field.
Throws:
MagickException

setGeometry

public void setGeometry(java.lang.String geometry)
                 throws MagickException
Set the geometry field in the DrawInfo.

Parameters:
geometry - value of the geometry field
Throws:
MagickException

setFont

public void setFont(java.lang.String font)
             throws MagickException
Set the font field in the DrawInfo.

Parameters:
font - value of the font field
Throws:
MagickException

getFont

public java.lang.String getFont()
                         throws MagickException
Get the font field in the DrawInfo.

Returns:
value of the font field.
Throws:
MagickException

setStrokeAntialias

public void setStrokeAntialias(boolean strokeAntialias)
                        throws MagickException
Set the stroke_antialias attribute in the DrawInfo handle.

Parameters:
strokeAntialias - whether antialiasing is enable
Throws:
MagickException

getStrokeAntialias

public boolean getStrokeAntialias()
                           throws MagickException
Return the stroke_antialias attribute in the DrawInfo handle.

Returns:
value of the stroke_antialias attribute in DrawInfo
Throws:
MagickException

setTextAntialias

public void setTextAntialias(boolean textAntialias)
                      throws MagickException
Set the text_antialias attribute in the DrawInfo handle.

Parameters:
textAntialias - whether antialiasing is enable
Throws:
MagickException

getTextAntialias

public boolean getTextAntialias()
                         throws MagickException
Return the text_antialias attribute in the DrawInfo handle.

Returns:
value of the text_antialias attribute in DrawInfo
Throws:
MagickException

setGravity

public void setGravity(int gravity)
                throws MagickException
Set the gravity attribute in the DrawInfo handle.

Parameters:
gravity - the new GravityType value
Throws:
MagickException
See Also:
GravityType

getGravity

public int getGravity()
               throws MagickException
Get the gravity attribute in the DrawInfo handle.

Returns:
the value of the gravity attribute in the DrawInfo
Throws:
MagickException
See Also:
GravityType

setOpacity

public void setOpacity(int opacity)
                throws MagickException
Set the opacity attribute in the DrawInfo handle.

Parameters:
opacity - the new opacity value
Throws:
MagickException

getOpacity

public int getOpacity()
               throws MagickException
Get the opacity attribute in the DrawInfo handle.

Returns:
the value of the opacity attribute in the DrawInfo
Throws:
MagickException

setDecorate

public void setDecorate(int decoration)
                 throws MagickException
Set the decorate attribute in the DrawInfo handle.

Parameters:
decoration - the new DecorationType value
Throws:
MagickException
See Also:
DecorationType

getDecorate

public int getDecorate()
                throws MagickException
Get the decorate attribute in the DrawInfo handle.

Returns:
the value of the decorate attribute in the DrawInfo
Throws:
MagickException
See Also:
DecorationType

setStrokeWidth

public void setStrokeWidth(double strokeWidth)
                    throws MagickException
Set the stroke_width attribute in the DrawInfo handle.

Parameters:
strokeWidth - value of the stroke_width attribute
Throws:
MagickException

getStrokeWidth

public double getStrokeWidth()
                      throws MagickException
Get the stroke_width attribute in the DrawInfo handle.

Returns:
the value of the stroke_width attribute in DrawInfo
Throws:
MagickException

setPointsize

public void setPointsize(double pointsize)
                  throws MagickException
Set the pointsize attribute in the DrawInfo handle.

Parameters:
pointsize - value of the pointsize attribute
Throws:
MagickException

getPointsize

public double getPointsize()
                    throws MagickException
Get the pointsize attribute in the DrawInfo handle.

Returns:
the value of the pointsize attribute in DrawInfo
Throws:
MagickException

setFill

public void setFill(PixelPacket fill)
             throws MagickException
Set the fill attribute in the DrawInfo handle.

Parameters:
fill - new value of the fill attribute
Throws:
MagickException

getFill

public PixelPacket getFill()
                    throws MagickException
Get the fill attribute in the DrawInfo handle.

Returns:
the fill attribute in the DrawInfo handle
Throws:
MagickException

setStroke

public void setStroke(PixelPacket stroke)
               throws MagickException
Set the stroke attribute in the DrawInfo handle.

Parameters:
stroke - new value of the fill attribute
Throws:
MagickException

getStroke

public PixelPacket getStroke()
                      throws MagickException
Get the stroke attribute in the DrawInfo handle.

Returns:
the stroke attribute in the DrawInfo handle
Throws:
MagickException

setUnderColor

public void setUnderColor(PixelPacket underColor)
                   throws MagickException
Set the undercolor attribute in the DrawInfo handle.

Parameters:
underColor - new value of the fill attribute
Throws:
MagickException

getUnderColor

public PixelPacket getUnderColor()
                          throws MagickException
Get the undercolor attribute in the DrawInfo handle.

Returns:
the undercolor attribute in the DrawInfo handle
Throws:
MagickException

setBorderColor

public void setBorderColor(PixelPacket borderColor)
                    throws MagickException
Set the border_color attribute in the DrawInfo handle.

Parameters:
borderColor - new value of the fill attribute
Throws:
MagickException

getBorderColor

public PixelPacket getBorderColor()
                           throws MagickException
Get the border_color attribute in the DrawInfo handle.

Returns:
the corber_color attribute in the DrawInfo handle
Throws:
MagickException

setTile

public void setTile(MagickImage image)
             throws MagickException
Set the tile image in the DrawInfo.

Parameters:
image - the tile image to set
Throws:
MagickException - if any error occurs

getTile

public MagickImage getTile()
                    throws MagickException
Get the tile image from the DrawInfo.

Returns:
a copy of the title image
Throws:
MagickException - if any error occurs