Home » Community » Newbie corner » Adding a text box in a scatterDraw/ScatterCtrl  
	
		
		
			| Re: Adding a text box in a scatterDraw/ScatterCtrl [message #47622 is a reply to message #47621] | 
			Fri, 10 February 2017 23:15    | 
		 
		
			
				
				
				  | 
					
						  
						koldo
						 Messages: 3453 Registered: August 2008 
						
					 | 
					Senior Veteran  | 
					 | 
		 
		 
	 | 
 
	
		Hi Giorgio 
 
Sources are updated. ScatterCtrl demo includes tab17_UserPaint including it. 
Provisional interface uses: 
- GetPlotWidth(), GetPlotHeight() to get plot area size in pixels
- Pointf GetPosPrimary(double x, double y) 
  double GetSizeX(double cx) 		
  double GetSizeYPrimary(double cy) 	
  Pointf GetPosSecondary(double x, double y)
  double GetSizeYSecondary(double cy)
to get positions and sizes from plot units to pixel units.  
 
As I do not know how to use templates in callbacks, it is used instead this: 
	void OnPainter(Painter &w)		{OnPaint(w);}
	void OnDraw(Draw &w)			{OnPaint(w);}
	
	template <class T>
	void OnPaint(T& w) {
	...
 	} 
Advice is acknowledged.
		
		
  Best regards 
IƱaki
		[Updated on: Fri, 10 February 2017 23:15] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
	
	  | 
	 | 
	
		Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Tue, 07 February 2017 09:46  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Wed, 08 February 2017 08:35  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Wed, 08 February 2017 09:20  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Wed, 08 February 2017 11:34  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Wed, 08 February 2017 12:02  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Fri, 10 February 2017 14:12  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Fri, 10 February 2017 15:38  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Fri, 10 February 2017 23:15  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Wed, 17 May 2017 12:11  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Wed, 17 May 2017 17:04  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Wed, 17 May 2017 17:43  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Fri, 19 May 2017 13:11  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Thu, 25 May 2017 20:07  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Fri, 26 May 2017 14:45  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Mon, 29 May 2017 12:45  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  Giorgio on Mon, 12 June 2017 11:52  
	 | 
 
	  | 
	 | 
	
		Re: Adding a text box in a scatterDraw/ScatterCtrl
		By:  koldo on Tue, 13 June 2017 09:51  
	 | 
  
Goto Forum:
 
 Current Time: Tue Nov 04 12:56:08 CET 2025 
 Total time taken to generate the page: 0.05328 seconds 
 |