Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Mike Gagnon
  Where is Mike Gagnon?
 Pointe Claire
 Canada
 Mike Gagnon
 To: Emerson Reed
  Where is Emerson Reed?
 Americana - SP
 Brazil
 Emerson Reed
 Tags
Subject: RE: _ReportListener and _GDIPlus ffc classes
Thread ID: 104376 Message ID: 104412 # Views: 3 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Wednesday, August 16, 2006 11:36:14 AM         
   


loRect = Createobject("gpRectangle" , 0, 0, .sharedPageWidth, .sharedPageHeight)

What are the values here? These are the bounderies of the rotation.

> 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
> http://weblogs.foxite.com/emersonreed
> http://thespoke.net/blogs/emersonreed




Mike Gagnon


ENTIRE THREAD

_ReportListener and _GDIPlus ffc classes Posted by Emerson Reed @ 8/15/2006 7:43:09 PM
RE: _ReportListener and _GDIPlus ffc classes Posted by Eric den Doop @ 8/16/2006 7:36:24 AM
RE: _ReportListener and _GDIPlus ffc classes Posted by Emerson Reed @ 8/16/2006 1:05:57 PM
RE: _ReportListener and _GDIPlus ffc classes Posted by Mike Gagnon @ 8/16/2006 11:36:14 AM
RE: _ReportListener and _GDIPlus ffc classes Posted by Emerson Reed @ 8/16/2006 1:09:01 PM
RE: _ReportListener and _GDIPlus ffc classes Posted by Mike Gagnon @ 8/16/2006 2:34:44 PM
RE: _ReportListener and _GDIPlus ffc classes Posted by Emerson Reed @ 8/30/2006 1:18:48 PM