Esempio n. 1
0
static void
draw_picture(void* _context, const BPoint& where, int32 token)
{
	DrawingContext* context = reinterpret_cast<DrawingContext *>(_context);

	ServerPicture* picture = context->GetPicture(token);
	if (picture != NULL) {
		context->PushState();
		context->SetDrawingOrigin(where);

		context->PushState();
		picture->Play(context);
		context->PopState();

		context->PopState();
		picture->ReleaseReference();
	}
}
Esempio n. 2
0
static void
pop_state(void* _context)
{
	DrawingContext* context = reinterpret_cast<DrawingContext *>(_context);
	context->PopState();

	BPoint p(0, 0);
	context->ConvertToScreenForDrawing(&p);
	context->GetDrawingEngine()->SetDrawState(context->CurrentState(),
		(int32)p.x, (int32)p.y);
}