OffscreenDrawingContext: Implement ResyncDrawState()
This is called whenever the DrawState is modified, so that it gets applied to the DrawingEngine. Otherwise, the DrawingEngine works with an out-dated state.
This commit is contained in:
@@ -320,6 +320,14 @@ OffscreenContext::OffscreenContext(DrawingEngine* engine,
|
|||||||
:
|
:
|
||||||
DrawingContext(state),
|
DrawingContext(state),
|
||||||
fDrawingEngine(engine)
|
fDrawingEngine(engine)
|
||||||
|
{
|
||||||
|
ResyncDrawState();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OffscreenContext::ResyncDrawState()
|
||||||
{
|
{
|
||||||
fDrawingEngine->SetDrawState(fDrawState);
|
fDrawingEngine->SetDrawState(fDrawState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -90,17 +90,18 @@ public:
|
|||||||
// Screen and View coordinates are the same for us.
|
// Screen and View coordinates are the same for us.
|
||||||
// DrawState already takes care of World<>View
|
// DrawState already takes care of World<>View
|
||||||
// conversions.
|
// conversions.
|
||||||
void ConvertToScreen(BPoint*) const {}
|
virtual void ConvertToScreen(BPoint*) const {}
|
||||||
void ConvertToScreen(IntPoint*) const {}
|
virtual void ConvertToScreen(IntPoint*) const {}
|
||||||
void ConvertToScreen(BRect*) const {}
|
virtual void ConvertToScreen(BRect*) const {}
|
||||||
void ConvertToScreen(IntRect*) const {}
|
virtual void ConvertToScreen(IntRect*) const {}
|
||||||
void ConvertToScreen(BRegion*) const {}
|
virtual void ConvertToScreen(BRegion*) const {}
|
||||||
void ConvertFromScreen(BPoint*) const {}
|
virtual void ConvertFromScreen(BPoint*) const {}
|
||||||
|
|
||||||
DrawingEngine* GetDrawingEngine() const { return fDrawingEngine; }
|
virtual DrawingEngine* GetDrawingEngine() const { return fDrawingEngine; }
|
||||||
|
|
||||||
void RebuildClipping(bool deep) { /* TODO */ }
|
virtual void RebuildClipping(bool deep) { /* TODO */ }
|
||||||
ServerPicture* GetPicture(int32 token) const
|
virtual void ResyncDrawState();
|
||||||
|
virtual ServerPicture* GetPicture(int32 token) const
|
||||||
{ /* TODO */ return NULL; }
|
{ /* TODO */ return NULL; }
|
||||||
private:
|
private:
|
||||||
DrawingEngine* fDrawingEngine;
|
DrawingEngine* fDrawingEngine;
|
||||||
|
|||||||
Reference in New Issue
Block a user