mirror of https://github.com/fltk/fltk
Fix for Two compiler warnings (#615) - cont'd
The Page_Format and Page_Layout enums have been conceived for them to be combinable into a single int value.
This commit is contained in:
parent
6518e2d1f1
commit
31327cd649
|
@ -673,7 +673,8 @@ int Fl_PostScript_Graphics_Driver::start_postscript (int pagecount,
|
|||
left_margin = 12;
|
||||
top_margin = 12;
|
||||
}
|
||||
page_format_ = (enum Fl_Paged_Device::Page_Format)((int)format | (int)layout);
|
||||
// combine the format and layout information
|
||||
page_format_ = ((int)format | (int)layout);
|
||||
if (layout & Fl_Paged_Device::LANDSCAPE){
|
||||
ph_ = Fl_Paged_Device::page_formats[format].width;
|
||||
pw_ = Fl_Paged_Device::page_formats[format].height;
|
||||
|
@ -1491,7 +1492,8 @@ int Fl_PostScript_Graphics_Driver::start_postscript(int pagecount,
|
|||
left_margin = 12;
|
||||
top_margin = 12;
|
||||
}
|
||||
page_format_ = (enum Fl_Paged_Device::Page_Format)(format | layout);
|
||||
// combine the format and layout information
|
||||
page_format_ = ((int)format | (int)layout);
|
||||
if (layout & Fl_Paged_Device::LANDSCAPE){
|
||||
ph_ = Fl_Paged_Device::page_formats[format].width;
|
||||
pw_ = Fl_Paged_Device::page_formats[format].height;
|
||||
|
|
|
@ -45,7 +45,7 @@ class Fl_PostScript_Graphics_Driver : public Fl_Cairo_Graphics_Driver {
|
|||
public:
|
||||
FILE *output;
|
||||
Fl_PostScript_Close_Command close_cmd_;
|
||||
enum Fl_Paged_Device::Page_Format page_format_;
|
||||
int page_format_;
|
||||
char *ps_filename_;
|
||||
int nPages;
|
||||
double pw_, ph_;
|
||||
|
@ -158,7 +158,7 @@ public:
|
|||
void transformed_draw(const char* s, int n, double x, double y); //precise text placing
|
||||
//void transformed_draw(const char* s, double x, double y);
|
||||
|
||||
enum Fl_Paged_Device::Page_Format page_format_;
|
||||
int page_format_;
|
||||
char *ps_filename_;
|
||||
|
||||
void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;}
|
||||
|
|
Loading…
Reference in New Issue