Search in sources :

Example 1 with NinePatchDrawable

use of com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable in project talos by rockbite.

the class NinePatchModule method defineSlots.

@Override
protected void defineSlots() {
    inputDrawable = (DrawableValue) createInputSlot(INPUT, new DrawableValue());
    NinePatchDrawable patchDrawable = new NinePatchDrawable();
    outputValue = (DrawableValue) createOutputSlot(OUTPUT, new DrawableValue());
    outputValue.setDrawable(patchDrawable);
}
Also used : DrawableValue(com.talosvfx.talos.runtime.values.DrawableValue) NinePatchDrawable(com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable)

Example 2 with NinePatchDrawable

use of com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable in project talos by rockbite.

the class NinePatchModule method processValues.

@Override
public void processValues() {
    NinePatchDrawable patchDrawable = (NinePatchDrawable) outputValue.getDrawable();
    TextureRegion region = null;
    if (!inputDrawable.isEmpty() && inputDrawable.getDrawable() != null) {
        region = inputDrawable.getDrawable().getTextureRegion();
    }
    patchDrawable.setRegion(region, getSplits());
}
Also used : TextureRegion(com.badlogic.gdx.graphics.g2d.TextureRegion) NinePatchDrawable(com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable)

Example 3 with NinePatchDrawable

use of com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable in project talos by rockbite.

the class NinePatchModule method resetPatch.

public void resetPatch() {
    NinePatchDrawable patchDrawable = (NinePatchDrawable) outputValue.getDrawable();
    patchDrawable.resetPatch(splits);
}
Also used : NinePatchDrawable(com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable)

Aggregations

NinePatchDrawable (com.talosvfx.talos.runtime.render.drawables.NinePatchDrawable)3 TextureRegion (com.badlogic.gdx.graphics.g2d.TextureRegion)1 DrawableValue (com.talosvfx.talos.runtime.values.DrawableValue)1