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 » Developing U++ » UppHub » Scatter : getDrawing !!!! help !!!!
Re: Scatter : getDrawing !!!! help !!!! [message #29027 is a reply to message #29022] Sat, 02 October 2010 17:14 Go to previous messageGo to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi Koldo,

As a matter of fact , I added a 'AddDrawing' method to my report generator package:

void ReportGenerator::replaceDrawing(const StringType& label, const Upp::Drawing& inputDrw, Upp::Size destSize )
{
	Upp::String s;
	if (!inputDrw.IsNullInstance() )
	{
		if (destSize.cy != 0)
		{
			if ( inputDrw.GetSize().cx*100/inputDrw.GetSize().cy > destSize.cx*100/destSize.cy )
			{
				s << AsQTF(CreateDrawingObject(inputDrw, destSize.cx,0));
			}
			else
			{
				s << AsQTF(CreateDrawingObject(inputDrw, 0, destSize.cy));
			}
		}
		else
		{
			s << AsQTF(CreateDrawingObject(inputDrw));
		}
	}
	else
	{
		replaceImage(label, ReportGeneratorImg::EMPTY_IMG(), destSize);
	}
	replaceVar(label,s);
};


The code is inspired from another Upp package from Sergei I think.
I preferred to use the a DrawingObject object instead of passing by an intermediate Image like in you're example: this keeps the pdf files as light as possible.

This works very well with the PieChart ctrl (see the sample report I joined ) but with the Scatter ctrl, it doesn't work: I see the graph but the points are to small to appear and the fonts are almost unreadable Sad

I know something is done when CtrlLayoutxxx() methods are called but I don't understand the philosophy of the 'xxxZxxx()' methods which are used to counter the problem I have and since the PieChart and Scatter don't behave the same ... I'm stuck for the moment

BTW: the report joined is completely generated from SQL data including images and charts.

[Updated on: Sat, 02 October 2010 17:29]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Scatter: Propose to add new methods
Next Topic: Themes
Goto Forum:
  


Current Time: Sat May 18 07:51:58 CEST 2024

Total time taken to generate the page: 0.01771 seconds