1 #pragma once
2 
3 #ifndef SCENEFX_INCLUDED
4 #define SCENEFX_INCLUDED
5 
6 #include "tfx.h"
7 
8 #undef DVAPI
9 #undef DVVAR
10 #ifdef TOONZLIB_EXPORTS
11 #define DVAPI DV_EXPORT_API
12 #define DVVAR DV_EXPORT_VAR
13 #else
14 #define DVAPI DV_IMPORT_API
15 #define DVVAR DV_IMPORT_VAR
16 #endif
17 
18 class TXsheet;
19 class ToonzScene;
20 
21 /*
22   NOTE:  The following functions are DEPRECATED, but still in use throughout
23   Toonz at the moment.
24          Please use the unified function below in newly written code.
25 */
26 
27 DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
28                         int whichLevels, int shrink, bool isPreview);
29 DVAPI TFxP buildSceneFx(ToonzScene *scene, double row, int shrink,
30                         bool isPreview);
31 DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row, int shrink,
32                         bool isPreview);
33 DVAPI TFxP buildSceneFx(ToonzScene *scene, double row, const TFxP &root,
34                         bool isPreview);
35 DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
36                         const TFxP &root, bool isPreview);
37 DVAPI TFxP buildPartialSceneFx(ToonzScene *scene, double row, const TFxP &root,
38                                int shrink, bool isPreview);
39 DVAPI TFxP buildPartialSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
40                                const TFxP &root, int shrink, bool isPreview);
41 DVAPI TFxP buildPostSceneFx(ToonzScene *scene, double row, int shrink,
42                             bool isPreview);
43 
44 //-------------------------------------------------------------------------------------------------------------------------
45 
46 enum BSFX_Transforms_Enum {
47   BSFX_NO_TR         = 0x0,  //!< No transform is applied.
48   BSFX_CAMERA_TR     = 0x1,  //!< Adds the current camera transform.
49   BSFX_CAMERA_DPI_TR = 0x2,  //!< Adds the current camera DPI transform.
50   BSFX_COLUMN_TR     = 0x4,  //!< Adds column transforms to all columns.
51 
52   BSFX_DEFAULT_TR = BSFX_CAMERA_TR | BSFX_CAMERA_DPI_TR |
53                     BSFX_COLUMN_TR  //!< Default includes all transforms.
54 };  //!< Affine transform included in a built scene
55     //!  fx whenever <I>a root fx is specified</I>.
56 
57 /*!
58   \brief    The buildSceneFx() function implements all the supported parameter
59   combinations
60             historically used by Toonz to decorate a schematic tree for
61   rendering purposes.
62 
63   \details  Only two parameters are explicitly required from the user: the scene
64   to be decorated,
65             and the frame at which the decoration takes place.
66 
67             All the other parameters are turned to default or taken by current
68   settings if not
69             specified by the user.
70 */
71 
72 DVAPI TFxP buildSceneFx(ToonzScene *scene, double frame, TXsheet *xsh = 0,
73                         const TFxP &root                = TFxP(),
74                         BSFX_Transforms_Enum transforms = BSFX_DEFAULT_TR,
75                         bool isPreview = false, int whichLevels = -1,
76                         int shrink = 1);
77 
78 // temo non debba andare qui
79 // in ogni caso gestisce anche lo zdepth
80 // (utilizzando la camera corrente, il che forse non e' una buona idea)
81 // ritorna false se la colonna e' "dietro la camera" e quindi non visibile
82 bool DVAPI getColumnPlacement(TAffine &aff, TXsheet *xsh, double row, int col,
83                               bool isPreview);
84 
85 #endif
86