(buffer: ByteBuffer, beginPos: number)
| 284 | } |
| 285 | |
| 286 | public setup_beforeAdd(buffer: ByteBuffer, beginPos: number): void { |
| 287 | super.setup_beforeAdd(buffer, beginPos); |
| 288 | |
| 289 | buffer.seek(beginPos, 5); |
| 290 | |
| 291 | this._type = buffer.readByte(); |
| 292 | if (this._type !== EGraphType.Empty) { |
| 293 | this._lineSize = buffer.getInt32(); |
| 294 | this._lineColor = buffer.readColorS(true); |
| 295 | this._fillColor = buffer.readColorS(true); |
| 296 | if (buffer.readBool()) { |
| 297 | this._cornerRadius = []; |
| 298 | for (let i = 0; i < 4; i++) { |
| 299 | this._cornerRadius[i] = buffer.getFloat32(); |
| 300 | } |
| 301 | } |
| 302 | |
| 303 | if (this._type === EGraphType.Polygon) { |
| 304 | const cnt = buffer.getInt16(); |
| 305 | this._polygonPoints = []; |
| 306 | for (let i = 0; i < cnt; i++) { |
| 307 | this._polygonPoints[i] = buffer.getFloat32(); |
| 308 | } |
| 309 | } else if (this._type === EGraphType.RegularPolygon) { |
| 310 | this._sides = buffer.getInt16(); |
| 311 | this._startAngle = buffer.getFloat32(); |
| 312 | const cnt = buffer.getInt16(); |
| 313 | if (cnt > 0) { |
| 314 | this._distances = []; |
| 315 | for (let i = 0; i < cnt; i++) { |
| 316 | this._distances[i] = buffer.getFloat32(); |
| 317 | } |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | public setup_afterAdd(buffer: ByteBuffer, beginPos: number): void { |
| 324 | super.setup_afterAdd(buffer, beginPos); |
nothing calls this directly
no test coverage detected