|
From: Tatsuro M. <tma...@ya...> - 2010-02-08 02:37:04
|
Hello Thank you for your efforts. It will be quite nice!! the windows terminal has the options of size and position. I have applied your patch and upload binary on the web. http://www.tatsuromatsuoka.com/gnuplot/Eng/winbin/ sizedefines the width and height of the window in pixel and positionthe origin of the window i.e.the position of the top left corner on the screen (again in pixel).Both these options override the default settings from the WGNUPLOT.INI file (see below). gnuplot> set term win size 1024, 768 position 200, 200 Terminal type set to 'windows' Options are 'color noenhanced font "Arial, 10"' gnuplot> plot sin(x) However size are small compared to that expected (t) and position option was not changed. Regards Tatsuro --- Benjamin Lindner wrote: > Hello, > > I'd like to propose the addition of a 'size' and 'position' option > to the windows terminal. > This would fit very nicely in the possibility to position the > plotting figure from octave on screen when using the gnuplot plotting > backend. > > I attached a patch which accomplishes it. > Comments? > > benjamin > > add size option to windows terminal > > diff --git a/term/win.trm b/term/win.trm > --- a/term/win.trm > +++ b/term/win.trm > @@ -125,7 +125,8 @@ > /* Interface routines - create list of actions for Windows */ > > enum WIN_id { WIN_DEFAULT, WIN_MONOCHROME, WIN_COLOR, WIN_GTITLE, > - WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_OTHER }; > + WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE, > + WIN_POSITION, WIN_OTHER }; > > static struct gen_table WIN_opts[] = > { > @@ -137,6 +138,8 @@ > { "enh$anced", WIN_ENHANCED }, > { "font", WIN_FONT }, > { "ti$tle", WIN_GTITLE }, > + { "siz$e", WIN_SIZE }, > + { "pos$ition", WIN_SIZE }, > { NULL, WIN_OTHER } > }; > > @@ -196,6 +199,42 @@ > term->flags |= TERM_MONOCHROME; > c_token++; > break; > + case WIN_SIZE: > + { > + c_token++; > + int win_width = 0; > + int win_height = 0; > + if (END_OF_COMMAND) > + int_error(c_token,"size requires 'width,heigth'"); > + win_width = real_expression(); > + if (!equals(c_token++,",")) > + int_error(c_token,"size requires 'width,heigth'"); > + win_height = real_expression(); > + if (win_width < 1 || win_height < 1) > + int_error(c_token, "size is out of range"); > + > + graphwin.Size.x = win_width; > + graphwin.Size.y = win_height + graphwin.statuslineheight; > + break; > + } > + case WIN_POSITION: > + { > + c_token++; > + int win_x = 0; > + int win_y = 0; > + if (END_OF_COMMAND) > + int_error(c_token,"position requires 'x,y'"); > + win_x = real_expression(); > + if (!equals(c_token++,",")) > + int_error(c_token,"position requires 'x,y'"); > + win_y = real_expression(); > + if (win_x < 1 || win_y < 1) > + int_error(c_token, "position is out of range"); > + > + graphwin.Origin.x = win_x; > + graphwin.Origin.y = win_y; > + break; > + } > case WIN_COLOR: > graphwin.color = TRUE; > term->flags &= ~TERM_MONOCHROME; > @@ -949,12 +988,18 @@ > " {enhanced | noenhanced}", > " {{font} \"fontname{,fontsize}\" {<fontsize>}}", > " {title \"Plot Window Title\"}", > +" {size <width>,<height>}", > +" {position <x>,<y>}", > "", > " where `color` and `monochrome` select colored or mono output,", > " `enhanced` enables enhanced text mode features (subscripts,", > " superscripts and mixed fonts). See `enhanced` for more information.", > " `\"<fontname>\"` is the name of a valid Windows font, and `<fontsize>`", > " is the size of the font in points.", > +" `size` defines the width and height of the window in pixel and `position`", > +" the origin of the window i.e. the position of the top left corner on the", > +" screen (again in pixel). Both these options override the default settings", > +" from the WGNUPLOT.INI file (see below).", > "", > " Other options may be set with the graph-menu or the initialization file.", > "", > > ------------------------------------------------------------------------------ > The Planet: dedicated and managed hosting, cloud storage, colocation > Stay online with enterprise data centers and the best network in the business > Choose flexible plans and management services without long-term contracts > Personal 24x7 support from experience hosting pros just a phone call away. > http://p.sf.net/sfu/theplanet-com> _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -------------------------------------- VANCOUVER 2010 Olympic News [Yahoo! Sports/sportsnavi] http://pr.mail.yahoo.co.jp/olympic/ |