接口 Painter
- 所有已知实现类:
NativePainter, TransformPainter
public interface Painter
Draw-list target. Host renderers may implement this interface instead of the bundled JNI backend.
-
方法概要
修饰符和类型方法说明voidbackdrop()Freeze the already drawn UI into a new backdrop for overlays.voidvoidcolorPlane(float x, float y, float w, float h, float hue) default voidcolorPlaneAlpha(float x, float y, float w, float h, float hue, float alpha) default voidCalled by Ui.render before any widget drawing; custom backends may override.default voidcorners(CornerRadii profile) Scoped profile for the current widget.voidfill(float x, float y, float w, float h, float radius, int color) voidvoidline(float x, float y, float x2, float y2, float thickness, int color) default voidPop only the last shaped content clip; does not change the rectangular scissor.default voidpushShapeClip(Rect bounds, float radius, CornerRadii profile) Push an intersecting rounded content clip.voidring(float x, float y, float size, float thickness, float progress, float start, int color) voidstroke(float x, float y, float w, float h, float radius, float thickness, int color) voiddefault voidtextScaled(String text, float x, float y, float size, int color, float scale) Affine text scaling without regenerating rasterized glyphs on every animated frame.default voidtextWeight(String text, float x, float y, float size, int color, int weight) default voidtextWeightScaled(String text, float x, float y, float size, int color, int weight, float scale) floatdefault float
-
方法详细资料
-
configure
-
corners
Scoped profile for the current widget. Null restores its normal radius argument. -
clip
-
pushShapeClip
Push an intersecting rounded content clip. Coordinates are logical/absolute. A null profile follows the active theme, with the supplied radius. Max native depth: 32. Custom painters that do not override these methods retain the existing rectangular clips. -
popShapeClip
Pop only the last shaped content clip; does not change the rectangular scissor. -
glass
-
fill
-
stroke
-
line
-
ring
-
colorPlane
-
colorPlaneAlpha
-
text
-
textWidth
-
textScaled
Affine text scaling without regenerating rasterized glyphs on every animated frame. -
textWeight
-
textWeightScaled
default void textWeightScaled(String text, float x, float y, float size, int color, int weight, float scale) -
textWidth
-
backdrop
void backdrop()Freeze the already drawn UI into a new backdrop for overlays.
-