Home » Community » U++ community news and announcements » Draw is final!
|
Re: Draw is final! [message #22496 is a reply to message #22495] |
Sun, 19 July 2009 16:06   |
 |
mirek
Messages: 14255 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 #22507 is a reply to message #22496] |
Mon, 20 July 2009 08:20   |
|
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 #22667 is a reply to message #22508] |
Mon, 03 August 2009 22:06   |
 |
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 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   |
 |
mirek
Messages: 14255 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 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 #27193 is a reply to message #27187] |
Wed, 30 June 2010 13: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!
|
|
|
Re: Draw is final! [message #27194 is a reply to message #27193] |
Wed, 30 June 2010 16:57  |
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.
|
|
|
Goto Forum:
Current Time: Tue Apr 29 09:43:13 CEST 2025
Total time taken to generate the page: 0.00879 seconds
|