Bonsoir à tous,
Petite question concernant l'impression. Y'a - t - il moyen de faire un aperçu avant de lancer l'impression ?
Je n'ai pas d'imprimante chez moi et je souhaiterai voir ce que donne concrètement.
Merci d'avance.
Cordialement,
Cls
Aperçu avant impression
Vu sur CodeArchiv
Code : Tout sélectionner
; English forum:
; Author: Unknown (updated for PB4.00 by blbltheworm)
; Date: 14. March 2003
; OS: Windows
; Demo: Yes
Declare ycm(x.f)
Declare xcm(x.f)
Procedure xcm(x.f)
result = x * (675/ 21)
ProcedureReturn result
EndProcedure
Procedure ycm(x.f)
result = x * (467 / 29.7)
ProcedureReturn result
EndProcedure
Procedure WindowCallback(WindowID, Message, lParam, wParam)
If Message = #WM_PAINT
StartDrawing(WindowOutput(0))
DrawImage(ImageID(0), 50, 50)
StopDrawing()
EndIf
ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure
If OpenWindow(0, 100, 100, 600, 500, "PureBasic - Image", #PB_Window_SystemMenu)
Gosub CreateImage
SetWindowCallback(@WindowCallback())
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow ; If the user has pressed on the close button
EndIf
End
CreateImage :
CreateImage(0, 657, 467) ; this is 1/10 of a 600dpi page
LoadFont(0, "Arial", ycm(1))
LoadFont(1, "Arial", ycm(0.5))
If StartDrawing(ImageOutput(0))
Box(0, 0, 657, 467,RGB(255,255,255))
DrawingFont(FontID(0))
DrawText(xcm(1), ycm(1),"PureBasic Printer Test")
DrawingFont(FontID(1))
DrawText(xcm(5), ycm(16),"PureBasic Printer Test 2")
StopDrawing()
ResizeImage(0,500,400)
EndIf
Return
http://purebasic.developpez.com/
Je ne réponds à aucune question technique en PV, utilisez le forum, il est fait pour ça, et la réponse peut profiter à tous.
Je ne réponds à aucune question technique en PV, utilisez le forum, il est fait pour ça, et la réponse peut profiter à tous.