public interface ZebraGraphics extends ZebraGraphicsI
Modifier and Type | Method and Description |
---|---|
ZebraCardImageI |
createImage(String colorProfileName)
Generates the final bitmap image.
|
void |
drawEllipse(int x,
int y,
int width,
int height,
int lineThickness,
java.awt.Color lineColor,
java.awt.Color fillColor)
Draws an ellipse at the specified coordinates
|
void |
drawImage(byte[] imageData,
ImagePosition position,
int width,
int height,
float transparency,
RotationType rotation)
Draws the image at the specified image position in the rectangle.
|
void |
drawImage(byte[] imageData,
int x,
int y,
int width,
int height,
float transparency,
RotationType rotation)
Draws the image into the specified rectangle.
|
void |
drawLine(int x1,
int y1,
int x2,
int y2,
float lineThickness,
java.awt.Color lineColor)
Draws a Line from the specified coordinates.
|
void |
drawRectangle(int x,
int y,
int width,
int height,
float lineThickness,
java.awt.Color lineColor,
java.awt.Color fillColor)
Draws a rectangle at the specified coordinates
|
void |
drawRoundedRectangle(int x,
int y,
int width,
int height,
float radius,
float lineThickness,
java.awt.Color lineColor,
java.awt.Color fillColor)
Draws a round-cornered rectangle at the specified coordinates.
|
void |
drawText(String text,
int x,
int y,
java.awt.Color textColor)
Draws the text at the specified x and y coordinates.
|
void |
drawText(String text,
int x,
int y,
int angle,
java.awt.Color textColor)
Draws the text at the specified x and y coordinates and center rotates the text to the specified angle
|
void |
drawText(String text,
int x,
int y,
int width,
int height,
int angle,
java.awt.Color textColor)
Draws the text into the specified rectangle.
|
void |
drawText(String text,
int x,
int y,
int width,
int height,
int angle,
java.awt.Color textColor,
boolean shrinkToFit)
Draws the text into the specified rectangle.
|
void |
drawText(String text,
int x,
int y,
int width,
int height,
int angle,
TextAlignment horizontal,
TextAlignment vertical,
java.awt.Color textColor)
Draws the text into the specified rectangle.
|
void |
drawText(String text,
int x,
int y,
int width,
int height,
int angle,
TextAlignment horizontal,
TextAlignment vertical,
java.awt.Color textColor,
boolean shrinkToFit)
Draws the text into the specified rectangle.
|
java.awt.image.BufferedImage |
imageDataToImage(byte[] imageData)
Creates a BufferedImage object from the raw bitmap data.
|
byte[] |
imageToImageData(java.awt.image.BufferedImage image)
Converts a BufferedImage into it's raw image data
|
void |
initialize(int maxWidth,
int maxHeight,
OrientationType orientation,
PrintType printType,
java.awt.Color fillColor)
Initializes the drawing surface.
|
void |
setFont(java.awt.Font font)
Sets the font type to be used during drawText operations.
|
void |
setRenderingHints(java.awt.RenderingHints renderingHints)
Adds to the RenderingHints to be used during draw operations.
|
clear, close, convertImageToRGB, createImage, cropImage, drawImage, extractBlackImageData, extractHalfPanelImageData, initialize, monochromeConversionType, rotateImage, rotateImage, setBrightnessLevel, setColorScale, setContrastLevel, setGammaLevel, setPrinterModel, setSaturationLevel
void initialize(int maxWidth, int maxHeight, OrientationType orientation, PrintType printType, java.awt.Color fillColor)
maxWidth
or maxHeight
is 0 then the maximum values for the specified printer model will be used.maxWidth
- the maximum width of the image (limited based on printer model)maxHeight
- the maximum height of the image (limited based on printer model)orientation
- the orientation of the image.printType
- the type of print to be performed for the given image data.fillColor
- the RGB background fill color.ZebraCardImageI createImage(String colorProfileName) throws java.io.IOException
colorProfileName
- ICC profile to apply to the image.
java.io.IOException
- if an error occurs creating the image.void drawLine(int x1, int y1, int x2, int y2, float lineThickness, java.awt.Color lineColor)
x1
- the X coordinate of the start pointy1
- the Y coordinate of the start pointx2
- the X coordinate of the end pointy2
- the Y coordinate of the end pointlineThickness
- the thickness of the line.lineColor
- the RGB line color.void drawText(String text, int x, int y, int angle, java.awt.Color textColor)
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.angle
- the angle of the the text to be drawn (center rotated).textColor
- the RGB color of the text to be drawn.void drawText(String text, int x, int y, java.awt.Color textColor)
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.textColor
- the RGB color of the text to be drawn.void drawText(String text, int x, int y, int width, int height, int angle, java.awt.Color textColor) throws IllegalArgumentException
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.angle
- the angle of the the text to be drawn (center rotated).textColor
- the RGB color of the text to be drawn.IllegalArgumentException
- if the specified width
and height
are not large enough to contain the text.void drawText(String text, int x, int y, int width, int height, int angle, java.awt.Color textColor, boolean shrinkToFit) throws IllegalArgumentException
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.angle
- the angle of the the text to be drawn.textColor
- the RGB color of the text to be drawn.shrinkToFit
- True to adjust the font size to fit the specified width and height.IllegalArgumentException
- if the specified width
and height
are not large enough to contain the text and
shrinkToFit
is false.void drawText(String text, int x, int y, int width, int height, int angle, TextAlignment horizontal, TextAlignment vertical, java.awt.Color textColor) throws IllegalArgumentException
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.angle
- the angle of the the text to be drawn.horizontal
- the horizontal alignment of the text.vertical
- the vertical alignment of the text.textColor
- the RGB color of the text to be drawn.IllegalArgumentException
- if the specified width
and height
are not large enough to contain the text.void drawText(String text, int x, int y, int width, int height, int angle, TextAlignment horizontal, TextAlignment vertical, java.awt.Color textColor, boolean shrinkToFit) throws IllegalArgumentException
text
- the text to be drawn.x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.angle
- the angle of the the text to be drawn.horizontal
- the horizontal alignment of the text.vertical
- the vertical alignment of the text.textColor
- the RGB color of the text to be drawn.shrinkToFit
- true to adjust the font size to fit the specified width and height.IllegalArgumentException
- if the specified width
and height
are not large enough to contain the text and
shrinkToFit
is false.void drawImage(byte[] imageData, int x, int y, int width, int height, float transparency, RotationType rotation) throws java.io.IOException, IllegalArgumentException
imageData
- the bitmap image data.x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.
width
is 0 then the width of the specified image will be used.height
- the height of the rectangle.
height
is 0 then the height of the specified image will be usedtransparency
- the transparency level.
rotation
- the rotation type for the image.java.io.IOException
- if an error occurs reading the image data.IllegalArgumentException
- if the specified transparency
level is outside of the valid range.void drawImage(byte[] imageData, ImagePosition position, int width, int height, float transparency, RotationType rotation) throws java.io.IOException, IllegalArgumentException
imageData
- the bitmap image data.position
- the position of the image in the rectangle.width
- the width of the rectangle.
width
is 0 then the width of the specified image will be used.height
- the height of the rectangle.
height
is 0 then the height of the specified image will be used.transparency
- the transparency level.
rotation
- the rotation type.java.io.IOException
- if an error occurs reading the image data.IllegalArgumentException
- if the specified transparency
level is outside of the valid range.void drawRectangle(int x, int y, int width, int height, float lineThickness, java.awt.Color lineColor, java.awt.Color fillColor)
x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.lineThickness
- the line thickness of the rectangle.
lineThickness
will be ignored if the lineColor
is null.lineColor
- the RGB line color of the rectangle.
lineColor
will be ignored if null.fillColor
- the RGB fill color of the rectangle.
fillColor
will be ignored if null.void drawRoundedRectangle(int x, int y, int width, int height, float radius, float lineThickness, java.awt.Color lineColor, java.awt.Color fillColor)
x
- the x coordinate.y
- the y coordinate.width
- the width of the rectangle.height
- the height of the rectangle.radius
- the corner radius of the rectangle.lineThickness
- the line thickness of the rectangle.
lineThickness
will be ignored if the lineColor
is null.lineColor
- the RGB line color of the rectangle.
lineColor
will be ignored if null.fillColor
- the RGB fill color of the rectangle.
fillColor
will be ignored if null.void drawEllipse(int x, int y, int width, int height, int lineThickness, java.awt.Color lineColor, java.awt.Color fillColor)
x
- the x coordinate of the upper left corner of the ellipse.y
- the y coordinate of the upper left corner of the ellipse.width
- the width of the ellipse.height
- the height of the ellipse.lineThickness
- the line thickness of the rectangle.
lineThickness
will be ignored if the lineColor
is null.lineColor
- the RGB line color of the rectangle.
lineColor
will be ignored if null.fillColor
- the RGB fill color of the rectangle.
fillColor
will be ignored if null.void setFont(java.awt.Font font)
font
- the font of the text to be drawn.void setRenderingHints(java.awt.RenderingHints renderingHints)
renderingHints
- the rendering hints.byte[] imageToImageData(java.awt.image.BufferedImage image) throws IllegalArgumentException, java.io.IOException
image
- the BufferedImage.IllegalArgumentException
- if the image
is invalid.java.io.IOException
- if an error occurs reading the image data.java.awt.image.BufferedImage imageDataToImage(byte[] imageData) throws IllegalArgumentException, java.io.IOException
imageData
- the raw bitmap data.IllegalArgumentException
- if the imageData
is invalid.java.io.IOException
- if an error occurs reading the image data.
© 2016 ZIH Corp. All Rights Reserved.