Re: Cairo and ISO C++

Michael McLaughlin <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <CAL_=NOr9pQXCNC0VmenGbkt=jt0=GeFU2GR09T-5w9nAzVhn5A@mail.gmail.com>
Hi Rob,

That was definitely an interesting read and well worth the time. I plan to
read it again in the morning when my brain is fresh. I think the
best lesson I took from it so far comes in the form of a confirmation. When
SG13 (the ISO C++ 2D Graphics Study Group) formed, we decided that for "V1"
we would focus on an immediate mode API (i.e. a relatively stateful,
low-level drawing API) and leave a retained mode API (i.e. something with a
scene graph, along the lines of the scenes that can be composed by parsing
SVG, XAML, or HTML) for later if there was a demand for it. I had strong
suspicions (gleaned from my own perspective as a user of such technologies
along with some very simple creations of scene graphs for various internal
tools) that creating, maintaining, and allowing the manipulation of a scene
graph was complex. Your article very much confirms that suspicion and makes
me extremely glad that we decided to choose a very narrow scope to begin
with.

Thanks for the interesting read and the insight that it, and your
comments, provide!

-Mike



On Sun, Feb 2, 2014 at 5:27 PM, Robert O'Callahan <[email protected]>wrote:

> On Tue, Jan 21, 2014 at 8:17 PM, Jeff Muizelaar <[email protected]> wrote:
>
>> The work we've done on the Moz2D API may also be of some interest to you.
>> It aims to be an efficient C++ wrapper around cairo, CoreGraphics, Skia and
>> Direct2D. The API is not as polished as cairo but it aims to expose a
>> common subset of functionality. Because of this it has been much easier to
>> support different backends than it has been in cairo. You can see it here:
>> http://dxr.mozilla.org/mozilla-central/source/gfx/2d/2D.h
>>
>
> Some of the motivation behind Moz2D is given here:
> http://robert.ocallahan.org/2011/09/graphics-api-design.html. I think
> that's worth reading, not because I wrote it :-), but because it
> crystallizes some lessons from using cairo in Firefox for many years.
>
> Even given the disadvantages of cairo discussed there, it might still be
> the best choice for a C++ standard library. If you want the standard
> library to be convenient for building specific graphical applications, and
> care less about using it to build browser-like application frameworks ---
> and you don't care about squeezing out every last drop of performance ---
> it's probably fine.
>
> Rob
> --
> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
> le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
> stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
> 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
> waanndt  wyeonut  thoo mken.o w
>

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.