Tango Graphics Package

Mike Parker aldacron71 at yahoo.com
Thu Jul 12 00:44:33 PDT 2007


Oskar Linde wrote:
> Mike Parker wrote:
> 
>> Tango is going visual! Headless visual! With the addition of a general 
>> purpose 2D graphics package, Tango users will be able to generate 2D 
>> images on the fly for use in a variety of applications, on the server 
>> or the desktop. The package supports basic 2D primitives, complex 
>> shapes, fonts, alpha-blending, transformations, paths, styles, and 
>> other common 2D graphics operations. The design is inspired by several 
>> existing APIs, such as Java2D and OpenVG, so anyone who has experience 
>> with other APIs should be able to get up and running quickly.
> 
> This all sounds very useful, but I have to ask why this is being added 
> to Tango. The structure of Tango as a monolithic package only makes 
> sense (to me) for heavily interdependent components. I can't see many 
> other modules in Tango being dependent on this library, so why does its 
> release schedule need to be tied to Tango's?

The impetus behind the idea was server-side image generation. It will 
complement Tango's sever-oriented packages nicely.

> 
> I found nothing written about the design of this library in the posted 
> links (I probably didn't look hard enough). Is the idea to do everything 
> Cairo, OpenVG, Java2D, GDI+, Quartz, etc can do?

Nothing has been published just yet. It's going to be a while before it 
is integrated into the Tango core. You'll be able much of what those 
libraries allow you to, if not everything. The basic feature list is 
fixed to that I listed in the announcement above. More advanced features 
are being considered.

> 
> What are the target applications? When reading the above, I got 
> something such as web server graphics generation in mind. Is the library 
> meant to support things ranging from accelerated 2D graphics for games 
> to high quality desktop publishing technologies such as advanced type 
> setting?

The number one goal is server-side image generation in a headless 
environment and the package is being designed with that in mind. 
Usability and extensibility are being given priority to performance. 
While we do want it to be able to generate images quickly on-the-fly, I 
wouldn't recommend it for game development. It is designed to work on 
buffers independent of any GUI or graphics system, not really something 
games would find beneficial.

> 
> What back ends are developed? Apart from a basic image buffer back end 
> (I assume), what other back ends are being considered primary? SVG, 
> PostScript, PDF, GDI+ and OpenGL all seem to be candidates.

The default implementation will be designed to render directly to byte 
arrays. I don't want to give too much info about implementation details 
just yet, as the design is still subject to change, but I can tell you 
right now there will be no direct support in the default implementation 
for rendering to anything other than byte arrays, nor for any renderer 
other than one implemented in software.

However, the design is such that users will be able to implement third 
party renderers and manipulate the bytes, or frame buffer, in anyway 
they need want. The default implementation is intended to be available 
anywhere Tango is, regardless of what third-party implementations are 
out there.

> 
> What external libraries will this depend on? I assume libpng and 
> FreeType at the very least.

The default implementation will most likely have a dependency on 
FreeType. I don't see anyway around that right now. But there will be no 
dependencies on any sort of image library. What you do with the byte 
array after a rendering operation is totally up to you.

> 
> In all, it sound very interesting. I have personally several 
> applications that could use this. There must have been a tremendous 
> amount of work involved getting this done.
> 

It's very much a work-in-progress. I can't give you a date yet for when 
you'll see anything, but we wanted to announce it now to get some 
general feedback.



More information about the Digitalmars-d-announce mailing list