Draw and save window without showing

Draw and save window without showing

Postby Marc Vanzegbroeck » Fri Jun 22, 2012 11:52 am

Hi,

For a documention-program that create excel-files with drawings I open a window, draw lines en text on in and save it to a bmp-file to create bmp-files.
The program show it on the screen. Is it possible to do this without showing it? Sometimes, I want to create more then 10000 BMP-files, and I think showing them slow down the generation.

I use now something like this for each file in a loop:
Code: Select all  Expand view
  DEFINE WINDOW sWnd TITLE 'SCHEMATIC : '+infoall->filenaam FROM 0,0 TO 416,640 PIXEL BORDER NONE NOSYSMENU NOICONIZE NOCAPTION

   sWnd:bPainted  := { || _toonds(vnr,vnrvar)}

   ACTIVATE WINDOW sWnd

   sWnd:SaveToBmp( alltrim(infoall->voorbeeld) )
   sWnd:end()
 


The function _toonds(vnr,vnrvar) drow text, lines, polygons,... on the window.

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Draw and save window without showing

Postby Antonio Linares » Fri Jun 22, 2012 1:46 pm

Marc,

You may not need to create a window everytime, and simply reuse the existing one, so the whole process will speed up :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Draw and save window without showing

Postby Marc Vanzegbroeck » Fri Jun 22, 2012 3:34 pm

Antonio,

How can I clear the content of the Window?

Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Draw and save window without showing

Postby Marc Vanzegbroeck » Tue Jun 26, 2012 12:21 pm

Antonio,

Can you tell me how to clear the window after drawing some lines an solids and saving it?

Thanks,
Marc
Regards,
Marc

FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Re: Draw and save window without showing

Postby Antonio Linares » Tue Jun 26, 2012 1:47 pm

Marc,

oWnd:Refresh()

will clear it and it will be repainted :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 98 guests