I'm not qualified to answer but I think a rafter is designed as a simple beam with its horizontal span being used, not its diagonal run. I believe you then use the formulas for columns with axial and bending loads when it becomes a truss.

(I'm kinda piggybacking on your post hoping to get an answer myself smile )