I use Finale and just wanted to know.
Anyway,
First thing I want to talk about is a "Melodic Inversion".
A melodic inversion is what happens when a theme or motif appears but the direction of the intervals are moving in the opposite direction. The exact quality of the intervals may or may note be preserved in which case the inversion would be called a mirror inversion.
I will use your fugue theme as the example.
In your fugue theme you start on the note D and ascend a whole step to E and then another whole step up to F# then ascending a half step up to G then descending a half step back down to F#.
If you were to invert this part of the theme you would start on the note D and instead of ascending a whole step to E youwould descend down a whole step to C natural then descend another whole step to Bb then descend a half step down to A before ascending to a half step to Bb.
D-E-F#-G-A (Your original first two beats)
D-C-Bb-A-Bb (Inversion with quality of intervals preserved)
D-C#-B-A-B (Inversion with quality of intervals not preserved keeping the theme in the key of D Major)
Make sense? If so I would like for you to to give me 3 inversions of your entire fugue theme. The first inversion must preserve the quality of the intervals in the inversion. The second, should not preserve the quality and therefore the inversion would remain in the key of D Major. The third inversion should have moments where the quality of the intervals are sometime preserved and moments when they are not.