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 » Community » U++ community news and announcements » Draw is final!
Draw is final! [message #22495] Sun, 19 July 2009 15:21 Go to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
We have reached the final milestone in Draw development and now we have quite unique feature - headless graphics output.

In other words, console application in linux can produce graphical output, e.g. .png files or .pdf files, without X11 being installed on the same machine.

This has great benefits for web applications and possibly also for embedded market - in this case, the next logical step might be development of framebuffer U++.

(BTW, which one is more interesting? Smile

Mirek
Re: Draw is final! [message #22496 is a reply to message #22495] Sun, 19 July 2009 16:06 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
referece/ConsoleDraw:

#include <Painter/Painter.h>
#include <RichText/RichText.h>
#include <PdfDraw/PdfDraw.h>
#include <plugin/png/png.h>

using namespace Upp;

void DoDraw(Draw& w)
{
	w.DrawRect(0, 0, 600, 200, White());
	w.DrawText(0, 0, "Hello world!", Arial(100), Black());
}

CONSOLE_APP_MAIN {
	{
		ImagePainter w(600, 100);
		DoDraw(w);
		PNGEncoder().SaveFile(GetHomeDirFile("hello.png"), w);
	}
	{
		RichText txt = ParseQTF("[A4 Just a [*/ little] test!");
		ImagePainter w(1000, 200);
		w.DrawRect(0, 0, 1000, 200, White());
		txt.Paint(w, 0, 0, 1000);
		PNGEncoder().SaveFile(GetHomeDirFile("richtext.png"), w);	
		
		PdfDraw pdf;
		txt.Paint(pdf, 0, 0, 1000);
		SaveFile(GetHomeDirFile("richtext.pdf"), pdf.Finish());
	}
}
Re: Draw is final! [message #22503 is a reply to message #22496] Sun, 19 July 2009 21:57 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Wonderful!

Maybe someone knows how to write a screensaver for Linux to display a number of Controls? ...

Is it possible to create such on U++?

All that I have found about this
http://www.gnome.org/~mccann/gnome-screensaver/docs/gnome-sc reensaver.html


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: Draw is final! [message #22507 is a reply to message #22496] Mon, 20 July 2009 08:20 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

luzr wrote on Sun, 19 July 2009 17:06

referece/ConsoleDraw:

#include <Painter/Painter.h>
#include <RichText/RichText.h>
#include <PdfDraw/PdfDraw.h>
#include <plugin/png/png.h>

using namespace Upp;

void DoDraw(Draw& w)
{
	w.DrawRect(0, 0, 600, 200, White());
	w.DrawText(0, 0, "Hello world!", Arial(100), Black());
}

CONSOLE_APP_MAIN {
	{
		ImagePainter w(600, 100);
		DoDraw(w);
		PNGEncoder().SaveFile(GetHomeDirFile("hello.png"), w);
	}
	{
		RichText txt = ParseQTF("[A4 Just a [*/ little] test!");
		ImagePainter w(1000, 200);
		w.DrawRect(0, 0, 1000, 200, White());
		txt.Paint(w, 0, 0, 1000);
		PNGEncoder().SaveFile(GetHomeDirFile("richtext.png"), w);	
		
		PdfDraw pdf;
		txt.Paint(pdf, 0, 0, 1000);
		SaveFile(GetHomeDirFile("richtext.pdf"), pdf.Finish());
	}
}



Nice example!
Good work!
Re: Draw is final! [message #22508 is a reply to message #22507] Mon, 20 July 2009 09:19 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Mirek

Yes, the example is crystal clear. Excelent job!

Please move the example to some of the example folders.

Best regards
Koldo


Best regards
Iñaki
Re: Draw is final! [message #22667 is a reply to message #22508] Mon, 03 August 2009 22:06 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hi mirek,

you asked which one would be the more interesting one, the web application stuff or the framebuffer stuff..

from the point of view of an embedded system developper, the answer is just clear Smile FRAMEBUFFER, so we could easily get rid of all the heavy weight of the tools needed, like fltk, qt, gtk and all that, barely writing GUI stuff on plain Framebuffer.. that'll be a great benefit..really.

web application is just a step ahead..but i'd prefer to have framebuffer, where i could help if needed. problem is still, i have no clue what happens down there in your code, i am just to freshy in Ultimate++ for that (though heavily using it for 1 year now). but with some hints...

just let me know
Re: Draw is final! [message #22670 is a reply to message #22667] Tue, 04 August 2009 07:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Mon, 03 August 2009 16:06


from the point of view of an embedded system developper, the answer is just clear Smile FRAMEBUFFER, so we could easily get rid of all the heavy weight of the tools needed, like fltk, qt, gtk and all that, barely writing GUI stuff on plain Framebuffer.. that'll be a great benefit..really.



BTW, any details/story about your embedded development?

The area attracts me, but I do not have any real experiences. I am just waiting for ARM based smartbooks to gain some:)

Mirek
Re: Draw is final! [message #27147 is a reply to message #22670] Mon, 28 June 2010 14:25 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey mirek,

recently stumbled over that post and realized that i havent answered... i'l place it in the framebuffer thread..

http://www.ultimatepp.org/forum/index.php?t=msg&goto=271 46&#msg_27146
Re: Draw is final! [message #27170 is a reply to message #27147] Tue, 29 June 2010 17:03 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Final Draw is very good news indeed!
Mirek, what did you mean by "U++ framebuffer"?
Re: Draw is final! [message #27175 is a reply to message #27170] Tue, 29 June 2010 17:57 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
hey mindtraveler

see thread (link above). Upp might go framebuffer, to spare out SDL and all that stuff on embedded devices. Painter is excellent, it can draw things standalone (headless draw) to .... framebuffer under linux (/dev/fb0)
Re: Draw is final! [message #27186 is a reply to message #27175] Tue, 29 June 2010 22:09 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello kohait00

Sorry for the question. Do you mean that U++ drawing is now as fast as SDL ?


Best regards
Iñaki
Re: Draw is final! [message #27187 is a reply to message #27186] Tue, 29 June 2010 23:10 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
nope, at least not yet. there are plans to have Upp output directly to framebuffer, not to X11 (in linux of corse). if all is done well, this should be as fast or even faster then using SDL.

but its still in phase of conception. so it could take a while.
Re: Draw is final! [message #27193 is a reply to message #27187] Wed, 30 June 2010 13:02 Go to previous messageGo to next message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

kohait00 wrote on Wed, 30 June 2010 00:10

nope, at least not yet. there are plans to have Upp output directly to framebuffer, not to X11 (in linux of corse). if all is done well, this should be as fast or even faster then using SDL.

but its still in phase of conception. so it could take a while.


About framebuffer, is this avaiable on win32/64 too or only for linux/unix?

Thank you!
Re: Draw is final! [message #27194 is a reply to message #27193] Wed, 30 June 2010 16:57 Go to previous message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
tojocky wrote on Wed, 30 June 2010 14:02

kohait00 wrote on Wed, 30 June 2010 00:10

nope, at least not yet. there are plans to have Upp output directly to framebuffer, not to X11 (in linux of corse). if all is done well, this should be as fast or even faster then using SDL.

but its still in phase of conception. so it could take a while.


About framebuffer, is this avaiable on win32/64 too or only for linux/unix?

Thank you!

Only for linux.
Previous Topic: U++ 2467 released
Next Topic: Tutoring Plan is out
Goto Forum:
  


Current Time: Thu Apr 18 20:18:36 CEST 2024

Total time taken to generate the page: 0.04576 seconds