WBITMAP-TEXT-BOX
The WBITMAP-TEXT-BOX function generates round or square shapes with text inside.
In thin client environment the bitmap is generated on the server and it is sent to the client later, when the program uses it.
Note - the feature is certified for Java 1.8.0_251 or higher. Previous Java versions may generate a bitmap smaller than the requested width.
Syntax:
 CALL "W$BITMAP" USING WBITMAP-TEXT-BOX
                       text
                       WBITMAP-TB-DATA
                GIVING bitmapHandle
Parameters:
WBITMAP-TEXT-BOX
Constant
 
text
PIC X(n)
Specifies the text to be shown in the shape. Leading and trailing spaces, if any, are not considered.
WBITMAP-TB-DATA
Group Item
Structure that hosts the information. This group item, defined in isgui.def, has the following structure:
 
01 wbitmap-tb-data.
   03 wbitmap-tb-shape pic 9.
      88 wbitmap-tb-circle value 0.
      88 wbitmap-tb-square value 1.
   03 wbitmap-tb-font handle of font.
   03 wbitmap-tb-width pic s9(9comp-4.
   03 wbitmap-tb-text-color pic s9(18comp-4.
   03 wbitmap-tb-bg-color pic s9(18comp-4.
   03 wbitmap-tb-grd-or pic s9 comp-4 value -1.
   03 wbitmap-tb-bg-color-2 pic s9(18comp-4
 
wbitmap-tb-shape
Specifies the shape of the area that surrounds the text. It can be either a circle (0) or a square (1).
 
wbitmap-tb-font
A font handle as returned by the W$FONT routine or one of the internal fonts available in the runtime (e.g. SMALL-FONT).
 
wbitmap-tb-width
Specifies the width and the height of the shape, expressed in pixels.
 
wbitmap-text-color
Specifies the color of the characters. A negative value is treated as RGB color while a positive value is treated as COBOL color. See Color management for more information. If not set, then the black color is used.
 
wbitmap-bg-color
Specifies the first gradient color. Considered when wbitmap-grd-or is greater than -1. A negative value is treated as RGB color while a positive value is treated as COBOL color. See Color management for more information. If not set, then the black color is used.
 
wbitmap-grd-or
Specifies the gradient orientation. Valid values are:
-1 - No gradient (default)
0 - North to South
1 - Northeast to Southwest
2 - East to West
3 - Southeast to Northwest
4 - South to North
5 -Southwest to Northeast
6 - West to East
7 - Northwest to Southeast
 
wbitmap-tb-bg2-color
Specifies the second gradient color. Considered when wbitmap-grd-or is greater than -1. A negative value is treated as RGB color while a positive value is treated as COBOL color. See Color management for more information. If not set, then the black color is used.
Return code:
bitmapHandle must be declared as PIC S9(9) COMP-4 and provides additional information:
> 0
Receives the handle to the bitmap
0
An error occurred, probably the font handle is invalid or an empty string of characters was passed