public class DisplayDrawer extends java.lang.Object implements UIDrawing
UIDrawing intended to be used to draw on the display and the images with the same format.
It uses the software algorithms proposed by the UI Pack except the images drawings that uses LLUIPainter
drawer.
LLUIDisplay.getUIDrawerSoftware()| Constructor and Description |
|---|
DisplayDrawer() |
| Modifier and Type | Method and Description |
|---|---|
void |
drawCircle(MicroUIGraphicsContext gc,
int x,
int y,
int diameter)
Draws a circle covering the square defined by top-left point x,y (included) and bottom-right point
x+diameter-1,y+diameter-1 (included).
|
void |
drawCircleArc(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
float startAngle,
float arcAngle)
Draws a circular arc covering the square defined by top-left point x,y (included) and bottom-right point
x+diameter-1,y+diameter-1 (included).
|
void |
drawEllipse(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height)
Draws an ellipse covering the rectangle defined by top-left point x,y (included) and bottom-right point
x+width-1,y+height-1 (included).
|
void |
drawEllipseArc(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
float startAngle,
float arcAngle)
Draws an elliptical arc covering the rectangle defined by top-left point x,y (included) and bottom-right point
x+width-1,y+height-1 (included) .
|
void |
drawHorizontalLine(MicroUIGraphicsContext gc,
int x1,
int x2,
int y)
Draws a horizontal line at between points x1,y (included) and x2,y (included).
|
void |
drawLine(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2)
Draws a line at between points x1,y1 (included) and x2,y2 (included).
|
void |
drawRectangle(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2)
Draws a rectangle at from top-left point x1,y1 (included) and bottom-right point x2,y2 (included).
|
void |
drawRoundedRectangle(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Draws a rounded rectangle at from top-left point x,y (included) and bottom-right point x+width-1,y+height-1
(included).
|
void |
drawThickCircle(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
int thickness)
Draws a thick circle covering the square specified by its diameter.
|
void |
drawThickCircleArc(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
float startAngle,
float arcAngle,
int thickness)
Draws a thick arc covering the square specified by its diameter.
|
void |
drawThickEllipse(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
int thickness)
Draws a thick ellipse covering the specified rectangle.
|
void |
drawThickFadedCircle(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
int thickness,
int fade)
Draws a thick circle with fade covering the square specified by its diameter.
|
void |
drawThickFadedCircleArc(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
float startAngle,
float arcAngle,
int thickness,
int fade,
LLDWPainter.DrawingCap start,
LLDWPainter.DrawingCap end)
Draws a thick circle with fade arc covering the specified square.
|
void |
drawThickFadedEllipse(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
int thickness,
int fade)
Draws a thick ellipse with fade covering the specified rectangle.
|
void |
drawThickFadedLine(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2,
int thickness,
int fade,
LLDWPainter.DrawingCap start,
LLDWPainter.DrawingCap end)
Draws a thick line with fade between given points.
|
void |
drawThickFadedPoint(MicroUIGraphicsContext gc,
int x,
int y,
int thickness,
int fade)
Draws a thick point with fade at given position.
|
void |
drawThickLine(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2,
int thickness)
Draws a thick line between given points.
|
void |
drawVerticalLine(MicroUIGraphicsContext gc,
int x,
int y1,
int y2)
Draws a vertical line at between points x,y1 (included) and x,y2 (included).
|
void |
fillCircle(MicroUIGraphicsContext gc,
int x,
int y,
int diameter)
Fills a circle covering the square defined by top-left point x,y (included) and bottom-right point
x+diameter-1,y+diameter-1 (included).
|
void |
fillCircleArc(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
float startAngle,
float arcAngle)
Fills a circular arc covering the square defined by top-left point x,y (included) and bottom-right point
x+diameter-1,y+diameter-1 (included).
|
void |
fillEllipse(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height)
Fills an ellipse covering the rectangle defined by top-left point x,y (included) and bottom-right point
x+width-1,y+height-1 (included).
|
void |
fillEllipseArc(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
float startAngle,
float arcAngle)
Fills an arc covering the rectangle defined by top-left point x,y (included) and bottom-right point
x+width-1,y+height-1 (included).
|
void |
fillRectangle(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2)
Fills a rectangle at from top-left point x1,y1 (included) and bottom-right point x2,y2 (included).
|
void |
fillRoundedRectangle(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
int arcWidth,
int arcHeight)
Fills a rounded rectangle at from top-left point x,y (included) and bottom-right point x+width-1,y+height-1
(included).
|
MicroUIImageFormat |
handledFormat()
Gets the supported buffered image format.
|
void |
writePixel(MicroUIGraphicsContext gc,
int x,
int y)
Draws a pixel at given position.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdrawChar, drawCharWithRotationBilinear, drawCharWithRotationNearestNeighbor, drawFlippedImage, drawImage, drawRenderableString, drawRotatedImageBilinear, drawRotatedImageNearestNeighbor, drawScaledImageBilinear, drawScaledImageNearestNeighbor, drawScaledRenderableStringBilinear, drawScaledStringBilinear, drawString, initializeRenderableStringSNIContext, stringWidthpublic MicroUIImageFormat handledFormat()
UIDrawinghandledFormat in interface UIDrawingpublic void writePixel(MicroUIGraphicsContext gc, int x, int y)
UIDrawingwritePixel in interface UIDrawinggc - drawing destination target.x - the pixel X coordinate.y - the pixel Y coordinate.public void drawLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
UIDrawingpublic void drawHorizontalLine(MicroUIGraphicsContext gc, int x1, int x2, int y)
UIDrawingdrawHorizontalLine in interface UIDrawinggc - the MicroUI GraphicsContext target.x1 - the first pixel line X coordinate.x2 - the last pixel line X coordinate.y - the both pixels line Y coordinate.public void drawVerticalLine(MicroUIGraphicsContext gc, int x, int y1, int y2)
UIDrawingdrawVerticalLine in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the both pixels line X coordinate.y1 - the first pixel line Y coordinate.y2 - the last pixel line Y coordinate.public void drawRectangle(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
UIDrawingdrawRectangle in interface UIDrawinggc - the MicroUI GraphicsContext target.x1 - the top-left pixel X coordinate.y1 - the top-left pixel Y coordinate.x2 - the bottom-right pixel X coordinate.y2 - the top-right pixel Y coordinate.public void fillRectangle(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
UIDrawingfillRectangle in interface UIDrawinggc - drawing destination target.x1 - the top-left pixel X coordinate.y1 - the top-left pixel Y coordinate.x2 - the bottom-right pixel X coordinate.y2 - the top-right pixel Y coordinate.public void drawRoundedRectangle(MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
UIDrawingdrawRoundedRectangle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the rectangle width.height - the rectangle height.arcWidth - the horizontal diameter of the arc at the corners.arcHeight - the vertical diameter of the arc at the corners.public void fillRoundedRectangle(MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
UIDrawingfillRoundedRectangle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the rectangle width.height - the rectangle height.arcWidth - the horizontal diameter of the arc at the corners.arcHeight - the vertical diameter of the arc at the corners.public void drawCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
UIDrawingThe arc is drawn from startAngle up to arcAngle degrees. The center of the arc is defined as the center of the square whose origin is at (x,y) (upper-left corner) and whose dimension is given by diameter.
Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
If either the given diameter is negative or zero, or if arcAngle is zero, nothing is drawn.
The angles are given relative to the square. For instance an angle of 45 degrees is always defined by the line from the center of the square to the upper right corner of the square.
drawCircleArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.diameter - the diameter of the arc to draw.startAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglepublic void drawEllipseArc(MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
UIDrawingThe arc is drawn from startAngle up to arcAngle degrees. The center of the arc is defined as the center of the rectangle whose origin is at (x,y) (upper-left corner) and whose dimension is given by width and height.
Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
If either the given width or height is negative or zero, or if arcAngle is zero, nothing is drawn.
The angles are given relative to the rectangle. For instance an angle of 45 degrees is always defined by the line from the center of the rectangle to the upper right corner of the rectangle. Thus for a non squared rectangle angles are skewed along either height or width.
drawEllipseArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the rectangle width.height - the rectangle height.startAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglepublic void fillCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
UIDrawingfillCircleArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.diameter - the diameter of the arc to draw.startAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglepublic void fillEllipseArc(MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
UIDrawingThe arc is drawn from startAngle up to arcAngle degrees. The center of the arc is defined as the center of the rectangle whose origin is at (x,y) (upper-left corner) and whose dimension is given by width and height.
Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
If either the given width or height is negative or zero, or if arcAngle is zero, nothing is drawn.
The angles are given relative to the rectangle. For instance an angle of 45 degrees is always defined by the line from the center of the rectangle to the upper right corner of the rectangle. Thus for a non squared rectangle angles are skewed along either height or width.
fillEllipseArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the rectangle width.height - the rectangle height.startAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglepublic void drawEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height)
UIDrawingIf either the given width or height is negative or zero, nothing is drawn.
drawEllipse in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the ellipse width.height - the ellipse height.public void fillEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height)
UIDrawingIf either the given width or height is negative or zero, nothing is drawn.
fillEllipse in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.width - the ellipse width.height - the ellipse height.public void drawCircle(MicroUIGraphicsContext gc, int x, int y, int diameter)
UIDrawingIf the given diameter is negative or zero, nothing is drawn.
drawCircle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.diameter - the circle square size.public void fillCircle(MicroUIGraphicsContext gc, int x, int y, int diameter)
UIDrawingIf the given diameter is negative or zero, nothing is drawn.
fillCircle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the top-left pixel X coordinate.y - the top-left pixel Y coordinate.diameter - the circle square size.public void drawThickFadedPoint(MicroUIGraphicsContext gc, int x, int y, int thickness, int fade)
UIDrawingdrawThickFadedPoint in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the point X coordinate.y - the point Y coordinate.thickness - the point thickness.fade - the fade to apply.public void drawThickFadedLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2, int thickness, int fade, LLDWPainter.DrawingCap start, LLDWPainter.DrawingCap end)
UIDrawingdrawThickFadedLine in interface UIDrawinggc - the MicroUI GraphicsContext target.x1 - the x coordinate of the start of the liney1 - the y coordinate of the start of the linex2 - the x coordinate of the end of the liney2 - the y coordinate of the end of the linethickness - the line thickness.fade - the fade to apply.start - cap representation of start of shapeend - cap representation of end of shapepublic void drawThickFadedCircle(MicroUIGraphicsContext gc, int x, int y, int diameter, int thickness, int fade)
UIDrawingdrawThickFadedCircle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the square where the circle is drawny - the y coordinate of the upper-left corner of the square where the circle is drawndiameter - the diameter of the circle to drawthickness - the circle thickness.fade - the fade to apply.public void drawThickFadedCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle, int thickness, int fade, LLDWPainter.DrawingCap start, LLDWPainter.DrawingCap end)
UIDrawingThe center of the arc is defined as the center of the square whose origin is at (x,y) (upper-left corner) and whose dimension is given by diameter.
Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
If diameter is negative or zero, nothing is drawn.
The angles are given relative to the square. For instance an angle of 45 degrees is always defined by the line from the center of the square to the upper right corner of the square. Thus for a non squared square angles are skewed along either height or width.
drawThickFadedCircleArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the square where the arc is drawny - the y coordinate of the upper-left corner of the square where the arc is drawndiameter - the diameter of the circle to drawstartAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglethickness - the arc thickness.fade - the fade to apply.start - cap representation of start of shapeend - cap representation of end of shapepublic void drawThickFadedEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height, int thickness, int fade)
UIDrawingThe center of the ellipse is defined as the center of the rectangle whose origin is at (x,y) (upper-left corner) and whose dimension is given by width and height.
If either width or height is negative or zero, nothing is drawn.
drawThickFadedEllipse in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the rectangle where the ellipse is drawny - the y coordinate of the upper-left corner of the rectangle where the ellipse is drawnwidth - the width of the ellipse to drawheight - the height of the ellipse to drawthickness - the ellipse thickness.fade - the fade to apply.public void drawThickLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2, int thickness)
UIDrawingdrawThickLine in interface UIDrawinggc - the MicroUI GraphicsContext target.x1 - the x coordinate of the start of the liney1 - the y coordinate of the start of the linex2 - the x coordinate of the end of the liney2 - the y coordinate of the end of the linethickness - the line thickness.public void drawThickCircle(MicroUIGraphicsContext gc, int x, int y, int diameter, int thickness)
UIDrawingIf diameter is negative or zero, nothing is drawn.
drawThickCircle in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the square where the circle is drawny - the y coordinate of the upper-left corner of the square where the circle is drawndiameter - the diameter of the circle to drawthickness - the circle thickness.public void drawThickEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height, int thickness)
UIDrawingThe center of the ellipse is defined as the center of the rectangle whose origin is at (x,y) (upper-left corner) and whose dimension is given by width and height.
If either width or height is negative or zero, nothing is drawn.
drawThickEllipse in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the rectangle where the ellipse is drawny - the y coordinate of the upper-left corner of the rectangle where the ellipse is drawnwidth - the width of the ellipse to drawheight - the height of the ellipse to drawthickness - the ellipse thickness.public void drawThickCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle, int thickness)
UIDrawingThe arc is drawn from startAngle up to arcAngle degrees. The center of the arc is defined as the center of the square whose origin is at (x,y) (upper-left corner) and whose dimension is given by diameter.
Angles are interpreted such that 0 degrees is at the 3 o'clock position. A positive value indicates a counter-clockwise rotation while a negative value indicates a clockwise rotation.
If diameter is negative, nothing is drawn.
drawThickCircleArc in interface UIDrawinggc - the MicroUI GraphicsContext target.x - the x coordinate of the upper-left corner of the square where the arc is drawny - the y coordinate of the upper-left corner of the square where the arc is drawndiameter - the diameter of the circle to drawstartAngle - the beginning angle of the arc to drawarcAngle - the angular extent of the arc from startAnglethickness - the arc thickness.