Interface FrameTexture

Object used to manipulate frame textures.

interface FrameTexture {
    CORNER_BOTTOM_LEFT: number;
    CORNER_BOTTOM_RIGHT: number;
    CORNER_TOP_LEFT: number;
    CORNER_TOP_RIGHT: number;
    SIDE_BOTTOM: number;
    SIDE_LEFT: number;
    SIDE_RIGHT: number;
    SIDE_TOP: number;
    draw(canvas: Canvas, rect: RectF, scale: number, color: number, sides: [boolean, boolean, boolean, boolean]): void;
    expand(width: number, height: number, color: number, sides: [boolean, boolean, boolean, boolean]): Bitmap;
    expand(width: number, height: number, color: number): Bitmap;
    expandAndScale(width: number, height: number, scale: number, color: number, sides: [boolean, boolean, boolean, boolean]): Bitmap;
    expandAndScale(width: number, height: number, scale: number, color: number): Bitmap;
    expandSide(sideId: number, pixels: number): Bitmap;
    getCentralColor(): number;
    getSideSource(side: number): Bitmap;
    getSource(): Bitmap;
}

Methods

  • Parameters

    • canvas: Canvas
    • rect: RectF
    • scale: number
    • color: number
    • sides: [boolean, boolean, boolean, boolean]

    Returns void

  • Expands texture to the specified side, filling the middle with specified color.

    Parameters

    • width: number
    • height: number
    • color: number

      integer color value produced by android.graphics.Color class

    • sides: [boolean, boolean, boolean, boolean]

      array of booleans marking whether the side should be expanded or not. The order of the sides is FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN

    Returns Bitmap

    Expanded android.graphics.Bitmap instance with the frame.

  • Expands texture to the specified side, filling the middle with specified color.

    Parameters

    Returns Bitmap

  • Expands texture to the specified side, filling the middle with specified color.

    Parameters

    • width: number
    • height: number
    • scale: number

      scale of the created bitmap

    • color: number

      integer color value produced by android.graphics.Color class

    • sides: [boolean, boolean, boolean, boolean]

      array of booleans marking whether the side should be expanded or not. See UI.FrameTexture.expand parameters for details. Default behavior is to scale all sides

    Returns Bitmap

    Expanded and scaled android.graphics.Bitmap instance.

  • Expands texture to the specified side, filling the middle with specified color.

    Parameters

    • width: number
    • height: number
    • scale: number

      scale of the created bitmap

    • color: number

      integer color value produced by android.graphics.Color class

    Returns Bitmap

  • Expands side of the texture by specified amount of pixels.

    Parameters

    • sideId: number

      side of the texture, one of the FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN constants

    • pixels: number

    Returns Bitmap

    Expanded android.graphics.Bitmap instance with the frame.

  • Returns number

    Object packed integer color value of the central pixel of the source texture.

  • Parameters

    • side: number

      side of the texture, one of the FrameTexture.SIDE_LEFT, FrameTexture.SIDE_RIGHT, FrameTexture.SIDE_UP, FrameTexture.SIDE_DOWN constants

    Returns Bitmap

    Texture side source extracted from the original frame texture source stored in android.graphics.Bitmap instance.

Properties

CORNER_BOTTOM_LEFT: number

Specifies bottom left corner of the frame.

CORNER_BOTTOM_RIGHT: number

Specifies bottom right corner of the frame.

CORNER_TOP_LEFT: number

Specifies top left corner of the frame.

CORNER_TOP_RIGHT: number

Specifies top right corner of the frame.

SIDE_BOTTOM: number

Specifies bottom side of the frame.

SIDE_LEFT: number

Specifies left side of the frame.

SIDE_RIGHT: number

Specifies right side of the frame.

SIDE_TOP: number

Specifies top side of the frame.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.