Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / svx / README
blob30e94654769516e720c94a6d5e594657e7ff06bf
1 Contains graphics related helper code. Lots of the draw and impress code is in this shared library.
3 xoutdev
4 this is where a lot of wht work would happen to move to the canvas. (what does that mean?)
6 svdraw
7 transparent gradient stuff. [seriously? surely much more, too]
9 == SdrObject ==
11 The shapes you can see in LibreOffice (like rectangle, etc.) are SdrObjects.
12 They are declared as a hierarchy:
14 SdrObject <- SdrAttrObj <- E3dObject <- E3dCompoundObject <- E3dCubeObj
15     ^ ^ ^             ^            ^              | | ^ ^
16     | | |             |            |              | | | +--- E3dExtrudeObj
17     | | |             |            |              | | +----- E3dLatheObj
18     | | |             |            |              | +------- E3dPolygonObj
19     | | |             |            |              +--------- E3dSphereObj
20     | | |             |            +--- E3dScene...
21     | | |             |
22     | | |             +--- SdrTextObj <- SdrObjCustomShape...
23     | | |                   ^ ^ ^ ^ ^
24     | | |                   | | | | +--- SdrEdgeObj...
25     | | |                   | | | +----- SdrMeasureObj...
26     | | |                   | | +------- SdrPathObj...
27     | | |                   | +--------- SdrRectObj...
28     | | |                   +----------- SdrTableObj...
29     | | +--- SdrObjGroup...
30     | + ---- SdrPageObj...
31     +------- SdrVirtObj...
33 The above is incomplete of course.
35 == SdrModel / SdrView ==
37 Copied from svdview.hxx:
39   First of all the app creates a SdrModel.
40   Then it opens a Win and creates a SdrView.
41   ShowSdrPage() announces a page at SdrView.
42   It's possible to show SdrView in any Wins at once.
44   SdrView can show as many Wins as it wants at once. Pages are announced
45   or checked out with the help of ShowSdrPage()/HideSdrPage(). For every announced
46   page there is a SdrPageView instance in container aPages. If more than one page
47   is showed, you have to pay attention that the offset parameter of ShowSdrPage()
48   is conformed to the size of the page (to prevent overlapping of two pages).
50 SdrView itself is inherited from many objects in a chain of inheritance (all
51 that starts with SdrPaintView - that is itself inherited from few classes
52 too):
54 SdrPaintView <- SdrSnapView <- SdrMarkView <- SdrEditView <- SdrPolyEditView
55                                                                    ^
56   +----------------------------------------------------------------+
57   |
58   SdrGlueEditView <- SdrObjEditView <- SdrExchangeView <- SdrDragView
59                                                                    ^
60   +----------------------------------------------------------------+
61   |
62   SdrCreateView <- SdrView
64 From SdrView on, it is not flat, but a real hierarchy again.
66 == Drawing Layer / SdrObject(s) ==
68 See drawinglayer/README for general information about drawinglayer.
70 Below is the class diagram that comes from
71 http://www.openoffice.org/marketing/ooocon2006/presentations/wednesday_g11.odp,
72 slide number 6.
74 .------- Model --------------.      .------- View -----------------------------------------.
75 | SdrObject - ViewContact    | 1..* | ViewObjectContact                                    |
76 |              getChild()    |------|    getPrimitiveList()  -----> Object(s) ---> SdrView |
77 |              getVOC()      |      |    getRecPrimitiveList()      Contact                |
78 |              getViewInd... |      |________|_____________________________________________|
79 | ...ependentPrimitiveList() |               |
80 |____________________________|            generates
81                                              |           ______
82                                              V          /      |
83                                    .----------------------.    |
84                                    | basePrimitive        |    |
85                                    |   getRange()         |<---'
86                                    |   getDecomposition() |
87                                    |______________________|
89 For SdrObjects, there are own DrawingLayer primitives in
90 svx/source/sdr/primitive2d
92 The ViewContact / ViewObject / ViewObjectContact are in svx/source/sdr/contact
93 Decomposes the SdrObjects, and does all sort of operations on them.
95 If the number of visualizable objects (e.g. SdrObjects) is X, and the number of
96 SdrViews is Y, then:
98 - there are X ViewContact instances (1:1 relation with a visualizable object)
99 - there are Y ObjectContact instances (1:1 relation with an SdrView)
100 - there are X*Y ViewObjecContact instances (1:N relation to both
101   visualizable objects and SdrViews)