Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Event on DrawDrawing
Re: Event on DrawDrawing [message #27493 is a reply to message #27492] Wed, 21 July 2010 09:07 Go to previous messageGo to previous message
ratah is currently offline  ratah
Messages: 107
Registered: July 2010
Experienced Member
Usually I proceed like this

class MyProgram : public WithMyProgramLayout<TopWindow> 
{
	public:
	
		typedef MyProgram CLASSNAME;

		Image img;      // Fond
		Drawing curve;  // Graphe

		MyProgram();

		virtual void Paint(Draw& w);
}

(...)

void MyProgram::Paint(Draw& w)
{
	Size screen = GetScreenSize();	
	int hauteur = 250;
	int largeur = (int)screen.cx - 2*(255+5) - 4;
	
	w.DrawRect(GetSize(), WhiteGray);
	w.DrawImage(261, 544, img);	
	w.DrawDrawing(261, 544, largeur, hauteur, curve);
	
}


img will receive an ImageBuffer and curve a DrawingDraw

Which one is the GUI drawing area?
Could you give me an example of GUI drawing area, and very precious an example of drawing vector graphics?

My goal is not to create true vector editor but a little graph2D where user can get data values (x,y) easily by putting mouse over curve (my nodes)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image from URL
Next Topic: libjpeg-turbo
Goto Forum:
  


Current Time: Thu May 16 20:53:08 CEST 2024

Total time taken to generate the page: 0.02549 seconds