| 4D v13WR Area to picture | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|  | 
    4D Write v13
 WR Area to picture 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WR Area to picture ( area ; savedDoc ; preview ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| area | Longint |   | 4D Write area | |||||
| savedDoc | Integer |   | 1 = if document is not saved, no dialog 0 = if document is not saved, the dialog is displayed | |||||
| preview | Integer |   | 1 = the picture is created 0 = the picture is not created | |||||
| Function result | Picture |   | Picture of the contents of area | |||||
The WR Area to picture command allows you to place the contents of the area referenced by area in a picture field or variable. Passing a 4D Write area to the WR Area to picture command returns a picture that can later be assigned to a picture field or a picture variable.
Note: If no picture preview is created, the picture cannot be displayed.
If optional parameters are omitted, the default settings for area will be applied.
You want to save Area as well as its preview picture in the Picture field “WritePictSave”:
 [Texts]WritePictSave:=WR Area to picture(Area;1;1)You want to save the current text selection in a record of the [Templates] table:
 WR EXECUTE COMMAND(Area;wr cmd copy) `Copying the selection
 CREATE RECORD([Templates]) `Creating a record in [Templates]
 Tempo:=WR New offscreen area `Creating an offscreen area
 WR EXECUTE COMMAND(Tempo;wr cmd paste) `Pasting selection in the area
  `Saving the result in the [Templates]Text_ field
 [Templates]Text_:=WR Area to picture(Tempo)
 WR DELETE OFFSCREEN AREA(Tempo) `Deleting the temporary area
 SAVE RECORD([Templates]) `Saving the record in [Templates]
	Product:  4D
	Theme:  WR Areas
	Number:  
        89443
        
        
        
	
	Created:  4D Write 6.5
WR Area to blob
WR PICTURE TO AREA