@@ -66,10 +66,10 @@ class Artboard : public ArtboardBase, public CoreContext
66
66
std::vector<DataBind*> m_DataBinds;
67
67
std::vector<DataBind*> m_AllDataBinds;
68
68
DataContext* m_DataContext = nullptr ;
69
+ bool m_ownsDataContext = false ;
69
70
bool m_JoysticksApplyBeforeUpdate = true ;
70
71
71
72
unsigned int m_DirtDepth = 0 ;
72
- RawPath m_backgroundRawPath;
73
73
Factory* m_Factory = nullptr ;
74
74
Drawable* m_FirstDrawable = nullptr ;
75
75
bool m_IsInstance = false ;
@@ -101,6 +101,12 @@ class Artboard : public ArtboardBase, public CoreContext
101
101
void host (NestedArtboard* nestedArtboard);
102
102
NestedArtboard* host () const ;
103
103
104
+ // Implemented for ShapePaintContainer.
105
+ const Mat2D& shapeWorldTransform () const override
106
+ {
107
+ return worldTransform ();
108
+ }
109
+
104
110
private:
105
111
#ifdef TESTING
106
112
public:
@@ -172,8 +178,8 @@ class Artboard : public ArtboardBase, public CoreContext
172
178
void addToRenderPath (RenderPath* path, const Mat2D& transform);
173
179
174
180
#ifdef TESTING
175
- RenderPath * clipPath () const { return m_clipPath. get () ; }
176
- RenderPath * backgroundPath () const { return m_backgroundPath. get () ; }
181
+ ShapePaintPath * clipPath () { return &m_worldPath ; }
182
+ ShapePaintPath * backgroundPath () { return &m_localPath ; }
177
183
#endif
178
184
179
185
const std::vector<Core*>& objects () const { return m_Objects; }
@@ -203,12 +209,12 @@ class Artboard : public ArtboardBase, public CoreContext
203
209
void dataContext (DataContext* dataContext);
204
210
void internalDataContext (DataContext* dataContext, bool isRoot);
205
211
void clearDataContext ();
206
- void setDataContextFromInstance ( ViewModelInstance* viewModelInstance,
207
- DataContext* parent);
208
- void setDataContextFromInstance ( ViewModelInstance* viewModelInstance,
209
- DataContext* parent,
210
- bool isRoot);
211
- void setDataContextFromInstance ( ViewModelInstance* viewModelInstance);
212
+ void bindViewModelInstance (rcp< ViewModelInstance> viewModelInstance,
213
+ DataContext* parent);
214
+ void bindViewModelInstance (rcp< ViewModelInstance> viewModelInstance,
215
+ DataContext* parent,
216
+ bool isRoot);
217
+ void bindViewModelInstance (rcp< ViewModelInstance> viewModelInstance);
212
218
void addDataBind (DataBind* dataBind);
213
219
void populateDataBinds (std::vector<DataBind*>* dataBinds);
214
220
void sortDataBinds ();
@@ -415,6 +421,7 @@ class Artboard : public ArtboardBase, public CoreContext
415
421
void onLayoutDirty (ArtboardCallback callback)
416
422
{
417
423
m_layoutDirtyCallback = callback;
424
+ addDirt (ComponentDirt::Components);
418
425
}
419
426
#endif
420
427
};
0 commit comments