Package magick
Class DrawInfo
- java.lang.Object
-
- magick.Magick
-
- magick.DrawInfo
-
public class DrawInfo extends Magick
Encapsulation of the ImageMagick DrawInfo structure.- Author:
- Eric Yeo
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()If the garbabe collector removes us, we had better release the memory we occupy.PixelPacketgetBorderColor()Get the border_color attribute in the DrawInfo handle.intgetDecorate()Get the decorate attribute in the DrawInfo handle.PixelPacketgetFill()Get the fill attribute in the DrawInfo handle.java.lang.StringgetFont()Get the font field in the DrawInfo.java.lang.StringgetGeometry()Get the geometry field in the DrawInfo.intgetGravity()Get the gravity attribute in the DrawInfo handle.doublegetInterlineSpacing()Get the interline_spacing attribute in the DrawInfo handle.doublegetInterwordSpacing()Get the interword_spacing attribute in the DrawInfo handle.doublegetKerning()Get the kerning attribute in the DrawInfo handle.intgetOpacity()Get the opacity attribute in the DrawInfo handle.doublegetPointsize()Get the pointsize attribute in the DrawInfo handle.java.lang.StringgetPrimitive()Get the primitive field in the DrawInfo.PixelPacketgetStroke()Get the stroke attribute in the DrawInfo handle.booleangetStrokeAntialias()Return the stroke_antialias attribute in the DrawInfo handle.doublegetStrokeWidth()Get the stroke_width attribute in the DrawInfo handle.java.lang.StringgetText()Get the text field in the DrawInfo.booleangetTextAntialias()Return the text_antialias attribute in the DrawInfo handle.MagickImagegetTile()Get the tile image from the DrawInfo.PixelPacketgetUnderColor()Get the undercolor attribute in the DrawInfo handle.voidsetBorderColor(PixelPacket borderColor)Set the border_color attribute in the DrawInfo handle.voidsetDecorate(int decoration)Set the decorate attribute in the DrawInfo handle.voidsetFill(PixelPacket fill)Set the fill attribute in the DrawInfo handle.voidsetFont(java.lang.String font)Set the font field in the DrawInfo.voidsetGeometry(java.lang.String geometry)Set the geometry field in the DrawInfo.voidsetGravity(int gravity)Set the gravity attribute in the DrawInfo handle.voidsetInterlineSpacing(double interlineSpacing)Set the interline_spacing attribute in the DrawInfo handle.voidsetInterwordSpacing(double interwordSpacing)Set the interword_spacing attribute in the DrawInfo handle.voidsetKerning(double kerning)Set the kerning attribute in the DrawInfo handle.voidsetOpacity(int opacity)Set the opacity attribute in the DrawInfo handle.voidsetPointsize(double pointsize)Set the pointsize attribute in the DrawInfo handle.voidsetPrimitive(java.lang.String primitive)Set the primitive field in the DrawInfo.voidsetStroke(PixelPacket stroke)Set the stroke attribute in the DrawInfo handle.voidsetStrokeAntialias(boolean strokeAntialias)Set the stroke_antialias attribute in the DrawInfo handle.voidsetStrokeWidth(double strokeWidth)Set the stroke_width attribute in the DrawInfo handle.voidsetText(java.lang.String text)Set the text field in the DrawInfo.voidsetTextAntialias(boolean textAntialias)Set the text_antialias attribute in the DrawInfo handle.voidsetTile(MagickImage image)Set the tile image in the DrawInfo.voidsetUnderColor(PixelPacket underColor)Set the undercolor attribute in the DrawInfo handle.-
Methods inherited from class magick.Magick
parseImageGeometry, queryFonts
-
-
-
-
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- if any error occurs
-
-
Method Detail
-
finalize
protected void finalize()
If the garbabe collector removes us, we had better release the memory we occupy.- Overrides:
finalizein classjava.lang.Object
-
setPrimitive
public void setPrimitive(java.lang.String primitive) throws MagickExceptionSet the primitive field in the DrawInfo.- Parameters:
primitive- value of the primitive field- Throws:
MagickException- if any error occurs
-
getPrimitive
public java.lang.String getPrimitive() throws MagickExceptionGet the primitive field in the DrawInfo.- Returns:
- value of the primitive field.
- Throws:
MagickException- if any error occurs
-
getText
public java.lang.String getText() throws MagickExceptionGet the text field in the DrawInfo.- Returns:
- value of the text field.
- Throws:
MagickException- if any error occurs
-
setText
public void setText(java.lang.String text) throws MagickExceptionSet the text field in the DrawInfo.- Parameters:
text- value of the text field- Throws:
MagickException- if any error occurs
-
getGeometry
public java.lang.String getGeometry() throws MagickExceptionGet the geometry field in the DrawInfo.- Returns:
- value of the geometry field.
- Throws:
MagickException- if any error occurs
-
setGeometry
public void setGeometry(java.lang.String geometry) throws MagickExceptionSet the geometry field in the DrawInfo.- Parameters:
geometry- value of the geometry field- Throws:
MagickException- if any error occurs
-
setFont
public void setFont(java.lang.String font) throws MagickExceptionSet the font field in the DrawInfo.- Parameters:
font- value of the font field- Throws:
MagickException- if any error occurs
-
getFont
public java.lang.String getFont() throws MagickExceptionGet the font field in the DrawInfo.- Returns:
- value of the font field.
- Throws:
MagickException- if any error occurs
-
setStrokeAntialias
public void setStrokeAntialias(boolean strokeAntialias) throws MagickExceptionSet the stroke_antialias attribute in the DrawInfo handle.- Parameters:
strokeAntialias- whether antialiasing is enable- Throws:
MagickException- if any error occurs
-
getStrokeAntialias
public boolean getStrokeAntialias() throws MagickExceptionReturn the stroke_antialias attribute in the DrawInfo handle.- Returns:
- value of the stroke_antialias attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setTextAntialias
public void setTextAntialias(boolean textAntialias) throws MagickExceptionSet the text_antialias attribute in the DrawInfo handle.- Parameters:
textAntialias- whether antialiasing is enable- Throws:
MagickException- if any error occurs
-
getTextAntialias
public boolean getTextAntialias() throws MagickExceptionReturn the text_antialias attribute in the DrawInfo handle.- Returns:
- value of the text_antialias attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setGravity
public void setGravity(int gravity) throws MagickExceptionSet the gravity attribute in the DrawInfo handle.- Parameters:
gravity- the new GravityType value- Throws:
MagickException- if any error occurs- See Also:
GravityType
-
getGravity
public int getGravity() throws MagickExceptionGet the gravity attribute in the DrawInfo handle.- Returns:
- the value of the gravity attribute in the DrawInfo
- Throws:
MagickException- if any error occurs- See Also:
GravityType
-
setOpacity
public void setOpacity(int opacity) throws MagickExceptionSet the opacity attribute in the DrawInfo handle.- Parameters:
opacity- the new opacity value- Throws:
MagickException- if any error occurs
-
getOpacity
public int getOpacity() throws MagickExceptionGet the opacity attribute in the DrawInfo handle.- Returns:
- the value of the opacity attribute in the DrawInfo
- Throws:
MagickException- if any error occurs
-
setDecorate
public void setDecorate(int decoration) throws MagickExceptionSet the decorate attribute in the DrawInfo handle.- Parameters:
decoration- the new DecorationType value- Throws:
MagickException- if any error occurs- See Also:
DecorationType
-
getDecorate
public int getDecorate() throws MagickExceptionGet the decorate attribute in the DrawInfo handle.- Returns:
- the value of the decorate attribute in the DrawInfo
- Throws:
MagickException- if any error occurs- See Also:
DecorationType
-
setKerning
public void setKerning(double kerning) throws MagickExceptionSet the kerning attribute in the DrawInfo handle.- Parameters:
kerning- value of the kerning attribute- Throws:
MagickException- if any error occurs
-
getKerning
public double getKerning() throws MagickExceptionGet the kerning attribute in the DrawInfo handle.- Returns:
- the value of the kerning attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setInterwordSpacing
public void setInterwordSpacing(double interwordSpacing) throws MagickExceptionSet the interword_spacing attribute in the DrawInfo handle.- Parameters:
interwordSpacing- value of the interword_spacing attribute- Throws:
MagickException- if any error occurs
-
getInterwordSpacing
public double getInterwordSpacing() throws MagickExceptionGet the interword_spacing attribute in the DrawInfo handle.- Returns:
- the value of the interword_spacing attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setInterlineSpacing
public void setInterlineSpacing(double interlineSpacing) throws MagickExceptionSet the interline_spacing attribute in the DrawInfo handle.- Parameters:
interlineSpacing- value of the interline_spacing attribute- Throws:
MagickException- if any error occurs
-
getInterlineSpacing
public double getInterlineSpacing() throws MagickExceptionGet the interline_spacing attribute in the DrawInfo handle.- Returns:
- the value of the interline_spacing attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setStrokeWidth
public void setStrokeWidth(double strokeWidth) throws MagickExceptionSet the stroke_width attribute in the DrawInfo handle.- Parameters:
strokeWidth- value of the stroke_width attribute- Throws:
MagickException- if any error occurs
-
getStrokeWidth
public double getStrokeWidth() throws MagickExceptionGet the stroke_width attribute in the DrawInfo handle.- Returns:
- the value of the stroke_width attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
setPointsize
public void setPointsize(double pointsize) throws MagickExceptionSet the pointsize attribute in the DrawInfo handle.- Parameters:
pointsize- value of the pointsize attribute- Throws:
MagickException- if any error occurs
-
getPointsize
public double getPointsize() throws MagickExceptionGet the pointsize attribute in the DrawInfo handle.- Returns:
- the value of the pointsize attribute in DrawInfo
- Throws:
MagickException- if any error occurs
-
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- if any error occurs
-
getFill
public PixelPacket getFill() throws MagickException
Get the fill attribute in the DrawInfo handle.- Returns:
- the fill attribute in the DrawInfo handle
- Throws:
MagickException- if any error occurs
-
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- if any error occurs
-
getStroke
public PixelPacket getStroke() throws MagickException
Get the stroke attribute in the DrawInfo handle.- Returns:
- the stroke attribute in the DrawInfo handle
- Throws:
MagickException- if any error occurs
-
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- if any error occurs
-
getUnderColor
public PixelPacket getUnderColor() throws MagickException
Get the undercolor attribute in the DrawInfo handle.- Returns:
- the undercolor attribute in the DrawInfo handle
- Throws:
MagickException- if any error occurs
-
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- if any error occurs
-
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- if any error occurs
-
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
-
-