Bug report: Dynamic Texture bug
Posted: Sun Jan 13, 2019 12:30 am
osSetPenColor as documented allows us to set pen color by a hexadecimal value that includes a two character value for the transparency preceding the six digit hex color value. So 00 = transparent and FF = opaque, such that 00000000 is transparent black and FF000000 is opaque black. However this not the result inworld. The following script code:
string CommandList = ""; // Storage for our drawing commands
CommandList = osSetPenSize( CommandList, 1 ); // Set the pen width to 3 pixels
CommandList = osSetPenColor( CommandList, "00000000" ); // Set the pen color to transparent black
CommandList = osMovePen( CommandList, 0, 0 ); // Upper left corner at <28,78>
CommandList = osDrawFilledRectangle( CommandList, 256, 256 ); // 256x256 pixels
CommandList = osMovePen( CommandList,10,15);
CommandList = osSetPenColor(CommandList, "Red");
CommandList = osSetFontName(CommandList, "Impact");
CommandList = osSetFontSize(CommandList,80);
CommandList = osDrawText(CommandList,SLTclock);
CommandList = osMovePen(CommandList,15,140);
CommandList = osSetFontSize(CommandList,45);
CommandList = osDrawText(CommandList,"GRIDTIME");
// Now draw the rectangle
osSetDynamicTextureDataBlendFace("", "vector", CommandList, "width:256,height:256",FALSE, 2, 0, 255, 0);
Results in an opaque background to the dynamic texture as seen here on the left compared to the one on the right that has a black background that is opaque.
string CommandList = ""; // Storage for our drawing commands
CommandList = osSetPenSize( CommandList, 1 ); // Set the pen width to 3 pixels
CommandList = osSetPenColor( CommandList, "00000000" ); // Set the pen color to transparent black
CommandList = osMovePen( CommandList, 0, 0 ); // Upper left corner at <28,78>
CommandList = osDrawFilledRectangle( CommandList, 256, 256 ); // 256x256 pixels
CommandList = osMovePen( CommandList,10,15);
CommandList = osSetPenColor(CommandList, "Red");
CommandList = osSetFontName(CommandList, "Impact");
CommandList = osSetFontSize(CommandList,80);
CommandList = osDrawText(CommandList,SLTclock);
CommandList = osMovePen(CommandList,15,140);
CommandList = osSetFontSize(CommandList,45);
CommandList = osDrawText(CommandList,"GRIDTIME");
// Now draw the rectangle
osSetDynamicTextureDataBlendFace("", "vector", CommandList, "width:256,height:256",FALSE, 2, 0, 255, 0);
Results in an opaque background to the dynamic texture as seen here on the left compared to the one on the right that has a black background that is opaque.