ich habe mal wieder ein Problem....
was ist hier dran falsch?
Code: Alles auswählen
********************************************************************************
#include "Gra.ch"
#include "Xbp.ch"
********************************************************************************
PROCEDURE Main()
LOCAL aSize := {}
LOCAL nI
LOCAL nY
LOCAL oPS
LOCAL oFontPr := XbpFont():new():create("12.Arial.bold")
// Presentation-Space für Standard-Drucker erzeugen
oPS := PrinterPS(,@aSize)
// Spooler aktivieren
oPS:device():startDoc()
// Grafische Ausgabe zum Spooler schicken
GraSetFont(oPs, oFontPR)
GraBox(oPs, {100,50}, aSize)
GraLine(oPs,{300,50},{300,aSize[2]})
GraLine(oPs,{1500,50},{1500,aSize[2]})
GraLine(oPs,{1800,50},{1800,aSize[2]})
FOR nI := 50 TO aSize[2] STEP 100
GraLine(oPs,{100,50+nI}, {aSize[1],50+nI})
NEXT
nY := aSize[2]
FOR nI := 1 TO 5
nY -= 100
GraStringAt(oPs,{100,nY},"Text1")
GraStringAt(oPs,{310,nY},"Text2")
NEXT
// Spoolen beenden
oPS:device():endDoc()
DestroyDevice( oPS )
RETURN
********************************************************************************
// Presentation-Space erzeugen und mit Device-Context
// für einen Drucker assoziieren. Die Einheit für das
// Koordinatensystem ist 1/10 Millimeter
//
********************************************************************************
FUNCTION PrinterPS( cPrinterObjectName ,aSize)
LOCAL oPS
LOCAL oDC := XbpPrinter():New()
oDC:Create( cPrinterObjectName )
oPS := XbpPresSpace():New()
aSize := oDC:paperSize()
// Größe des bedruckbaren Bereichs
aSize := { aSize[5] - aSize[3], aSize[6] - aSize[4] }
oPS:Create( oDC, aSize, GRA_PU_LOMETRIC )
RETURN oPS
********************************************************************************
PROCEDURE DestroyDevice( oPS )
LOCAL oDC := oPS:device()
IF oDC <> NIL
oPS:configure()
oDC:destroy()
ENDIF
RETURN
Wenn ich GraSetFont() rauslasse, dann ist die Schrift normal groß.