public interface ZebraGraphics extends ZebraGraphicsI
Modifier and Type | Method and Description |
---|---|
void |
drawEllipse(int x,
int y,
int width,
int height,
int lineThickness,
Integer lineColor,
Integer 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(android.graphics.PointF start,
android.graphics.PointF end,
float lineThickness,
int lineColor)
Draws a Line from the specified coordinates.
|
void |
drawRectangle(int x,
int y,
int width,
int height,
float lineThickness,
Integer lineColor,
Integer fillColor)
Draws a rectangle at the specified coordinates
|
void |
drawRoundedRectangle(int x,
int y,
int width,
int height,
float radius,
float lineThickness,
Integer lineColor,
Integer fillColor)
Draws a round-cornered rectangle at the specified coordinates.
|
void |
drawText(String text,
int x,
int y,
float textSize,
int textColor)
Draws the text at the specified x and y coordinates.
|
void |
drawText(String text,
int x,
int y,
int angle,
float textSize,
int 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,
float textSize,
int textColor)
Draws the text into the specified rectangle.
|
void |
drawText(String text,
int x,
int y,
int width,
int height,
int angle,
float textSize,
int 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,
float textSize,
int 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,
float textSize,
int textColor,
boolean shrinkToFit)
Draws the text into the specified rectangle.
|
android.graphics.Typeface |
getFont()
Returns the current font type used during drawText operations.
|
Integer |
getPaintFlags()
Gets the current Paint flag bits used during draw operations.
|
android.graphics.Bitmap |
imageDataToImage(byte[] imageData)
Creates a Bitmap object from the raw bitmap data.
|
byte[] |
imageToImageData(android.graphics.Bitmap image)
Converts a Bitmap into it's raw image data.
|
void |
initialize(android.content.Context context,
int maxWidth,
int maxHeight,
OrientationType orientation,
PrintType printType,
Integer fillColor)
Initializes the drawing surface.
|
void |
setFont(android.graphics.Typeface font)
Sets the font type to be used during drawText operations.
|
void |
setPaintFlags(Integer paintFlags)
Sets the Paint flag bits 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(android.content.Context context, int maxWidth, int maxHeight, OrientationType orientation, PrintType printType, Integer fillColor)
maxWidth
or maxHeight
is 0 then the maximum values for the specified printer model will be used.context
- Android application context.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.void drawLine(android.graphics.PointF start, android.graphics.PointF end, float lineThickness, int lineColor)
start
- PointF
instance holding the x and y coordinates of the start point.end
- PointF
instance holding the x and y coordinates of the end point.lineThickness
- The thickness of the line.lineColor
- The RGB line color.void drawText(String text, int x, int y, float textSize, int textColor)
text
- The text to be drawn.x
- The x coordinate.y
- The y coordinate.textSize
- The size of the text.textColor
- The RGB color of the text to be drawn.void drawText(String text, int x, int y, int angle, float textSize, int 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).
textSize
- The size of the text.textColor
- The RGB color of the text to be drawn.void drawText(String text, int x, int y, int width, int height, int angle, float textSize, int 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.
textSize
- The size 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, float textSize, int 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.
textSize
- The size 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 drawText(String text, int x, int y, int width, int height, int angle, TextAlignment horizontal, TextAlignment vertical, float textSize, int 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.textSize
- The size 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, float textSize, int 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.textSize
- The size 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.IllegalArgumentException
- If the specified transparency
level is outside of the valid range.java.io.IOException
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.IllegalArgumentException
- If the specified transparency
level is outside of the valid range.java.io.IOException
void drawRectangle(int x, int y, int width, int height, float lineThickness, Integer lineColor, Integer 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, Integer lineColor, Integer 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, Integer lineColor, Integer 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.android.graphics.Typeface getFont()
void setFont(android.graphics.Typeface font)
font
- The font of the text to be drawn.IllegalArgumentException
- If the Typeface
is invalid.void setPaintFlags(Integer paintFlags)
paintFlags
- The Paint flag bits.Integer getPaintFlags()
byte[] imageToImageData(android.graphics.Bitmap image) throws IllegalArgumentException, java.io.IOException
image
- The Bitmap.IllegalArgumentException
- If the image
is invalid.java.io.IOException
- If an error occurs reading the image data.android.graphics.Bitmap 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.
© 2017 ZIH Corp. All Rights Reserved.