[email protected] wrote:
> Author: manolo
> Date: 2010-03-01 00:05:10 -0800 (Mon, 01 Mar 2010)
> New Revision: 7180
> Log:
> Setting PageSize feature how it should be (2nd and hopefully last attempt)

Small proposal for improval: now, since we have both the size in
PS units (width and height) and the names of the formats, shouldn't
we better combine them in a struct? This would also keep the sizes
and names together...

> Modified: branches/branch-1.3-Fl_Printer/src/Fl_PS_Printer.cxx
> ===================================================================

something like (syntax not verified):

struct page_format {
   int width;
   int height;
   const char *name;
}

> +const int Fl_PSfile_Device::page_formats[NO_PAGE_FORMATS][2] = { // order of 
> enum Page_Format
> +// comes from appendix B of 5003.PPD_Spec_v4.3.pdf
>  // A* // index(Ai) = i
>  {2384, 3370}, //A0

would become (w/o comments):

   const struct pageformat Fl_PSfile_Device::page_formats[NO_PAGE_FORMATS] = {

   {2384, 3370, "A0" },
...

> +const char *Fl_PSfile_Device::page_format_names[NO_PAGE_FORMATS]={ // order 
> of enum Page_Format
> +// comes from appendix B of 5003.PPD_Spec_v4.3.pdf
> +"A0",

would be included in the above table. And so on...

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to