Picture: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:


:1.) From [[BRConfig.sys]]:
:1.) From [[BRConfig.sys]]:
  SCREEN OPENDFLT srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE/TILE/ISOTROPIC]
  SCREEN OPENDFLT srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE|TILE|ISOTROPIC]
:2.) From a command line or program:
:2.) From a command line or program:
  00100 OPEN #0: "srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE|TILE| ISOTROPIC]",display,outin
  00100 OPEN #0: "srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE|TILE|ISOTROPIC]",display,outin


*NORESIZE keeps the original size of the picture, instead of resizing it to fit the window.   
*NORESIZE keeps the original size of the picture, instead of resizing it to fit the window.   
Line 23: Line 23:
*If neither NORESIZE, nor TILE is specified, then the picture is resized to fit the window.   
*If neither NORESIZE, nor TILE is specified, then the picture is resized to fit the window.   
*ISOTROPIC retains the original aspect ratio during resizing.
*ISOTROPIC retains the original aspect ratio during resizing.
*Keywords such as TILE are case insensitive.


If a control overlaps the background image, then the part of the background picture which is not overlapped is still visible.  The part of the background picture which is overlapped is positioned under the control.
If a control overlaps the background image, then the part of the background picture which is not overlapped is still visible.  The part of the background picture which is overlapped is positioned under the control.
Line 35: Line 36:
Also, pictures can be displayed in window areas by specifying them as FIELDS. The syntax for displaying PICTURES is:
Also, pictures can be displayed in window areas by specifying them as FIELDS. The syntax for displaying PICTURES is:


  PRINT FIELDS "row,col,P rows/cols,[,FKEY]" : "myimage.jpg [:TILENORESIZEISOTROPIC]"
  PRINT FIELDS "row,col,P rows/cols,[,FKEY]" : "myimage.jpg [:TILE|NORESIZE|ISOTROPIC]"


If an FKEY value is provided, the picture generates the specified FKEY value when mouse clicked.
If an FKEY value is provided, the picture generates the specified FKEY value when mouse clicked.
Line 46: Line 47:
[[Image:NEWC0019.jpg]]
[[Image:NEWC0019.jpg]]


The corresponding IO string variable must be of string type and contain the filename of a graphic image. A broad range of graphic image types are supported. If NORESIZE is specified, this denotes that the picture should not be resized to fit the indicated rows and columns. Keywords such as NORESIZE are not case sensitive. TILE indicates that the picture should be tiled within the window area.<br>
The corresponding IO string variable must be of string type and contain the filename of a graphic image. A broad range of graphic image types are supported.  
ISOTROPIC retains the original aspect ratio.


When a picture is specified as an input field, all non-navigation keys are ignored.  For pictures, the BR Help user level is assumed to be zero. This enables tooltips without floating help windows irrespective of the actual help user level.
When a picture is specified as an input field, all non-navigation keys are ignored.  For pictures, the BR Help user level is assumed to be zero. This enables tooltips without floating help windows irrespective of the actual help user level.

Revision as of 11:41, 21 September 2019

For disambiguation purposes, see also the CONFIG PICTURE page.

Commonly refereed to as a picture this is a file that is used to display an image on the BR! GUI Console. Either P or PICTURE may be specified as a FIELDS field type. P and PICTURE are synonymous, picture was simply added for readability.

In Business Rules! there are a few ways to place pictures on the screen.

  1. By use of a Input Fields or RInput Fields statement.
  2. By use of a Print Fields statement.
  3. As the background image of print newpage

Examples:

print #5,fields '1,1,P 2/4,[W]': 'dir\image.gif:isotropic'

Pictures can be displayed as the NEWPAGE background image in the following ways:

1.) From BRConfig.sys:
SCREEN OPENDFLT srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE|TILE|ISOTROPIC]
2.) From a command line or program:
00100 OPEN #0: "srow=3,scol=3,rows=20,cols=50,Picture=mylogo.jpg[:NORESIZE|TILE|ISOTROPIC]",display,outin
  • NORESIZE keeps the original size of the picture, instead of resizing it to fit the window.
  • TILE covers the window with as many copies of the image as will fit.
  • If neither NORESIZE, nor TILE is specified, then the picture is resized to fit the window.
  • ISOTROPIC retains the original aspect ratio during resizing.
  • Keywords such as TILE are case insensitive.

If a control overlaps the background image, then the part of the background picture which is not overlapped is still visible. The part of the background picture which is overlapped is positioned under the control.

00100 OPEN #0: "Picture=logo.jpg:NORESIZE",display,outin
00200 INPUT FIELDS "12,30,C 8": VAR$
00300 PRINT FIELDS "13,30,C 8": VAR$

Output:

Also, pictures can be displayed in window areas by specifying them as FIELDS. The syntax for displaying PICTURES is:

PRINT FIELDS "row,col,P rows/cols,[,FKEY]" : "myimage.jpg [:TILE|NORESIZE|ISOTROPIC]"

If an FKEY value is provided, the picture generates the specified FKEY value when mouse clicked.

The name of this example is: CHESSPRN.BR

00100 PRINT FIELDS "1,10,P 3/7,, 20" : "chess.jpg"  ! FKEY will return 20 if the picture is clicked

Output:

The corresponding IO string variable must be of string type and contain the filename of a graphic image. A broad range of graphic image types are supported.

When a picture is specified as an input field, all non-navigation keys are ignored. For pictures, the BR Help user level is assumed to be zero. This enables tooltips without floating help windows irrespective of the actual help user level.

At a minimum, the following graphical image types are supported: