GlobaldrawSwitchdrawSwitchfunction drawSwitch() Draws the switch on the canvas based on its type and state.