[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Cairo Port





--On 07 May 2007 22:08 +0200 Jonas Diemer <diemer@xxxxxx> wrote:

Hi everyone,

I have been looking at Carl Worth's "lame attempt at fixing up the xaralx
code to use cairo instead of a proprietary CDraw.a" for the past few
hours. I have no experience with neither Xara nor Cairo, so I have a few
questions:

1. Carl created stubs for function calls to CDraw functions, which are to
be replaced by Cairo functions. Wouldn't it be easier to derive a new
GDrawContext instead? This has been done originally with GDrawAsm as a
C++ wrapper for the assemblerfunctions in GDRAW.DLL. I think this would
at least save passing around contexts, and would be more object oriented,
too.

Yes and no. Yes, in that creating a derived context class is desirable,
so one can do both from the same binary, and no in that you will need
to do some (possibly conditional) stubbing out in order to avoid unresolved
references when linking without CDraw.

You will also, I think, need to look carefully at whether you need to
derive an alternate render region class from GRenderRegion; ideally you
won't (as you'll have to change all sorts of instances where these are
created); perhaps you can use the render region capabilities system
(RRCAPS).

I possess complementary skills to Carl, in that I know very little about
Cairo, but a little more about Xara internals than most, though the
Xara guys know more, obviously.

Alex