Rule 715.4.a
If Damage is replaced or reduced by any means, the replacing or reducing action will include the Bonus Damage in the total damage when determining how much damage is to be dealt. Example: A unit has prevent 3 applied to them. The unit is located at the Void Gate battlefield. An opponent targets the unit with Hextech Ray. Hextech Ray deals 4 damage to the unit, including the Bonus Damage from Void Gate, which the prevent effect will prevent 3 of. The unit takes 1 damage.