public static interface UIDrawing.UIDrawingDefault extends UIDrawing
UIDrawing
which uses the MicroUI graphical engine's internal software drawer to
perform all drawings. This interface can be implemented to override only a set of drawing methods which matches
with the embedded implementation.UIDrawing.UIDrawingDefault
Modifier and Type | Method and Description |
---|---|
default void |
drawCircle(LLUIPainter.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).
|
default void |
drawCircleArc(LLUIPainter.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).
|
default void |
drawEllipse(LLUIPainter.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).
|
default void |
drawEllipseArc(LLUIPainter.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) .
|
default void |
drawHorizontalLine(LLUIPainter.MicroUIGraphicsContext gc,
int x1,
int x2,
int y)
Draws a horizontal line at between points x1,y (included) and x2,y (included).
|
default void |
drawImage(LLUIPainter.MicroUIGraphicsContext gc,
LLUIPainter.MicroUIImage img,
int regionX,
int regionY,
int width,
int height,
int x,
int y,
int alpha)
Draws a region of an image.
|
default void |
drawLine(LLUIPainter.MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2)
Draws a line at between points x1,y1 (included) and x2,y2 (included).
|
default void |
drawRectangle(LLUIPainter.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).
|
default void |
drawRoundedRectangle(LLUIPainter.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).
|
default void |
drawVerticalLine(LLUIPainter.MicroUIGraphicsContext gc,
int x,
int y1,
int y2)
Draws a vertical line at between points x,y1 (included) and x,y2 (included).
|
default void |
fillCircle(LLUIPainter.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).
|
default void |
fillCircleArc(LLUIPainter.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).
|
default void |
fillEllipse(LLUIPainter.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).
|
default void |
fillEllipseArc(LLUIPainter.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).
|
default void |
fillRectangle(LLUIPainter.MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height)
Fills a rectangle at from top-left point x1,y1 (included) and bottom-right point x2,y2 (included).
|
default void |
fillRoundedRectangle(LLUIPainter.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).
|
default void |
writePixel(LLUIPainter.MicroUIGraphicsContext gc,
int x,
int y)
Draws a pixel at given position.
|
default void drawCircle(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int diameter)
UIDrawing
If the given diameter is negative or zero, nothing is drawn.
drawCircle
in interface UIDrawing
gc
- the MicroUI GraphicsContext target.x
- the top-left pixel X coordinate.y
- the top-left pixel Y coordinate.diameter
- the circle square size.default void drawCircleArc(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
UIDrawing
The 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 UIDrawing
gc
- 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 startAngledefault void drawEllipse(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height)
UIDrawing
If either the given width or height is negative or zero, nothing is drawn.
drawEllipse
in interface UIDrawing
gc
- 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.default void drawEllipseArc(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
UIDrawing
The 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 UIDrawing
gc
- 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 startAngledefault void drawHorizontalLine(LLUIPainter.MicroUIGraphicsContext gc, int x1, int x2, int y)
UIDrawing
drawHorizontalLine
in interface UIDrawing
gc
- 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.default void drawImage(LLUIPainter.MicroUIGraphicsContext gc, LLUIPainter.MicroUIImage img, int regionX, int regionY, int width, int height, int x, int y, int alpha)
UIDrawing
If the specified source region exceeds the image bounds, the copied region is limited to the image boundary. If the copied region goes out of the bounds of the graphics context area, pixels out of the range will not be drawn.
A global opacity value is given. When this value is 0xff (255, opaque), that means the image is drawn on the graphics context without managing an extra opacity. Only the image transparent pixels must have been merged with destination. All image opaque pixels override destination.
When this value is a value between 0 and 0xff, that means each pixel of the image must be merged with destination in addition with the image transparent pixels. An image opaque pixel becomes transparent (its opacity is the given alpha) and the opacity of an image transparent pixel becomes (alpha * alpha(pixel)) / 255.
drawImage
in interface UIDrawing
gc
- the MicroUI GraphicsContext target.img
- the MicroUI Image to draw.regionX
- the x coordinate of the upper-left corner of the region to copy.regionY
- the x coordinate of the upper-left corner of the region to copy.width
- the width of the region to copy.height
- the height of the region to copy.x
- the x coordinate of the top-left point in the destination.y
- the y coordinate of the top-left point in the destination.alpha
- the opacity level to apply to the region.default void drawLine(LLUIPainter.MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
UIDrawing
default void drawRectangle(LLUIPainter.MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
UIDrawing
drawRectangle
in interface UIDrawing
gc
- 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.default void drawRoundedRectangle(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
UIDrawing
drawRoundedRectangle
in interface UIDrawing
gc
- 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.default void drawVerticalLine(LLUIPainter.MicroUIGraphicsContext gc, int x, int y1, int y2)
UIDrawing
drawVerticalLine
in interface UIDrawing
gc
- 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.default void fillCircle(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int diameter)
UIDrawing
If the given diameter is negative or zero, nothing is drawn.
fillCircle
in interface UIDrawing
gc
- the MicroUI GraphicsContext target.x
- the top-left pixel X coordinate.y
- the top-left pixel Y coordinate.diameter
- the circle square size.default void fillCircleArc(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
UIDrawing
fillCircleArc
in interface UIDrawing
gc
- 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 startAngledefault void fillEllipse(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height)
UIDrawing
If either the given width or height is negative or zero, nothing is drawn.
fillEllipse
in interface UIDrawing
gc
- 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.default void fillEllipseArc(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
UIDrawing
The 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 UIDrawing
gc
- 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 startAngledefault void fillRectangle(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height)
UIDrawing
fillRectangle
in interface UIDrawing
gc
- drawing destination target.x
- the top-left pixel X coordinate.y
- the top-left pixel Y coordinate.width
- the bottom-right pixel X coordinate.height
- the top-right pixel Y coordinate.default void fillRoundedRectangle(LLUIPainter.MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
UIDrawing
fillRoundedRectangle
in interface UIDrawing
gc
- 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.default void writePixel(LLUIPainter.MicroUIGraphicsContext gc, int x, int y)
UIDrawing
writePixel
in interface UIDrawing
gc
- drawing destination target.x
- the pixel X coordinate.y
- the pixel Y coordinate.