app_server: allow replacing the DrawState in a Canvas
* Needed for layers support. The previously set DrawState and its stack predecessors are not freed, so take care to not leak memory when using this.
This commit is contained in:
@@ -88,6 +88,13 @@ Canvas::PopState()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
Canvas::SetDrawState(DrawState* newState)
|
||||||
|
{
|
||||||
|
fDrawState = newState;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Canvas::SetDrawingOrigin(BPoint origin)
|
Canvas::SetDrawingOrigin(BPoint origin)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ public:
|
|||||||
virtual void PushState();
|
virtual void PushState();
|
||||||
virtual void PopState();
|
virtual void PopState();
|
||||||
DrawState* CurrentState() const { return fDrawState; }
|
DrawState* CurrentState() const { return fDrawState; }
|
||||||
|
void SetDrawState(DrawState* newState);
|
||||||
|
|
||||||
void SetDrawingOrigin(BPoint origin);
|
void SetDrawingOrigin(BPoint origin);
|
||||||
BPoint DrawingOrigin() const;
|
BPoint DrawingOrigin() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user