Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 274693
Collapse All | Expand All

(-)gnuplot42/src/pm3d.c (-20 / +9 lines)
Lines 65-71 static quadrangle* quadrangles = (quadra Link Here
65
65
66
/* Internal prototypes for this module */
66
/* Internal prototypes for this module */
67
static TBOOLEAN plot_has_palette;
67
static TBOOLEAN plot_has_palette;
68
static TBOOLEAN plot_wants_colorbox;
69
static double geomean4 __PROTO((double, double, double, double));
68
static double geomean4 __PROTO((double, double, double, double));
70
static double median4 __PROTO((double, double, double, double));
69
static double median4 __PROTO((double, double, double, double));
71
static void pm3d_plot __PROTO((struct surface_points *, int));
70
static void pm3d_plot __PROTO((struct surface_points *, int));
Lines 1020-1029 set_plot_with_palette(int plot_num, int Link Here
1020
    struct curve_points *this_2dplot = first_plot;
1019
    struct curve_points *this_2dplot = first_plot;
1021
    int surface = 0;
1020
    int surface = 0;
1022
    struct text_label *this_label = first_label;
1021
    struct text_label *this_label = first_label;
1023
    TBOOLEAN want_palette_but_not_colorbox = FALSE;
1024
1022
1025
    plot_has_palette = TRUE;
1023
    plot_has_palette = TRUE;
1026
    plot_wants_colorbox = TRUE;
1027
    /* Is pm3d switched on globally? */
1024
    /* Is pm3d switched on globally? */
1028
    if (pm3d.implicit == PM3D_IMPLICIT)
1025
    if (pm3d.implicit == PM3D_IMPLICIT)
1029
	return;
1026
	return;
Lines 1035-1052 set_plot_with_palette(int plot_num, int Link Here
1035
	    if (this_2dplot->plot_style == IMAGE)
1032
	    if (this_2dplot->plot_style == IMAGE)
1036
		return;
1033
		return;
1037
#endif
1034
#endif
1038
	    if (this_2dplot->lp_properties.use_palette) {
1035
	    if (this_2dplot->lp_properties.use_palette
1039
		if (this_2dplot->lp_properties.pm3d_color.type <= TC_RGB)
1036
	    &&  this_2dplot->lp_properties.pm3d_color.type > TC_RGB)
1040
		    want_palette_but_not_colorbox = TRUE;
1037
		return;
1041
		    /* don't return yet -- decide later whether showing color box is desirable */
1038
	    if (this_2dplot->labels
1042
		else
1039
	    &&  this_2dplot->labels->textcolor.type >= TC_CB)
1043
		    return;
1044
	    }
1045
#ifdef EAM_DATASTRINGS
1046
	    if (this_2dplot->labels &&
1047
		this_2dplot->labels->textcolor.type >= TC_CB)
1048
		return;
1040
		return;
1049
#endif
1050
	    this_2dplot = this_2dplot->next;
1041
	    this_2dplot = this_2dplot->next;
1051
	}
1042
	}
1052
    }
1043
    }
Lines 1064-1071 set_plot_with_palette(int plot_num, int Link Here
1064
	    if (this_3dplot->lp_properties.use_palette) {
1055
	    if (this_3dplot->lp_properties.use_palette) {
1065
	        int type = this_3dplot->lp_properties.pm3d_color.type;
1056
	        int type = this_3dplot->lp_properties.pm3d_color.type;
1066
		if (type == TC_LT || type == TC_LINESTYLE || type == TC_RGB)
1057
		if (type == TC_LT || type == TC_LINESTYLE || type == TC_RGB)
1067
		    want_palette_but_not_colorbox = TRUE;
1058
		    /* don't return yet */
1068
		    /* don't return yet -- decide later whether showing color box is desirable */
1059
		    ;
1069
		else
1060
		else
1070
		    /* TC_DEFAULT: splot x with line|lp|dot palette */
1061
		    /* TC_DEFAULT: splot x with line|lp|dot palette */
1071
		    return;
1062
		    return;
Lines 1097-1105 set_plot_with_palette(int plot_num, int Link Here
1097
#undef TC_USES_PALETTE
1088
#undef TC_USES_PALETTE
1098
1089
1099
    /* Palette with continuous colors is not used. */
1090
    /* Palette with continuous colors is not used. */
1100
    if (want_palette_but_not_colorbox == FALSE)
1091
    plot_has_palette = FALSE; /* otherwise it stays TRUE */
1101
	plot_has_palette = FALSE; /* otherwise it stays TRUE */
1102
    plot_wants_colorbox = FALSE;
1103
}
1092
}
1104
1093
1105
TBOOLEAN
1094
TBOOLEAN
Lines 1111-1116 is_plot_with_palette() Link Here
1111
TBOOLEAN
1100
TBOOLEAN
1112
is_plot_with_colorbox()
1101
is_plot_with_colorbox()
1113
{
1102
{
1114
    return plot_wants_colorbox;
1103
    return plot_has_palette && (color_box.where != SMCOLOR_BOX_NO);
1115
}
1104
}
1116
1105
1117
	  	 
1106
	  	 

Return to bug 274693