pixi.js
    Preparing search index...

    Class FillPattern

    A class that represents a fill pattern for use in Text and Graphics fills. It allows for textures to be used as patterns, with optional repetition modes.

    const txt = await Assets.load('https://pixijs.com/assets/bg_scene_rotate.jpg');
    const pat = new FillPattern(txt, 'repeat');

    const textPattern = new Text({
    text: 'PixiJS',
    style: {
    fontSize: 36,
    fill: 0xffffff,
    stroke: { fill: pat, width: 10 },
    },
    });

    textPattern.y = (textGradient.height);

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    texture: Texture

    Internal texture used to render the gradient

    transform: Matrix = ...

    The transform matrix applied to the pattern

    Accessors

    • get styleKey(): string

      Gets a unique key representing the current state of the pattern. Used internally for caching.

      Returns string

      Unique string key

    Methods

    • Sets the transform for the pattern

      Parameters

      • Optionaltransform: Matrix

        The transform matrix to apply to the pattern. If not provided, the pattern will use the default transform.

      Returns void