Graphic rendering: primitive functions

Caolán McNamara caolanm at redhat.com
Wed Sep 4 15:15:59 UTC 2019


On Wed, 2019-09-04 at 07:41 -0700, cekkr wrote:
> Hello,
> I'm studying the working of windows rendering, in particular on OS X.
> Which parts of codes are strictly related to "primitive" functions
> for rendering on the different OSs? 
> 
> For be a little more clear, "ad absurdum" where I have to code for
> implement LibreOffice on a my theoretical graphic server?

As a sample, for bottom level drawing, you typically inherit from
SalGraphics in vcl/inc/salgdi.hxx and provide implementations of the
pure virtual methods of that, e.g.

virtual void                drawPixel( long nX, long nY ) = 0;

vcl/headless/svpgdi.cxx is one such implementation that draws to a
cairo canvas and is reused by the gtk3 implementation.

FWIW the OSX one is in vcl/quartz/salgdi.cxx and
vcl/quartz/salgdicommon.cxx

That's the bottom level drawing stuff. See vcl/inc/salinst.hxx for the
entry point for creating toplevel frames, printers, off-screen virtual
drawing devices, and so on



More information about the LibreOffice mailing list