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 » Painter and transformations
Re: Painter and transformations [message #38844 is a reply to message #38837] Wed, 23 January 2013 12:37 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14257
Registered: November 2005
Ultimate Member
Tried with this testcase:

#include <CtrlLib/CtrlLib.h>
#include <Painter/Painter.h>

using namespace Upp;

struct PainterTest : public TopWindow {
	virtual void Paint(Draw& w) {
		DrawPainter p(w, GetSize()/*, MODE_NOAA*/);

		p.Clear(White());
		p.Text(0, 0, "A", Roman(50));
		p.Fill(Black());
		
		p.Translate(100, 100);
		p.Rotate(1);
		p.Fill(Blue());

		p.Translate(200, -200);
		p.Scale(6);
		p.Fill(Magenta());
		
		p.Scale(1.0 / 6);
		p.Translate(-200, 200);
		
		p.Rotate(-1);
		p.Fill(Red());
		
		p.Translate(-100, -100);
		p.Fill(Green());
	}
};

GUI_APP_MAIN
{
	PainterTest().Run();
}



All seems ok...

[Updated on: Wed, 23 January 2013 12:38]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How must Alpha be managed ??
Next Topic: Crash in Painter
Goto Forum:
  


Current Time: Sun May 11 20:30:01 CEST 2025

Total time taken to generate the page: 0.00774 seconds