public interface UIDrawing
This interface is implemented by the MicroUI Graphics Engine's internal software drawer. This drawer implements all
drawings in software. The rendering is exactly the same than the embedded algorithms listed in
ui_drawing_soft.h. See LLUIDisplay.getUIDrawerSoftware().
This interface can be fully implemented by a dedicated platform class in platform front panel project. This allows to implement drawing algorithms like embedded platform.
| Modifier and Type | Method and Description |
|---|---|
default void |
drawChar(MicroUIGraphicsContext gc,
char c,
MicroUIFont font,
int x,
int y)
Draws a character.
|
default void |
drawCharWithRotationBilinear(MicroUIGraphicsContext gc,
char c,
MicroUIFont font,
int destX,
int destY,
int xRotation,
int yRotation,
float angle,
int alpha)
Draws a string applying a rotation and an alpha value.
|
default void |
drawCharWithRotationNearestNeighbor(MicroUIGraphicsContext gc,
char c,
MicroUIFont font,
int destX,
int destY,
int xRotation,
int yRotation,
float angle,
int alpha)
Draws a string applying a rotation and an alpha value.
|
default 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).
|
default 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).
|
default 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).
|
default 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) .
|
default void |
drawFlippedImage(MicroUIGraphicsContext gc,
MicroUIImage img,
int regionX,
int regionY,
int width,
int height,
int x,
int y,
LLDWPainter.DrawingFlip flip,
int alpha)
Draws an image applying a flip (0, 90, 180 or 270 degrees with or without mirror).
|
default void |
drawHorizontalLine(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(MicroUIGraphicsContext gc,
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(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(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 |
drawRenderableString(MicroUIGraphicsContext gc,
char[] string,
MicroUIFont font,
int charsWidth,
MicroUIRenderableString renderableString,
int x,
int y)
Draws a renderable string.
|
default void |
drawRotatedImageBilinear(MicroUIGraphicsContext gc,
MicroUIImage img,
int x,
int y,
int rotationX,
int rotationY,
float angle,
int alpha)
Draws an image applying a free rotation (0 to 360 degrees).
|
default void |
drawRotatedImageNearestNeighbor(MicroUIGraphicsContext gc,
MicroUIImage img,
int x,
int y,
int rotationX,
int rotationY,
float angle,
int alpha)
Draws an image applying a free rotation (0 to 360 degrees).
|
default 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).
|
default void |
drawScaledImageBilinear(MicroUIGraphicsContext gc,
MicroUIImage img,
int x,
int y,
float factorX,
float factorY,
int alpha)
Draws an image applying a scaling.
|
default void |
drawScaledImageNearestNeighbor(MicroUIGraphicsContext gc,
MicroUIImage img,
int x,
int y,
float factorX,
float factorY,
int alpha)
Draws an image applying a scaling.
|
default void |
drawScaledRenderableStringBilinear(MicroUIGraphicsContext gc,
char[] string,
MicroUIFont font,
int width,
MicroUIRenderableString renderableString,
int x,
int y,
float xRatio,
float yRatio)
Draws a renderable string applying a scaling.
|
default void |
drawScaledStringBilinear(MicroUIGraphicsContext gc,
char[] string,
MicroUIFont font,
int x,
int y,
float xRatio,
float yRatio)
Draws a string applying a scaling.
|
default void |
drawString(MicroUIGraphicsContext gc,
char[] string,
MicroUIFont font,
int x,
int y)
Draws a string.
|
default void |
drawThickCircle(MicroUIGraphicsContext gc,
int x,
int y,
int diameter,
int thickness)
Draws a thick circle covering the square specified by its diameter.
|
default 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.
|
default void |
drawThickEllipse(MicroUIGraphicsContext gc,
int x,
int y,
int width,
int height,
int thickness)
Draws a thick ellipse covering the specified rectangle.
|
default 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.
|
default 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.
|
default 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.
|
default 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.
|
default void |
drawThickFadedPoint(MicroUIGraphicsContext gc,
int x,
int y,
int thickness,
int fade)
Draws a thick point with fade at given position.
|
default void |
drawThickLine(MicroUIGraphicsContext gc,
int x1,
int y1,
int x2,
int y2,
int thickness)
Draws a thick line between given points.
|
default void |
drawVerticalLine(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(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(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(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(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(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).
|
default 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.
|
default int |
initializeRenderableStringSNIContext(char[] string,
MicroUIFont font,
MicroUIRenderableString renderableString)
Computes the rendered width of a string and fills the SNI context.
|
default int |
stringWidth(char[] string,
MicroUIFont font)
Computes the rendered width of a string.
|
default void |
writePixel(MicroUIGraphicsContext gc,
int x,
int y)
Draws a pixel at given position.
|
MicroUIImageFormat handledFormat()
default void writePixel(MicroUIGraphicsContext gc, int x, int y)
gc - drawing destination target.x - the pixel X coordinate.y - the pixel Y coordinate.default void drawLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
gc - drawing destination target.x1 - the first pixel line X coordinate.y1 - the first pixel line Y coordinate.x2 - the last pixel line X coordinate.y2 - the last pixel line Y coordinate.default void drawHorizontalLine(MicroUIGraphicsContext gc, int x1, int x2, int y)
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 drawVerticalLine(MicroUIGraphicsContext gc, int x, int y1, int y2)
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 drawRectangle(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
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 fillRectangle(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2)
gc - 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.default void drawRoundedRectangle(MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
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 fillRoundedRectangle(MicroUIGraphicsContext gc, int x, int y, int width, int height, int arcWidth, int arcHeight)
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 drawCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
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.
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 drawEllipseArc(MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
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.
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 fillCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle)
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 fillEllipseArc(MicroUIGraphicsContext gc, int x, int y, int width, int height, float startAngle, float arcAngle)
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.
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 drawEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height)
If either the given width or height is negative or zero, nothing is drawn.
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 fillEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height)
If either the given width or height is negative or zero, nothing is drawn.
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 drawCircle(MicroUIGraphicsContext gc, int x, int y, int diameter)
If the given diameter is negative or zero, nothing is drawn.
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 fillCircle(MicroUIGraphicsContext gc, int x, int y, int diameter)
If the given diameter is negative or zero, nothing is drawn.
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 drawImage(MicroUIGraphicsContext gc, MicroUIImage img, int regionX, int regionY, int width, int height, int x, int y, int alpha)
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.
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 y 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 drawThickFadedPoint(MicroUIGraphicsContext gc, int x, int y, int thickness, int fade)
gc - the MicroUI GraphicsContext target.x - the point X coordinate.y - the point Y coordinate.thickness - the point thickness.fade - the fade to apply.default void drawThickFadedLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2, int thickness, int fade, LLDWPainter.DrawingCap start, LLDWPainter.DrawingCap end)
gc - 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 shapedefault void drawThickFadedCircle(MicroUIGraphicsContext gc, int x, int y, int diameter, int thickness, int fade)
gc - 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.default void drawThickFadedCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle, int thickness, int fade, LLDWPainter.DrawingCap start, LLDWPainter.DrawingCap end)
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 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.
gc - 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 shapedefault void drawThickFadedEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height, int thickness, int fade)
The 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.
gc - 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.default void drawThickLine(MicroUIGraphicsContext gc, int x1, int y1, int x2, int y2, int thickness)
gc - 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.default void drawThickCircle(MicroUIGraphicsContext gc, int x, int y, int diameter, int thickness)
If diameter is negative or zero, nothing is drawn.
gc - 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.default void drawThickEllipse(MicroUIGraphicsContext gc, int x, int y, int width, int height, int thickness)
The 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.
gc - 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.default void drawThickCircleArc(MicroUIGraphicsContext gc, int x, int y, int diameter, float startAngle, float arcAngle, int thickness)
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 diameter is negative, nothing is drawn.
gc - 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.default void drawFlippedImage(MicroUIGraphicsContext gc, MicroUIImage img, int regionX, int regionY, int width, int height, int x, int y, LLDWPainter.DrawingFlip flip, int alpha)
gc - the MicroUI GraphicsContext target.img - the MicroUI Image to draw.regionX - the x coordinate of the upper-left corner of the region to draw.regionY - the y coordinate of the upper-left corner of the region to draw.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.flip - the flip to apply.alpha - the opacity level to apply to the region.default void drawRotatedImageNearestNeighbor(MicroUIGraphicsContext gc, MicroUIImage img, int x, int y, int rotationX, int rotationY, float angle, int alpha)
The rotation is specified by the center and the angle. The reference point is the graphical object top-left corner. The rotation point is relative where the graphical object will be drawn.
This method uses the nearest neighbor algorithm to render the content. This algorithm is faster than bilinear algorithm but its rendering is faster.
gc - the MicroUI GraphicsContext target.img - the MicroUI Image to draw.x - the x coordinate of the image reference anchor top-left point.y - the y coordinate of the image reference anchor top-left point.rotationX - the x coordinate of the rotation center.rotationY - the y coordinate of the rotation center.angle - the rotation angle.alpha - the opacity level to apply to the region.default void drawRotatedImageBilinear(MicroUIGraphicsContext gc, MicroUIImage img, int x, int y, int rotationX, int rotationY, float angle, int alpha)
The rotation is specified by the center and the angle. The reference point is the graphical object top-left corner. The rotation point is relative where the graphical object will be drawn.
This method uses the bilinear algorithm to render the content. This algorithm performs better rendering than nearest neighbor algorithm but it is slower to apply.
gc - the MicroUI GraphicsContext target.img - the MicroUI Image to draw.x - the x coordinate of the image reference anchor top-left point.y - the y coordinate of the image reference anchor top-left point.rotationX - the x coordinate of the rotation center.rotationY - the y coordinate of the rotation center.angle - the rotation angle.alpha - the opacity level to apply to the region.default void drawScaledImageNearestNeighbor(MicroUIGraphicsContext gc, MicroUIImage img, int x, int y, float factorX, float factorY, int alpha)
This method uses the nearest neighbor algorithm to render the content. This algorithm is faster than bilinear algorithm but its rendering is faster.
gc - the MicroUI GraphicsContext target.img - the MicroUI Image to draw.x - the x coordinate of the image reference anchor top-left point.y - the y coordinate of the image reference anchor top-left point.factorX - scaling X factor.factorY - scaling Y factor.alpha - the opacity level to apply to the region.default void drawScaledImageBilinear(MicroUIGraphicsContext gc, MicroUIImage img, int x, int y, float factorX, float factorY, int alpha)
This method uses the bilinear algorithm to render the content. This algorithm performs better rendering than nearest neighbor algorithm but it is slower to apply.
gc - the MicroUI GraphicsContext target.img - the MicroUI Image to draw.x - the x coordinate of the image reference anchor top-left point.y - the y coordinate of the image reference anchor top-left point.factorX - scaling X factor.factorY - scaling Y factor.alpha - the opacity level to apply to the region.default void drawString(MicroUIGraphicsContext gc, char[] string, MicroUIFont font, int x, int y)
gc - the targeted MicroUI GraphicsContextstring - a string of charactersfont - the MicroUI Font to usex - the left coordinatey - the top coordinatedefault int stringWidth(char[] string,
MicroUIFont font)
string - a string of charactersfont - the MicroUI Font to usedefault void drawRenderableString(MicroUIGraphicsContext gc, char[] string, MicroUIFont font, int charsWidth, MicroUIRenderableString renderableString, int x, int y)
gc - the targeted MicroUI GraphicsContextstring - a string of charactersfont - the MicroUI Font to usecharsWidth - the string widthrenderableString - the renderable stringx - the left coordinatey - the top coordinatedefault int initializeRenderableStringSNIContext(char[] string,
MicroUIFont font,
MicroUIRenderableString renderableString)
string - a string of charactersfont - the MicroUI Font to userenderableString - the renderable stringdefault void drawChar(MicroUIGraphicsContext gc, char c, MicroUIFont font, int x, int y)
gc - the targeted MicroUI GraphicsContextc - the character to drawfont - the MicroUI Font to usex - the left coordinatey - the top coordinatedefault void drawCharWithRotationBilinear(MicroUIGraphicsContext gc, char c, MicroUIFont font, int destX, int destY, int xRotation, int yRotation, float angle, int alpha)
gc - the targeted MicroUI GraphicsContextc - a characterfont - the MicroUI font to usedestX - the left coordinatedestY - the top coordinatexRotation - the horizontal coordinate of the rotation centeryRotation - the vertical coordinate of the rotation centerangle - the rotation angle, in degreesalpha - the alpha value to usedefault void drawCharWithRotationNearestNeighbor(MicroUIGraphicsContext gc, char c, MicroUIFont font, int destX, int destY, int xRotation, int yRotation, float angle, int alpha)
gc - the targeted MicroUI GraphicsContextc - a characterfont - the MicroUI font to usedestX - the left coordinatedestY - the top coordinatexRotation - the horizontal coordinate of the rotation centeryRotation - the vertical coordinate of the rotation centerangle - the rotation angle, in degreesalpha - the alpha value to usedefault void drawScaledStringBilinear(MicroUIGraphicsContext gc, char[] string, MicroUIFont font, int x, int y, float xRatio, float yRatio)
gc - the targeted MicroUI GraphicsContextstring - a string of charactersfont - the MicroUI Font to usex - the left coordinatey - the top coordinatexRatio - the horizontal scaling ratio (1.0f meaning no scaling)yRatio - the vertical scaling ratio (1.0f meaning no scaling)default void drawScaledRenderableStringBilinear(MicroUIGraphicsContext gc, char[] string, MicroUIFont font, int width, MicroUIRenderableString renderableString, int x, int y, float xRatio, float yRatio)
gc - the targeted MicroUI GraphicsContextstring - a string of charactersfont - the MicroUI Font to usewidth - the string widthrenderableString - the renderable stringx - the left coordinatey - the top coordinatexRatio - the horizontal scaling ratio (1.0f meaning no scaling)yRatio - the vertical scaling ratio (1.0f meaning no scaling)