Hi everyone
I have a texture which I use it in Graphics.lineTextureStyle :
the whole code goes like this :
const app = new PIXI.Application({
antialias: true , width:1000 , height:1000 , backgroundColor: 0xFFFFFF
});
document.body.appendChild(app.view);
const texture = PIXI.Texture.from('./a.png'); // the size of image file : 900*900
const g = new PIXI.Graphics();
g.lineTextureStyle({width:40 , texture:texture , alignment:0});
g.beginFill(0);
g.drawRect(0,0 , 900,900); // the size of rectangle : 900*900
g.endFill();
app.stage.addChild(g);
the result :
now I want to change the size of rectangle to 400*400 but texture stays the same size so most of texture gets clipped like so :
how to change the size of texture to match it with the size of rectangle ?