diff --git a/src/common/ClientConnection.ts b/src/common/ClientConnection.ts index 3d05b64..94113e0 100644 --- a/src/common/ClientConnection.ts +++ b/src/common/ClientConnection.ts @@ -1437,6 +1437,38 @@ export default class ClientConnection { ); } + public async SetBlendingHorDensity( + row: number, + column: number, + control_point: number, + value: number + ) { + return await this.doRpc( + new Protocol.SetBlendingHoDensityRequestEntity( + row, + column, + control_point, + value + ) + ); + } + + public async SetBlendingVerDensity( + row: number, + column: number, + control_point: number, + value: number + ) { + return await this.doRpc( + new Protocol.SetBlendingVerDensityRequestEntity( + row, + column, + control_point, + value + ) + ); + } + public destory() { this.ws?.close(); if (this.ws) { diff --git a/src/entities/WSProtocol.ts b/src/entities/WSProtocol.ts index a6e3fd4..31d02e8 100644 --- a/src/entities/WSProtocol.ts +++ b/src/entities/WSProtocol.ts @@ -514,6 +514,12 @@ export namespace Protocol { public static get kSaveBlendingConfig() { return Commands.PROTOCOL_PREFIX + "SaveBlendingConfig"; } + public static get kSetBlendingHorDensity() { + return Commands.PROTOCOL_PREFIX + "SetBlendingHorDensity"; + } + public static get kSetBlendingVerDensity() { + return Commands.PROTOCOL_PREFIX + "SetBlendingVerDensity"; + } static _all_commands = new Set([ Commands.kUnKnowCommand, @@ -642,7 +648,9 @@ export namespace Protocol { Commands.kEnableBlending, Commands.kSetBlendingOverlap, Commands.kGetBlendingConfig, - Commands.kSaveBlendingConfig, + Commands.kSaveBlendingConfig, + Commands.SetBlendingHorDensity, + Commands.SetBlendingVerDensity, ]); public static get AllCommands() { return this._all_commands; @@ -3391,4 +3399,52 @@ export namespace Protocol { } name = ""; } + + export class SetBlendingHorDensityRequestEntity extends PacketEntity { + constructor( + row: number, + column: number, + control_point: number, + value: number, + rpc_id = 0 + ) { + super(); + super.command = Commands.kSetBlendingHorDensity; + super.flag = PacketEntity.FLAG_REQUEST; + super.rpc_id = rpc_id; + + this.row = row ?? 0; + this.column = column ?? 0; + this.control_point = control_point ?? 0; + this.value = value ?? 0; + } + row = 0; + column = 0; + control_point = 0; //控制点编号,1开始,从上到下从左到右 + value = 0; + } + + export class SetBlendingVerDensityRequestEntity extends PacketEntity { + constructor( + row: number, + column: number, + control_point: number, + value: number, + rpc_id = 0 + ) { + super(); + super.command = Commands.kSetBlendingVerDensity; + super.flag = PacketEntity.FLAG_REQUEST; + super.rpc_id = rpc_id; + + this.row = row ?? 0; + this.column = column ?? 0; + this.control_point = control_point ?? 0; + this.value = value ?? 0; + } + row = 0; + column = 0; + control_point = 0; //控制点编号,1开始,从上到下从左到右 + value = 0; + } }