{"version":3,"file":"BatchPart.js","sources":["../../src/utils/BatchPart.ts"],"sourcesContent":["import type { FillStyle } from '../styles/FillStyle';\nimport type { LineStyle } from '../styles/LineStyle';\n\n/**\n * A structure to hold interim batch objects for Graphics.\n * @memberof PIXI.graphicsUtils\n */\nexport class BatchPart\n{\n    public style: LineStyle | FillStyle;\n    public start: number;\n    public size: number;\n    public attribStart: number;\n    public attribSize: number;\n\n    constructor()\n    {\n        this.reset();\n    }\n\n    /**\n     * Begin batch part.\n     * @param style\n     * @param startIndex\n     * @param attribStart\n     */\n    public begin(style: LineStyle | FillStyle, startIndex: number, attribStart: number): void\n    {\n        this.reset();\n        this.style = style;\n        this.start = startIndex;\n        this.attribStart = attribStart;\n    }\n\n    /**\n     * End batch part.\n     * @param endIndex\n     * @param endAttrib\n     */\n    public end(endIndex: number, endAttrib: number): void\n    {\n        this.attribSize = endAttrib - this.attribStart;\n        this.size = endIndex - this.start;\n    }\n\n    public reset(): void\n    {\n        this.style = null;\n        this.size = 0;\n        this.start = 0;\n        this.attribStart = 0;\n        this.attribSize = 0;\n    }\n}\n"],"names":[],"mappings":";AAOO,MAAM,UACb;AAAA,EAOI,cACA;AACI,SAAK,MAAM;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQO,MAAM,OAA8B,YAAoB,aAC/D;AACS,SAAA,MAAA,GACL,KAAK,QAAQ,OACb,KAAK,QAAQ,YACb,KAAK,cAAc;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOO,IAAI,UAAkB,WAC7B;AACI,SAAK,aAAa,YAAY,KAAK,aACnC,KAAK,OAAO,WAAW,KAAK;AAAA,EAChC;AAAA,EAEO,QACP;AACI,SAAK,QAAQ,MACb,KAAK,OAAO,GACZ,KAAK,QAAQ,GACb,KAAK,cAAc,GACnB,KAAK,aAAa;AAAA,EACtB;AACJ;;"}