Hello
I have tested using the previous graphic.c (Revision 1.305 - Fri Jun 26 06:41:34 2009) with cvs trees
dated at 2009-07-09.
In this case the Petr's test
set title 'HELLO' tc rgb "blue"
set object 1 rect from 0,0 to 5,5 fc rgb "blue"
set object 2 rect from -6,-6 to -1,-1 fc lt 3
plot x
=> title and both rectangles are blue.
This shows that chage of graphic.c between Revision 1.305 (1.306) and 1.307 gives strange behaviors
object fill color for windows terminal.
(Differeces in revsion 1.305 and 1.306 are only those in comments. )
Difference between graphic of revision 1.306 and that of 1.307 is shown as a refrence
Perhaps code simplification gives strange behavior dor windows term.
$ diff -ur graphics.1.306.c graphics.1.307.c
--- graphics.1.306.c 2009-07-10 13:41:03 +0900
+++ graphics.1.307.c 2009-07-10 13:31:53 +0900
@@ -1,5 +1,5 @@
#ifndef lint
-static char *RCSid() { return RCSid("$Id: graphics.c,v 1.306 2009/07/05 00:09:32 sfeam Exp $"); }
+static char *RCSid() { return RCSid("$Id: graphics.c,v 1.307 2009/07/05 07:11:50 sfeam Exp $"); }
#endif
/* GNUPLOT - graphics.c */
@@ -126,7 +126,6 @@
static void fill_missing_corners __PROTO((gpiPoint *corners, int *points, int exit, int reentry, int
updown, int leftri
ght));
static void fill_between __PROTO((double, double, double, double, double, double, double, double,
struct curve_points *
));
static TBOOLEAN bound_intersect __PROTO((struct coordinate GPHUGE * points, int i, double *ex, double
*ey, filledcurves
_opts *filledcurves_options));
-static gpiPoint *fill_corners __PROTO((int, unsigned int, unsigned int, unsigned int, unsigned int));
static void plot_vectors __PROTO((struct curve_points * plot));
static void plot_f_bars __PROTO((struct curve_points * plot));
static void plot_c_bars __PROTO((struct curve_points * plot));
@@ -3665,11 +3664,7 @@
}
style = style_from_fill(&plot->fill_properties);
-
- if (plot->lp_properties.use_palette && t->filled_polygon) {
- (*t->filled_polygon)(4, fill_corners(style,x,y,w,h));
- } else
- (*t->fillbox) (style, x, y, w, h);
+ (*t->fillbox) (style, x, y, w, h);
if (!need_fill_border(&plot->fill_properties))
break;
@@ -4107,11 +4102,7 @@
if (style == FS_EMPTY)
style = FS_OPAQUE;
-
- if (plot->lp_properties.use_palette && t->filled_polygon)
- (*t->filled_polygon)(4, fill_corners(style,x,y,w,h));
- else
- (*t->fillbox)(style, x, y, w, h);
+ (*t->fillbox)(style, x, y, w, h);
if (style_from_fill(&plot->fill_properties) != FS_EMPTY)
need_fill_border(&plot->fill_properties);
@@ -5352,12 +5343,8 @@
} else
#endif
if (w > 0) { /* All other plot types with fill */
- if (style != FS_EMPTY) {
- if (this_plot->lp_properties.use_palette && t->filled_polygon)
- (*t->filled_polygon)(4, fill_corners(style,x,y,w,h));
- else
- (*t->fillbox)(style,x,y,w,h);
- }
+ if (style != FS_EMPTY)
+ (*t->fillbox)(style,x,y,w,h);
/* need_fill_border will set the border linetype, but candlesticks don't want it */
if ((this_plot->plot_style == CANDLESTICKS && fs->border_color.type == TC_LT
@@ -5416,29 +5403,6 @@
clip_area = clip_save;
}
-
-/*
- * The equivalent of t->fillbox() except that it uses PM3D colors instead
- * of plain line types
- */
-static gpiPoint *
-fill_corners(int style, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
-{
- static gpiPoint corner[4];
-
- corner[0].style = style;
- corner[0].x = x;
- corner[0].y = y;
- corner[1].x = x;
- corner[1].y = y+h;
- corner[2].x = x+w;
- corner[2].y = y+h;
- corner[3].x = x+w;
- corner[3].y = y;
-
- return corner;
-}
-
#ifdef EAM_OBJECTS
void
do_rectangle( int dimensions, t_object *this_object, int style )
@@ -5540,12 +5504,8 @@
term_apply_lp_properties(&lpstyle);
style = style_from_fill(fillstyle);
- if (style != FS_EMPTY) {
- if (lpstyle.use_palette && term->filled_polygon) {
- (*term->filled_polygon)(4, fill_corners(style,x,y,w,h));
- } else if (term->fillbox)
+ if (style != FS_EMPTY && term->fillbox)
(*term->fillbox) (style, x, y, w, h);
- }
if (need_fill_border(fillstyle)) {
(*term->move) (x, y);
Regards
Tatsuro
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/