Here’s my latest try with some help from the WSJT-X team, but instead of creating foreground and background colors it simply erases the intended text, leaving a blank white on white space.
I’m trying to get more info from them but I seem to be a complete idiot in dealing with the source forge mailing list, so I don’t know if my query is getting posted or not.
Public Sub ChangeColors(callSign As String)
Dim mb As New MemoryBlock (0)
Dim outputStream As New BinaryStream (mb)
Dim utf8 As String
// background color
Dim c As Color = &cff0000 ’ Defaults to Alpha value 0
outputStream.WriteUInt8 (1) ’ RGB spec
outputStream.WriteUInt16 (c.Alpha)
outputStream.WriteUInt16 (c.Red)
outputStream.WriteUint16 (c.Green)
outputStream.WriteUInt16 (c.Blue)
outputStream.WriteUInt16 (0) ’ padding
// foreground color
c = &c0000ff ’ Defaults to Alpha value 0
outputStream.WriteUInt8 (1) ’ RGB spec
outputStream.WriteUInt16 (c.Alpha)
outputStream.WriteUInt16 (c.Red)
outputStream.WriteUint16 (c.Green)
outputStream.WriteUInt16 (c.Blue)
outputStream.WriteUInt16 (0) ’ padding
// Highlight last
outputStream.WriteBoolean (False)
Ed, Qt serialize colors as I posted in my previous message.
Alpha, Red, Green and Blue are 16 bits values not 8 bit values emitted as a 16 bits values.
For example a full red color has the red part emitted as &hffff not &h00ff.