Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
_ReportListener and _GDIPlus ffc classes
Message
De
15/08/2006 12:55:34
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
_ReportListener and _GDIPlus ffc classes
Divers
Thread ID:
01145650
Message ID:
01145650
Vues:
58
I created a class derived from _ReportListener and trying to add a rotated text using GPGraphics of _GDIPlus class.
See the following code:
Define Class MyReportListener As _ReportListener Of ("ffc\_ReportListener.vcx")
   NewPage = .T.
   oGDIGraphics = Null
   Function BeforeReport
      DoDefault()
      This.oGDIGraphics = Newobject('GPGraphics', 'ffc\_GDIPlus.vcx')
   Endfunc
   Function BeforeBand(nBandObjCode, nFRXRecNo)
      #Define FRX_OBJCOD_PAGEHEADER 1
      If nBandObjCode==FRX_OBJCOD_PAGEHEADER
         With This
            .NewPage = .T.
            If Not .IsSuccessor
               .SharedGDIPlusGraphics = .GDIPlusGraphics
            Endif
            .oGDIGraphics.SetHandle(.SharedGDIPlusGraphics)
         Endwith
      Endif
      DoDefault(nBandObjCode, nFRXRecNo)
   Endfunc
   Procedure Render(nFRXRecNo,;
         nLeft,nTop,nWidth,nHeight,;
         nObjectContinuationType, ;
         cContentsToBeRendered, GDIPlusImage)
      With This
         If .NewPage
            Local loRect, loFont
            loRect = Createobject("gpRectangle" , 0, 0, .sharedPageWidth, .sharedPageHeight)
            loFont = Createobject("gpfont","Verdana",48)
            .oGDIGraphics.TranslateTransform(.sharedPageWidth/2,.sharedPageHeight/2)
            .oGDIGraphics.RotateTransform(-45)
            .oGDIGraphics.DrawstringA("Rotated Text",loFont,loRect)
            .NewPage = .F.
         Endif
      Endwith
      DoDefault(nFRXRecNo,;
         nLeft,nTop,nWidth,nHeight,;
         nObjectContinuationType, ;
         cContentsToBeRendered, GDIPlusImage)
   Endproc
Enddefine
The problem is that the text doesn't appear and the entire report page is rotated instead of show only text rotated in a "normal" report page.

Someone can help me to solve this?
Emerson Santon Reed
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform