Yes, tax would be paid on the net capital gain for the year. If negative, it can be carried forward to the next year, without limitations.
I don’t know if offsetting non-capital income with capital losses should be allowed. My intuition says no, but who knows.