|
|
Home » Developing U++ » U++ Developers corner » AGG
AGG [message #9941] |
Sun, 10 June 2007 11:24 |
|
mirek
Messages: 14039 Registered: November 2005
|
Ultimate Member |
|
|
Quote: |
For me i hope it will be possible to integrate it into Draw instead of GDI.
In the code i don't want to know that for drawing lines is responsible agg or GDI, it schould be transparent.
But in AGG mode the interface should have a bit more options for drawing lines of different widths with any pen etc .
|
Well, this issue was already resolved and while there could be Draw variant, I strongly believe that AGG should be kept as separate engine. The main reason is that it has much more rich capabilities than Draw, OTOH we want to keep Draw interface minimal (so that it can be easily implemented anywhere). I think in your message, you see that too
What we need is the seamless integration. The real problem there (not that apparent at the first look) is, in nutshell, printing.
That means you should be capable to store AGG painting into Drawing and then put it to the printer, in high resolution (600dpi is U++ standard).
That more or less rules out storing it as raster. There is quite reasonable interface ready in Draw capable of solving this issue - DrawData. In current Draw, it is capable of drawing rescaled images directly from compressed image formats, which was e.g. needed in one of my application, where 300dpi scanned image of full A4 page is printed behind some text produced by application (form-filler style of app). DrawData even tries to "compress" the raster data while sending them to the printer by replacing large uni-color areas with DrawRect and it also performs banding to reduce the memory requirements.
See Draw/DrawData and Draw/DrawRasterData.
|
|
|
|
Re: AGG [message #9952 is a reply to message #9942] |
Mon, 11 June 2007 04:30 |
Novo
Messages: 1371 Registered: December 2006
|
Ultimate Contributor |
|
|
luzr wrote on Sun, 10 June 2007 06:29 | Also, looks like we are stuck with AGG 2.4 version.
|
Insider's information: the author of AGG can make a separate license for UPP. You'll need just ask him and explain reasons.
Regards,
Novo
|
|
|
|
Re: AGG [message #9960 is a reply to message #9953] |
Mon, 11 June 2007 15:54 |
Novo
Messages: 1371 Registered: December 2006
|
Ultimate Contributor |
|
|
luzr wrote on Mon, 11 June 2007 04:00 |
it would make AGG sources released under "free" license AFAIK...
|
AGG was previously "free", and, as I know, old customers got separate licenses. If you really want to use AGG in UPP just ask the author. He is a good guy.
Regards,
Novo
[Updated on: Mon, 11 June 2007 23:03] Report message to a moderator
|
|
|
|
|
|
|
Re: AGG [message #10146 is a reply to message #10145] |
Fri, 22 June 2007 04:54 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
These are svg_examples to play with. They are a bit corrected by me (according to standards, imo) and might differ from those of agg website.
P.S. you should unpack the examples into ~/svg_examples/ to test with XmlView_svg2
[Updated on: Fri, 22 June 2007 04:58] Report message to a moderator
|
|
|
|
Re: AGG [message #10166 is a reply to message #10158] |
Sat, 23 June 2007 01:56 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
arturbac wrote on Fri, 22 June 2007 09:37 | Thanks.
|
You welcome.
A. Some more considerations about agg or what people expect from agg:
1. the questions I didn't answer to myself:
"Would be it possible (or desired.. or required) too "agg-ise" existing:
a) the whole application
b) only some controls
c) only some elements of controls
with e.g let's say (kind/part of "chameleon"?) Draw::SetEngine("AGG"/"VNC"/"HOST"/"SDL/"GLX"..., SetScreen("whole_screen", 10times x 10times), ElementsFilter(ArrayMap("RichEdit","text")) )
d) all text
...
or only use AggDraw in e.g virtual Paint() for each users needs in new controls to draw something (like Mirek's proposal?) ?
2. In case of controls- "how to switch/connect between subpixel accuracy and existing "no double point" coordinates (something like existing "Splitter"...?)
3. Would all those upp AggDraw::DrawSomething(...) wrapper things just be an extra bloat when at the moment with my Imag buffer (kind of canvas?) I have all the flexibility of agg?
-partial answer to this: ok, maybe people would not need to learn "agg way of doing things" but is it worth?
B. if accepted, "agg_aris_main" package should be renamed agg2.4_uppBase1 (or similar) and go to under /plugins and not needed to be changed except:
1. maybe - agg_svg_upp (svg related files) should be extracted into a separate package? - Because (at least me) it is going to be adjusted for Upp::Xml
2. maybe - someone (or me in some future) will want to adjust agg2.4_uppBase1 to upp containers (then agg2.4_uppBase2? )
3. I would suggest then to have different agg_upp_bind (or agg2.4UppDraw ) packages and/or variants (I will have my variants anyway )
4. related to my naming scheme - I'm seriously thinking about a mechanism (regular exp aliases? and/or version control) allowing showing and switching between different branches/versions in the theide.
Aris
[Updated on: Sat, 23 June 2007 01:58] Report message to a moderator
|
|
|
Re: AGG [message #10184 is a reply to message #9941] |
Sat, 23 June 2007 20:12 |
|
I have 2 questions :
1.Why You use ImagBuffer instead of ImageBuffer from Upp ?
2.What exactly do Rectangelize ?
|
|
|
|
|
Re: AGG [message #10193 is a reply to message #10190] |
Sun, 24 June 2007 13:30 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Sun, 24 June 2007 10:02 |
...
Actually, you got this point wrong back then...
|
You mean, now I understand it, do you?
Quote: |
What is needed is in the fact the ability to render the image in bands. In other words, to draw the clip of image only. Together with "WMF-style" recording, U++'s DrawData function will be able to draw the image in only small portions (bands) and will perform the "rectanglizations" (this code is already in Draw package and tested to work in some of mine commercial applications to directly draw supported image formats like .png).
|
Yes, I just made your ingenious piece of code to work with agg and blend with upp Ctrls (with controlled transluency layers). But I also wanted to detect refreshable rectangles from the whole application and pump through my ImagBuffer system. Maybe the other way round and wrong approach...
Quote: | OTOH, I think this whole issue can wait a bit.
|
Do you mean, agg?
Quote: |
Painting on the screen seems to be the primary problem now anyway....
|
Could you elaborate? You mean agg painting or upp painting? (if upp, is this the reason upp blinks horribly with beryl when resizing?)
P.S XmlView_svg2 which I posted is not all what have done with upp and agg. Some other things were e.g inserting resizable png and svg imges (EDIT: actually as links not the whole images) into UWord and exporting qtf into xhtml (not HTML).
But the biggest drawback of theide (or maybe my inability) to have good version control switching is that I have to spend too much time adjusting my changes to official versions.
[Updated on: Sun, 24 June 2007 13:35] Report message to a moderator
|
|
|
|
Re: AGG [message #10449 is a reply to message #10194] |
Tue, 10 July 2007 01:55 |
|
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
ok, if you'd like this style:
AggDrawer agd(RectC(0,0,sz.cx, sz.cy));
agd.SetBackground(agg::rgba(0, 1.0, 1.0, ~optR));
// agd.SetBackground(agg::rgba(1.0, 0.5, 0.5));
agd.DrawLine(0,0,100,100,10);
agd.SetBrushColor(agg::rgba(0, 0, 0));
// agd.DrawLine(100,0,200,100,10);
agd.DrawEllipse(sz2.cx, sz2.cy, sz2.cx-10, sz2.cy-10, 3);
agd.End(w, ~optR);
here is the plugin:
|
|
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:03:55 CEST 2024
Total time taken to generate the page: 0.03020 seconds
|
|
|