On extending SdrTextPrimitive2D

Michael Stahl mstahl at redhat.com
Thu Jul 24 11:55:54 PDT 2014

On 24/07/14 19:10, Matteo Campanelli wrote:
> In one of my latest commits
> <http://cgit.freedesktop.org/libreoffice/core/commit/?h=feature/gsoc14-draw-chained-text-boxes&id=be897ed79d331276e8d686ac35956cdd57e24615> I
> created a class that extends SdrTextPrimitive2D.
> The derived class - SdrChainedTextPrimitive2D - should be used for
> dealing with text in chained text boxes.
> I have a couple concerns about the overriding of two virtual methods: 
> 1) SdrChainedTextPrimitive2D::create2DDecomposition should return a
> Primitive2DSequence. What is this for?

the rendering in drawing layer basically works by de-composing
everything down to half a dozen or so "primitive" objects; there are
many more complex objects but these all override create2DDecomposition()
such that the returned sequence consists of "simpler" objects that may
be primitive or further decomposed until eventually only primitives
remain, which are then rendered by the VclPixelProcessor2D (or recorded
by MetafileProcessor2D).

see also comments in

More information about the LibreOffice mailing list