interface AcGiRenderer<T extends AcGiEntity = AcGiEntity> {
    get context(): AcGiContext;
    get subEntityTraits(): AcGiSubEntityTraits;
    area(area: AcGeArea2d): T;
    circularArc(arc: AcGeCircArc3d): T;
    ellipticalArc(ellipseArc: AcGeEllipseArc3d): T;
    group(entities: T[]): T;
    image(blob: Blob, style: AcGiImageStyle): T;
    lines(points: AcGeVector3dLike[]): T;
    lineSegments(
        array: Float32Array,
        itemSize: number,
        indices: Uint16Array,
    ): T;
    mtext(mtext: AcGiMTextData, style: AcGiTextStyle, delay?: boolean): T;
    point(point: AcGePoint3d, style: AcGiPointStyle): T;
    setFontMapping(mapping: AcGiFontMapping): void;
    shape(shape: AcGiShapeData, style?: AcGiTextStyle, delay?: boolean): T;
}

Type Parameters

Accessors

  • get context(): AcGiContext
  • Draw-time context for resolving semantic trait colors (for example ACI 7 foreground) into pixel RGB values.

    Returns AcGiContext

  • get subEntityTraits(): AcGiSubEntityTraits
  • The entity traits object gives the user control of, and access to, the attribute (color, layer, linetype, etc.) settings of the current geometry.

    Returns AcGiSubEntityTraits

Methods

  • Draw one area

    Parameters

    Returns T

    Return an object which can be added to scene

  • Draw a circular arc or full circle.

    Parameters

    Returns T

    Return an object which can be added to scene

  • Draw an elliptical arc or full ellipse.

    Parameters

    Returns T

    Return an object which can be added to scene

  • Create one group

    Parameters

    • entities: T[]

      Input entities to group together

    Returns T

    Return created group

  • Draw image

    Parameters

    • blob: Blob

      Input Blob instance of one image file

    • style: AcGiImageStyle

      Input image style

    Returns T

    Return an object which can be added to scene

  • Draw lines using gl.LINE_STRIP.

    Parameters

    Returns T

    Return an object which can be added to scene

  • Draw lines using gl.LINES.

    Parameters

    • array: Float32Array

      Must be a TypedArray. Used to instantiate the buffer. This array should have itemSize * numVertices elements, where numVertices is the number of vertices.

    • itemSize: number

      The number of values of the array that should be associated with a particular vertex. If the vertex is one 2d point, then itemSize should be 2. If the vertex is one 3d point, then itemSize should be 3.

    • indices: Uint16Array

      Index buffer.

    Returns T

    Return an object which can be added to scene

  • Draw multiple line texts

    Parameters

    • mtext: AcGiMTextData

      Input multiple line text data to draw

    • style: AcGiTextStyle

      Input text style applied to the text string

    • Optionaldelay: boolean

      The flag to delay creating one rendered entity and just create one dummy entity. Renderer can delay heavy calculation operation to avoid blocking UI when this flag is true.

    Returns T

    Return an object which can be added to scene

  • Draw a point.

    Parameters

    Returns T

    Return an object which can be added to scene

  • Set font mapping

    Parameters

    Returns void

  • Draw one SHX shape glyph.

    Parameters

    • shape: AcGiShapeData

      Shape placement and glyph identity

    • Optionalstyle: AcGiTextStyle

      Optional text style that references the SHX shape font. When omitted, null, or undefined, the renderer resolves the glyph by collecting every shape definition file from the text style table and searching them for the shape specified in shape.

    • Optionaldelay: boolean

      When true, the renderer may defer heavy work and return a placeholder

    Returns T

    Rendered entity for the scene graph