static void set_scale(void* _context, float scale) { DrawingContext* context = reinterpret_cast<DrawingContext *>(_context); context->CurrentState()->SetScale(scale); context->ResyncDrawState(); // Update the drawing engine draw state, since some stuff // (for example the pen size) needs to be recalculated. }
static void exit_state_change(void* _context) { DrawingContext* context = reinterpret_cast<DrawingContext *>(_context); context->ResyncDrawState(); }