org.dspace.app.mediafilter
Class Brand
java.lang.Object
org.dspace.app.mediafilter.Brand
public class Brand
- extends Object
Class to attach a footer to an image using ImageMagick.
Thanks Ninh Nguyen from the National Library of Australia for providing the source code.
This version of the code is basically Ninh's but reorganised a little. Used with permission.
|
Constructor Summary |
Brand(int brandWidth,
int brandHeight,
Font font,
int xOffset)
Constructor to set up footer image attributes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Brand
public Brand(int brandWidth,
int brandHeight,
Font font,
int xOffset)
- Constructor to set up footer image attributes.
- Parameters:
footerWidth - length of the footer in pixelsfooterHeight - height of the footer in pixelsfont - font to use for text on the footerxOffset - number of pixels text should be indented from left-hand side of footer
create
public BufferedImage create(String brandLeftText,
String shortLeftText,
String brandRightText)
- Create the brand image
- Parameters:
brandLeftText - text that should appear in the bottom left of the imageshortLeftText - abbreviated form of brandLeftText that will be substituted if
the image is resized such that brandLeftText will not fit. null if not
requiredbrandRightText - text that should appear in the bottom right of the image
- Returns:
- BufferedImage a BufferedImage object describing the brand image file
Copyright © 2010 The DSpace Foundation. All Rights Reserved.