Dynamic text coordinates for DisplayPipeline.Draw2dText()

I don´t know why the code below is not working. I want to render text near the cursor, but it only works if position coordinates are fixed (hardcoded)

    def DrawViewportWires(self,args):
        color = System.Drawing.Color.Black
        pos = Rhino.UI.MouseCursor.Location
        pt2d = Rhino.Geometry.Point2d(pos.X,pos.Y)#hardcoding the coordinates works but not if they are dynamic like in this example.

its not possible?

P.S : wait! it works, it happen that the coordinates are relative to the entire screen, not to the viewport, so I was rendering the text “out of screen”