-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm interested in writing a gfx component which is independent of any toolkit and renders (rasterizes) drawing commands to an off-screen RGB memory buffer. The reason for doing this is that it would make it possible to embed mozilla in a radically different context than what's currently supported -- what I want to do is embed mozilla on a textured object in a 3D virtual world.
I have been playing with Stuart Parmenter's "Anya" code, which uses mozilla as a "rendering" server, and sends the results of the rendered web page to the client. This is useful as this demonstrates how to make mozilla toolkit-independent, but unfortunately the way it actually works is by emitting a series of drawing commands which are then executed by the client. I need to do the actual rasterizing and expose the resulting image to my own code to import into the 3D world as a texture. So what I'm going to do is fork the Anya code (the gfx component at least, I suspect the widget component will be nearly the same) and write a gfx component that implements all the drawing operations directly in software without a toolkit. Some other things: * I initially thought it would make sense to render to a 24bpp RGB buffer, but it occured to me that it might be useful to actually render to a 32bit RGBA buffer. Does this make sense? * There will of course need to be some API to specify the dimensions of the target buffer, and to retrieve the buffer. I presume issues like actually scrolling the web page are handled internally. * To support interaction, I need to produce keyboard and mouse events. Are there complications to this, or will it be a simple matter of translating them to mozilla events and shoving them into a global event queue? * I indend to use freetype to render fonts. This implies that on non-ttf platforms like X, you won't be able to use native fonts, only truetype fonts. * Originally I was only interested in rendering HTML, but it occured to me that since everything is based on XUL it should be possible to embed *any* mozilla-hosted app -- the email program, chatzilla, xulterm -- this way. Is this true? * I'd like to avoid reinventing the wheel, since the inner workings of drawing lines, arcs and boxes, doing clipping and so forth have been implemented many times and it should be plenty of open source code to borrow from. The main issue is licensing -- if the code is, say, LGPL, will that create problems if I my module is integrated into the mainline mozilla source later on down the road? Does anyone either recommend an unencumbered library that could be relicensed, or a workaround (such as doing my work in a separate library which is linked in)? Comments? [ Peter Amstutz ][ [EMAIL PROTECTED] ][ [EMAIL PROTECTED] ] [Lead Programmer][Interreality Project][Virtual Reality for the Internet] [ VOS: Next Generation Internet Communication][ http://interreality.org ] [ http://interreality.org/~tetron ][ pgpkey: pgpkeys.mit.edu 18C21DF7 ] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/fNQZaeHUyhjCHfcRAkl+AKCznX4OhCAfF7D4DXdKfXCuK9ukqACggusW saLjfufWn7SlSdt6aSqzNpw= =50DQ -----END PGP SIGNATURE----- _______________________________________________ Mozilla-layout mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-layout
