lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

31/12/2010 18:16, David Manura wrote:
2010/12/31 Hakki Dogusan<dogusanh@tr.net>:
- It is a reporting tool

A synopsis makes the purpose more apparent:

   -- based on test3.lua
   require"lprintprocessor"
   local pp1=wxPrintProcessor()
   pp1:SetTextForeground(124,68,42)
   pp1:FontSetFaceName('Times New Roman')
   pp1:FontSetPointSize(25)
   pp1:FontSetWeight(pp1.wxFONTWEIGHT_BOLD)
   pp1:DrawLabel('wxWidgets', 100, 100, 1500, 50)
   pp1:Preview()

So, it's a graphical device context (GDI DC) for printers, along with
printing specific functions like print preview.


Yes! You know, if you used to use something daily, then it does not need explanation ;)

- Mimics wxDC's API
  (http://docs.wxwidgets.org/stable/wx_wxdc.html#wxdc)
  (with a few addition/elimination)
- Uses Command Pattern
  (http://en.wikipedia.org/wiki/Command_pattern)
  stores drawing methods to be executed at a later
  -preview/print- time
- You need to write code to generate something :)


--
Regards,
Hakki Dogusan
http://www.dynaset.org/dogusanh/