Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GdiPlusX - ImageCanvas
Message
De
04/12/2007 09:34:38
 
 
À
04/12/2007 08:03:53
Information générale
Forum:
Visual FoxPro
Catégorie:
VFPX/Sedna
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01271183
Message ID:
01273040
Vues:
73
>
>Sergio,
>
>About printing, have you tried to use the ToPrinter() method, using the available parameters ?
>
>Having the possibility to obtain a physical image or an image object, you can customize your reports the way you desire using the report engine !
>
>What exactly to you need for printing ?

Hi Cesar,
Oh Yes I did :)
I managed to do more/less what I wanted already using those and few more
API samples. I am very gratefull for this!

What I mean by tranparency of drawing to any surface could be illustrated
along this oop scenario... (which I am trying to achieve in some form)
local oGraphics,oCanvas
oGraphics=createobject('GdiPlusX2Any')

oGraphics.oCanvas = .CreateCanvas( _screen.hwnd ) 
or
oGraphics.oCanvas = .CreateCanvas( thisform.hwnd )
or
oGraphics.oCanvas = .CreateCanvas( thisform.ScrollableContainer.ImageCanvas )
or,or,or


*Then I can parse that whole oGraphics object all over the place
*and do drawing from where ever we want

procedure myCustomDrawings 
lparameters oGraphics
oGraphics.DrawString(,,,'VFPX Rocks!', ,,,,,    )
oGraphics.DrawThis()
oGraphics.DrawThat()
oGraphics.DoThis()
oGraphics.DoThat()

oGraphics.oCanvas.Refresh()  && or .draw() For all screen based surfaces
** state should be preserved

**And then finally but very important for printing 

oGraphics.oCanvas.ToPrinter(cPrinterName,'A3','LANDSCAPE',,,,,,,,,,,,,)
Now parameters (',,,,,,,,,,,,' part) by all means are not supposed to be binary API structures like in those scarry API samples but plain chars/numbers (as you people already did there in ToPrinter() method !).

So what I meant is to have another 10,15 parameters (or custom object oParams.Property1,2,,) that I can reliably set, parse and this way control all (or most important) aspects of printing.

Or that could also mean that there is some object/class entity which would take care of crunching binary/hex structures, communicating with printer via API interfaces and all other hard stuff, while average FoxHead can simply read/learn parameter specs instantiate some (printer control) object, set few properties and send his drawings to desired
printer.

Humble right ? <vbg>
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform