|
From: Shigeharu T. <sh...@ie...> - 2008-03-14 02:37:41
|
shige 03/14 2008
----------------
I tested new features "with circles" of gnuplot-4.3.
(1) I think the inner area and the border of each circle should
be drawn at the same time, but the gnuplot of the current version
draw inner areas of all circles firstly, and draw borders
separately such that all borders appear on top of screen.
I think it may not be match for "set object" and it may also be
done by the following:
plot 'data' with circles lt 1 fs solid noborder, \
'' with circles fs empty border -1
To draw them at same time for each circle, we must do on the
current gnuplot:
plot for [i=1:N] 'data' every ::(i-1)::(i-1) with circles \
lt 1 fs solid border -1
By the following patch gnuplot will draw the inner area and the
borders of each circle at the same time.
----- From Here -----
--- src/graphics.c.ORG Mon Feb 25 13:43:35 2008
+++ src/graphics.c Fri Mar 14 10:44:01 2008
@@ -3805,7 +3805,12 @@
double radius;
struct fill_style_type *fillstyle = &plot->fill_properties;
int style = style_from_fill(fillstyle);
+ int withborder=0;
+ if (fillstyle->border_linetype != LT_NODRAW
+ && fillstyle->border_linetype != LT_UNDEFINED){
+ withborder=1;
+ }
for (i = 0; i < plot->p_count; i++) {
if (plot->points[i].type == INRANGE) {
x = map_x(plot->points[i].x);
@@ -3816,26 +3821,12 @@
if ((plot->lp_properties.pm3d_color.value < 0.0)
&& (plot->lp_properties.pm3d_color.type == TC_RGB))
set_rgbcolor( plot->points[i].yhigh);
-
+ if (withborder) (*term->linetype)(plot->lp_properties.l_type);
do_arc(x,y, radius, 0., 360., style);
+ if (withborder) (*term->linetype)(fillstyle->border_linetype);
+ do_arc(x,y, radius, 0., 360., 0);
}
}
-
- /* Retrace the border if the style requests it */
- if (fillstyle->border_linetype != LT_NODRAW
- && fillstyle->border_linetype != LT_UNDEFINED) {
- (*term->linetype)(fillstyle->border_linetype);
-
- for (i = 0; i < plot->p_count; i++) {
- if (plot->points[i].type == INRANGE) {
- x = map_x(plot->points[i].x);
- y = map_y(plot->points[i].y);
- radius = x - map_x(plot->points[i].xlow);
- do_arc(x,y, radius, 0., 360., 0);
- }
- }
- }
-
}
#endif
----- To Here -----
(2) The clipping of circle borders may work correctly by the graph
boundary, but inner areas of them may not clipped. But I do not
know how the problem will be fixed.
+========================================================+
Shigeharu TAKENO NIigata Institute of Technology
kashiwazaki,Niigata 945-1195 JAPAN
sh...@ie... TEL(&FAX): +81-257-22-8161
+========================================================+
|