setChartPos
Top  Previous  Next

setChartPos ( integer Image, integer X0, integer Y0 [, integer Sx, integer Sy ] )

Use this function to change the size and position of a chart on screen.

Parameters
 
Chart  
 
An integer between 1 and 100 specifying the ID of the chart.  
 
X0, Y0  
 
Positive integers specifying the screen coordinates of the top left corner of the chart window.  
 
Sx, Sy  
 
Optional positive integers specifying the new width and height of the chart window. If these parameters are omitted, the frame will maintain its current size.  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

This set of statements measures objects on a sample image and displays a histogram of the area in a resized window:  
 
SelectParam("Area","Perim","DCircle","DMin","DMax")  
grabim(1)  
threshunimod(1,1,0,1)  
scrap(1,1,50,400,1)  
measobjects(1,1,"")  
setChartAttr(GR_BAR,8,5)  
createChart(1,"","Area",0)  
setChartPos(1,200,100,500,600)