| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f0fe7ef commit 7b178ed
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,9 @@ | |||
| 1 | + 2017-05-21 Bastian Maerkisch <bmaerkisch@web.de> | ||
| 2 | + | ||
| 3 | + * term/win.trm src/win/wgraph.c src/win/wgdiplus.cpp | ||
| 4 | + src/win/wd2d.cpp src/win/wgnuplib.h: | ||
| 5 | + Pointscale option for the windows terminal. | ||
| 6 | + | ||
| 1 | 7 | 2017-05-20 Bastian Maerkisch <bmaerkisch@web.de> | |
| 2 | 8 | ||
| 3 | 9 | * src/win/winmain.c (ConsoleHandler) src/plot.c|h (terminate_flag) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: wd2d.cpp,v 1.5 2017-05-13 11:49:29 markisch Exp $ | ||
| 2 | + * $Id: wd2d.cpp,v 1.6 2017-05-21 08:43:44 markisch Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* | |
@@ -1452,8 +1452,8 @@ drawgraph_d2d(LPGW lpgw, HWND hwnd, LPRECT rect) | |||
| 1452 | 1452 | case W_pointsize: | |
| 1453 | 1453 | if (curptr->x > 0) { | |
| 1454 | 1454 | double pointsize = curptr->x / 100.0; | |
| 1455 | - htic = pointsize * MulDiv(lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 1456 | - vtic = pointsize * MulDiv(lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 1455 | + htic = MulDiv(pointsize * lpgw->pointscale * lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 1456 | + vtic = MulDiv(pointsize * lpgw->pointscale * lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 1457 | 1457 | } else { | |
| 1458 | 1458 | htic = vtic = 0; | |
| 1459 | 1459 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: wgdiplus.cpp,v 1.58 2017-05-13 11:49:29 markisch Exp $ | ||
| 2 | + * $Id: wgdiplus.cpp,v 1.59 2017-05-21 08:43:44 markisch Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* | |
@@ -1275,8 +1275,8 @@ do_draw_gdiplus(LPGW lpgw, Graphics &graphics, LPRECT rect, enum draw_target tar | |||
| 1275 | 1275 | case W_pointsize: | |
| 1276 | 1276 | if (curptr->x > 0) { | |
| 1277 | 1277 | double pointsize = curptr->x / 100.0; | |
| 1278 | - htic = MulDiv(pointsize * lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 1279 | - vtic = MulDiv(pointsize * lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 1278 | + htic = MulDiv(pointsize * lpgw->pointscale * lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 1279 | + vtic = MulDiv(pointsize * lpgw->pointscale * lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 1280 | 1280 | } else { | |
| 1281 | 1281 | htic = vtic = 0; | |
| 1282 | 1282 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: wgnuplib.h,v 1.88 2017-05-13 11:49:29 markisch Exp $ | ||
| 2 | + * $Id: wgnuplib.h,v 1.89 2017-05-21 08:43:44 markisch Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - win/wgnuplib.h */ | |
@@ -382,6 +382,7 @@ typedef struct tagGW { | |||
| 382 | 382 | double org_pointsize; /* Original Pointsize */ | |
| 383 | 383 | int encoding_error; /* last unknown encoding */ | |
| 384 | 384 | double fontscale; /* scale factor for font sizes */ | |
| 385 | + double pointscale; /* scale factor for point sizes */ | ||
| 385 | 386 | enum set_encoding_id encoding; /* text encoding */ | |
| 386 | 387 | LONG tmHeight; /* text metric of current font */ | |
| 387 | 388 | LONG tmAscent; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* | |
| 2 | - * $Id: wgraph.c,v 1.254 2017-05-15 14:58:46 markisch Exp $ | ||
| 2 | + * $Id: wgraph.c,v 1.255 2017-05-21 08:43:44 markisch Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - win/wgraph.c */ | |
@@ -385,6 +385,7 @@ GraphInitStruct(LPGW lpgw) | |||
| 385 | 385 | lpgw->sampling = 1; | |
| 386 | 386 | lpgw->fontscale = 1.; | |
| 387 | 387 | lpgw->linewidth = 1.; | |
| 388 | + lpgw->pointscale = 1.; | ||
| 388 | 389 | lpgw->color = TRUE; | |
| 389 | 390 | lpgw->dashed = FALSE; | |
| 390 | 391 | lpgw->IniSection = TEXT("WGNUPLOT"); | |
@@ -2557,8 +2558,8 @@ drawgraph(LPGW lpgw, HDC hdc, LPRECT rect) | |||
| 2557 | 2558 | case W_pointsize: | |
| 2558 | 2559 | if (curptr->x > 0) { | |
| 2559 | 2560 | double pointsize = curptr->x / 100.0; | |
| 2560 | - htic = MulDiv(pointsize * lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 2561 | - vtic = MulDiv(pointsize * lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 2561 | + htic = MulDiv(pointsize * lpgw->pointscale * lpgw->htic, rr - rl, lpgw->xmax) + 1; | ||
| 2562 | + vtic = MulDiv(pointsize * lpgw->pointscale * lpgw->vtic, rb - rt, lpgw->ymax) + 1; | ||
| 2562 | 2563 | } else { | |
| 2563 | 2564 | htic = vtic = 0; | |
| 2564 | 2565 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,5 @@ | |||
| 1 | 1 | /* Hello, Emacs, this is -*-C-*- | |
| 2 | - * $Id: win.trm,v 1.142 2017-05-14 14:40:24 markisch Exp $ | ||
| 2 | + * $Id: win.trm,v 1.143 2017-05-21 08:43:44 markisch Exp $ | ||
| 3 | 3 | */ | |
| 4 | 4 | ||
| 5 | 5 | /* GNUPLOT - win.trm */ | |
@@ -128,8 +128,9 @@ TERM_PUBLIC void WIN_modify_plots __PROTO((unsigned int operations, int plotno)) | |||
| 128 | 128 | ||
| 129 | 129 | enum WIN_id { WIN_DEFAULT, WIN_MONOCHROME, WIN_COLOR, WIN_GTITLE, | |
| 130 | 130 | WIN_ENHANCED, WIN_NOENHANCED, WIN_FONT, WIN_SIZE, WIN_WSIZE, | |
| 131 | - WIN_POSITION, WIN_CLOSE, WIN_BACKGROUND, WIN_FONTSCALE, | ||
| 132 | - WIN_LINEWIDTH, WIN_SOLID, WIN_DASHED, WIN_ROUND, WIN_BUTT, | ||
| 131 | + WIN_POSITION, WIN_CLOSE, WIN_BACKGROUND, | ||
| 132 | + WIN_FONTSCALE, WIN_LINEWIDTH, WIN_POINTSCALE, | ||
| 133 | + WIN_SOLID, WIN_DASHED, WIN_ROUND, WIN_BUTT, | ||
| 133 | 134 | WIN_DOCKED, WIN_STANDALONE, WIN_LAYOUT, | |
| 134 | 135 | WIN_OTHER }; | |
| 135 | 136 | ||
@@ -150,6 +151,8 @@ static struct gen_table WIN_opts[] = | |||
| 150 | 151 | { "fonts$cale", WIN_FONTSCALE }, | |
| 151 | 152 | { "linewidth", WIN_LINEWIDTH }, | |
| 152 | 153 | { "lw", WIN_LINEWIDTH }, | |
| 154 | + { "pointscale", WIN_POINTSCALE}, | ||
| 155 | + { "ps", WIN_POINTSCALE}, | ||
| 153 | 156 | { "ti$tle", WIN_GTITLE }, | |
| 154 | 157 | { "siz$e", WIN_SIZE }, | |
| 155 | 158 | { "ws$ize", WIN_WSIZE }, | |
@@ -223,9 +226,11 @@ WIN_options() | |||
| 223 | 226 | TBOOLEAN set_position = FALSE, set_number = FALSE; | |
| 224 | 227 | TBOOLEAN set_wsize = FALSE, set_rounded = FALSE; | |
| 225 | 228 | TBOOLEAN set_docked = FALSE, set_layout = FALSE; | |
| 229 | + TBOOLEAN set_pointscale = FALSE; | ||
| 226 | 230 | TBOOLEAN color, dashed, rounded; | |
| 227 | 231 | COLORREF background; | |
| 228 | 232 | double fontscale, linewidth; | |
| 233 | + double pointscale; | ||
| 229 | 234 | int win_x = 0; | |
| 230 | 235 | int win_y = 0; | |
| 231 | 236 | int win_width = 0; | |
@@ -248,10 +253,10 @@ WIN_options() | |||
| 248 | 253 | strcpy(fontname, WIN_inifontname); | |
| 249 | 254 | #endif | |
| 250 | 255 | fontsize = WIN_inifontsize; | |
| 251 | - fontscale = linewidth = 1; | ||
| 256 | + fontscale = linewidth = pointscale = 1; | ||
| 252 | 257 | set_color = set_dashed = TRUE; | |
| 253 | 258 | set_font = set_fontsize = TRUE; | |
| 254 | - set_fontscale = set_linewidth = TRUE; | ||
| 259 | + set_fontscale = set_linewidth = set_pointscale = TRUE; | ||
| 255 | 260 | set_rounded = TRUE; | |
| 256 | 261 | c_token++; | |
| 257 | 262 | break; | |
@@ -299,6 +304,12 @@ WIN_options() | |||
| 299 | 304 | set_linewidth = TRUE; | |
| 300 | 305 | break; | |
| 301 | 306 | } | |
| 307 | + case WIN_POINTSCALE: | ||
| 308 | + c_token++; | ||
| 309 | + pointscale = real_expression(); | ||
| 310 | + if (pointscale <= 0.0) pointscale = 1.; | ||
| 311 | + set_pointscale = TRUE; | ||
| 312 | + break; | ||
| 302 | 313 | case WIN_SOLID: | |
| 303 | 314 | c_token++; | |
| 304 | 315 | dashed = FALSE; | |
@@ -486,6 +497,8 @@ WIN_options() | |||
| 486 | 497 | graphwin->fontscale = fontscale; | |
| 487 | 498 | if (set_linewidth) | |
| 488 | 499 | graphwin->linewidth = linewidth; | |
| 500 | + if (set_pointscale) | ||
| 501 | + graphwin->pointscale = pointscale; | ||
| 489 | 502 | if (set_size || set_wsize) { | |
| 490 | 503 | graphwin->Size.x = win_width; | |
| 491 | 504 | graphwin->Size.y = win_height; | |
@@ -618,6 +631,10 @@ WIN_update_options() | |||
| 618 | 631 | sprintf(&(term_options[strlen(term_options)]), | |
| 619 | 632 | " linewidth %.1f", graphwin->linewidth); | |
| 620 | 633 | ||
| 634 | + if (graphwin->pointscale != 1) | ||
| 635 | + sprintf(&(term_options[strlen(term_options)]), | ||
| 636 | + " pointscale %.1f", graphwin->pointscale); | ||
| 637 | + | ||
| 621 | 638 | if (!graphwin->bDocked) { | |
| 622 | 639 | if (graphwin->Canvas.x != 0) | |
| 623 | 640 | sprintf(&(term_options[strlen(term_options)]), | |
@@ -1130,7 +1147,7 @@ TERM_TABLE_START(win_driver) | |||
| 1130 | 1147 | WIN_justify_text, WIN_point, do_arrow, WIN_set_font, | |
| 1131 | 1148 | WIN_set_pointsize, | |
| 1132 | 1149 | TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_ALPHA_CHANNEL|TERM_CAN_DASH | |
| 1133 | - |TERM_LINEWIDTH|TERM_FONTSCALE|TERM_ENHANCED_TEXT, | ||
| 1150 | + |TERM_LINEWIDTH|TERM_FONTSCALE|TERM_POINTSCALE|TERM_ENHANCED_TEXT, | ||
| 1134 | 1151 | WIN_text /* suspend */ , WIN_resume, | |
| 1135 | 1152 | WIN_boxfill, WIN_linewidth, | |
| 1136 | 1153 | #ifdef USE_MOUSE | |
@@ -1183,6 +1200,7 @@ START_HELP(windows) | |||
| 1183 | 1200 | " {font <fontspec>}", | |
| 1184 | 1201 | " {fontscale <scale>}", | |
| 1185 | 1202 | " {linewdith <scale>}", | |
| 1203 | + " {pointscale <scale>}", | ||
| 1186 | 1204 | " {background <rgb color>}", | |
| 1187 | 1205 | " {title \"Plot Window Title\"}", | |
| 1188 | 1206 | " {{size | wsize} <width>,<height>}", | |
@@ -1206,8 +1224,8 @@ START_HELP(windows) | |||
| 1206 | 1224 | " Note that in previous versions of gnuplot the `font` statement could be left", | |
| 1207 | 1225 | " out and <fontsize> could be given as a number without double quotes. This is", | |
| 1208 | 1226 | " no longer supported.", | |
| 1209 | - " `linewidth` and `fontscale` can be used to scale the width of lines and", | ||
| 1210 | - " the size of text.", | ||
| 1227 | + " `linewidth`, `fontscale`, `pointscale` can be used to scale the width of", | ||
| 1228 | + " lines, the size of text, or the size of the point symbols.", | ||
| 1211 | 1229 | " `title` changes the title of the graph window.", | |
| 1212 | 1230 | " `size` defines the width and height of the window's drawing area in pixels,", | |
| 1213 | 1231 | " `wsize` defines the actual size of the window itself and `position` defines", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments