类 NativePainter

java.lang.Object
polaris.sdk.ui.render.NativePainter
所有已实现的接口:
AutoCloseable, Painter

public final class NativePainter extends Object implements Painter, AutoCloseable
Collects clipped drawing commands and submits them with one JNI call per UI frame.
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final int
     
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    Freeze the already drawn UI into a new backdrop for overlays.
    void
    begin(float width, float height)
     
    void
    begin(float width, float height, int pixelWidth, int pixelHeight)
    Supply physical dimensions before text layout to avoid a first-frame DPI mismatch.
    void
     
    void
     
    void
    colorPlane(float x, float y, float w, float h, float hue)
     
    void
    colorPlaneAlpha(float x, float y, float w, float h, float hue, float alpha)
     
    int
     
    void
    Called by Ui.render before any widget drawing; custom backends may override.
    void
    Scoped profile for the current widget.
    void
    fill(float x, float y, float w, float h, float radius, int color)
     
    void
    flush(int framebuffer, int colorAttachment, int pw, int ph, float sigma, float mx, float my)
     
    void
    flushWindow(int width, int height, float sigma, float mx, float my)
     
     
    void
    glass(float x, float y, float w, float h, float radius, Theme t, float mix)
     
    int
     
    void
    line(float x, float y, float x2, float y2, float thickness, int color)
     
    void
    Pop only the last shaped content clip; does not change the rectangular scissor.
    void
    pushShapeClip(Rect bounds, float radius, CornerRadii profile)
    Push an intersecting rounded content clip.
    void
    ring(float x, float y, float size, float thickness, float progress, float start, int color)
     
    int
     
    void
    stroke(float x, float y, float w, float h, float radius, float thickness, int color)
     
    void
    text(String text, float x, float y, float size, int color)
     
    void
    textScaled(String text, float x, float y, float size, int color, float scale)
    Affine text scaling without regenerating rasterized glyphs on every animated frame.
    void
    textWeight(String text, float x, float y, float size, int color, int weight)
     
    void
    textWeightScaled(String text, float x, float y, float size, int color, int weight, float scale)
     
    float
    textWidth(String text, float size)
     
    float
    textWidth(String text, float size, int weight)
     
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • begin

      public void begin(float width, float height, int pixelWidth, int pixelHeight)
      Supply physical dimensions before text layout to avoid a first-frame DPI mismatch.
    • configure

      public void configure(Theme theme)
      从接口复制的说明: Painter
      Called by Ui.render before any widget drawing; custom backends may override.
      指定者:
      configure 在接口中 Painter
    • corners

      public void corners(CornerRadii profile)
      从接口复制的说明: Painter
      Scoped profile for the current widget. Null restores its normal radius argument.
      指定者:
      corners 在接口中 Painter
    • begin

      public void begin(float width, float height)
    • flush

      public void flush(int framebuffer, int colorAttachment, int pw, int ph, float sigma, float mx, float my)
    • flushWindow

      public void flushWindow(int width, int height, float sigma, float mx, float my)
    • commandCount

      public int commandCount()
    • glyphCount

      public int glyphCount()
    • sdfGlyphCount

      public int sdfGlyphCount()
    • fontFamily

      public String fontFamily()
    • clip

      public void clip(Rect r)
      指定者:
      clip 在接口中 Painter
    • pushShapeClip

      public void pushShapeClip(Rect bounds, float radius, CornerRadii profile)
      从接口复制的说明: Painter
      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.
      指定者:
      pushShapeClip 在接口中 Painter
    • popShapeClip

      public void popShapeClip()
      从接口复制的说明: Painter
      Pop only the last shaped content clip; does not change the rectangular scissor.
      指定者:
      popShapeClip 在接口中 Painter
    • glass

      public void glass(float x, float y, float w, float h, float radius, Theme t, float mix)
      指定者:
      glass 在接口中 Painter
    • fill

      public void fill(float x, float y, float w, float h, float radius, int color)
      指定者:
      fill 在接口中 Painter
    • stroke

      public void stroke(float x, float y, float w, float h, float radius, float thickness, int color)
      指定者:
      stroke 在接口中 Painter
    • line

      public void line(float x, float y, float x2, float y2, float thickness, int color)
      指定者:
      line 在接口中 Painter
    • ring

      public void ring(float x, float y, float size, float thickness, float progress, float start, int color)
      指定者:
      ring 在接口中 Painter
    • colorPlane

      public void colorPlane(float x, float y, float w, float h, float hue)
      指定者:
      colorPlane 在接口中 Painter
    • colorPlaneAlpha

      public void colorPlaneAlpha(float x, float y, float w, float h, float hue, float alpha)
      指定者:
      colorPlaneAlpha 在接口中 Painter
    • text

      public void text(String text, float x, float y, float size, int color)
      指定者:
      text 在接口中 Painter
    • textScaled

      public void textScaled(String text, float x, float y, float size, int color, float scale)
      从接口复制的说明: Painter
      Affine text scaling without regenerating rasterized glyphs on every animated frame.
      指定者:
      textScaled 在接口中 Painter
    • textWeight

      public void textWeight(String text, float x, float y, float size, int color, int weight)
      指定者:
      textWeight 在接口中 Painter
    • textWeightScaled

      public void textWeightScaled(String text, float x, float y, float size, int color, int weight, float scale)
      指定者:
      textWeightScaled 在接口中 Painter
    • textWidth

      public float textWidth(String text, float size)
      指定者:
      textWidth 在接口中 Painter
    • textWidth

      public float textWidth(String text, float size, int weight)
      指定者:
      textWidth 在接口中 Painter
    • backdrop

      public void backdrop()
      从接口复制的说明: Painter
      Freeze the already drawn UI into a new backdrop for overlays.
      指定者:
      backdrop 在接口中 Painter
    • close

      public void close()
      指定者:
      close 在接口中 AutoCloseable