Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -29,6 +29,7 @@ public:
|
||||
// text atbs :
|
||||
//sf<float> transparency;
|
||||
sf_string font;
|
||||
sf_enum<sg::font_modeling> font_modeling;
|
||||
sf_string encoding;
|
||||
//sf<float> line_width; // for text_hershey.
|
||||
|
||||
@@ -42,23 +43,28 @@ public:
|
||||
sf_enum<sg::marker_style> marker_style;
|
||||
sf<float> marker_size;
|
||||
public:
|
||||
virtual const std::vector<field_desc>& node_fields() const {
|
||||
virtual const desc_fields& node_desc_fields() const {
|
||||
TOOLS_FIELD_DESC_NODE_CLASS(tools::sg::legend)
|
||||
static std::vector<field_desc> s_v;
|
||||
if(s_v.empty()) {
|
||||
s_v = parent::node_fields();
|
||||
TOOLS_ADD_FIELD_DESC(strings)
|
||||
TOOLS_ADD_FIELD_DESC(color)
|
||||
TOOLS_ADD_FIELD_DESC(font)
|
||||
TOOLS_ADD_FIELD_DESC(encoding);
|
||||
TOOLS_ADD_FIELD_DESC(back_visible)
|
||||
TOOLS_ADD_FIELD_DESC(wmargin_factor)
|
||||
TOOLS_ADD_FIELD_DESC(hmargin_factor)
|
||||
TOOLS_ADD_FIELD_DESC(lhjust)
|
||||
TOOLS_ADD_FIELD_DESC(rhjust)
|
||||
TOOLS_ADD_FIELD_DESC(marker_style)
|
||||
TOOLS_ADD_FIELD_DESC(marker_size)
|
||||
}
|
||||
static const desc_fields s_v(parent::node_desc_fields(),12, //WARNING : take care of count.
|
||||
TOOLS_ARG_FIELD_DESC(strings),
|
||||
TOOLS_ARG_FIELD_DESC(color),
|
||||
TOOLS_ARG_FIELD_DESC(font),
|
||||
|
||||
TOOLS_ARG_FIELD_DESC_ENUMS_BEG(font_modeling,3)
|
||||
TOOLS_ARG_ENUM(font_outline),
|
||||
TOOLS_ARG_ENUM(font_filled),
|
||||
TOOLS_ARG_ENUM(font_pixmap)
|
||||
TOOLS_ARG_FIELD_DESC_ENUMS_END,
|
||||
|
||||
TOOLS_ARG_FIELD_DESC(encoding),
|
||||
TOOLS_ARG_FIELD_DESC(back_visible),
|
||||
TOOLS_ARG_FIELD_DESC(wmargin_factor),
|
||||
TOOLS_ARG_FIELD_DESC(hmargin_factor),
|
||||
TOOLS_ARG_FIELD_DESC(lhjust),
|
||||
TOOLS_ARG_FIELD_DESC(rhjust),
|
||||
TOOLS_ARG_FIELD_DESC(marker_style),
|
||||
TOOLS_ARG_FIELD_DESC(marker_size)
|
||||
);
|
||||
return s_v;
|
||||
}
|
||||
private:
|
||||
@@ -67,6 +73,7 @@ private:
|
||||
|
||||
add_field(&color);
|
||||
add_field(&font);
|
||||
add_field(&font_modeling);
|
||||
add_field(&encoding);
|
||||
|
||||
add_field(&back_visible);
|
||||
@@ -126,6 +133,7 @@ public:
|
||||
,color(colorf_black())
|
||||
//,transparency(0)
|
||||
,font(font_hershey())
|
||||
,font_modeling(font_filled)
|
||||
,encoding(encoding_PAW())
|
||||
//,line_width(1)
|
||||
|
||||
@@ -153,6 +161,7 @@ public:
|
||||
,color(a_from.color)
|
||||
//,transparency(a_from.transparency)
|
||||
,font(a_from.font)
|
||||
,font_modeling(a_from.font_modeling)
|
||||
,encoding(a_from.encoding)
|
||||
//,line_width(a_from.line_width)
|
||||
|
||||
@@ -178,6 +187,7 @@ public:
|
||||
color = a_from.color;
|
||||
//transparency = a_from.transparency;
|
||||
font = a_from.font;
|
||||
font_modeling = a_from.font_modeling;
|
||||
encoding = a_from.encoding;
|
||||
//line_width = a_from.line_width;
|
||||
|
||||
@@ -219,8 +229,7 @@ public:
|
||||
//sf<float> zfront ?
|
||||
float zz = back_visible.value()?0.01f:0;
|
||||
|
||||
//bool rep_line = false;
|
||||
//rep_line = true;
|
||||
//bool rep_line = false;
|
||||
|
||||
/*
|
||||
float fw = 0;
|
||||
@@ -252,7 +261,7 @@ public:
|
||||
_sep->add(ltsf);
|
||||
|
||||
draw_style* ds = new draw_style;
|
||||
ds->style = draw_style::lines;
|
||||
ds->style = draw_lines;
|
||||
_sep->add(ds);
|
||||
|
||||
vertices* vtxs = new vertices;
|
||||
@@ -264,7 +273,7 @@ public:
|
||||
} else*/ { // rep marker :
|
||||
if(marker_style.value()==marker_dot) {
|
||||
draw_style* ds = new draw_style;
|
||||
ds->style = draw_style::points;
|
||||
ds->style = draw_points;
|
||||
ds->point_size = marker_size;
|
||||
_sep->add(ds);
|
||||
vertices* vtxs = new vertices;
|
||||
@@ -297,7 +306,7 @@ public:
|
||||
|
||||
if(font==font_hershey()) {
|
||||
draw_style* ds = new draw_style;
|
||||
ds->style.value(draw_style::lines);
|
||||
ds->style.value(draw_lines);
|
||||
_sep->add(ds);
|
||||
}
|
||||
|
||||
@@ -313,12 +322,14 @@ public:
|
||||
if(encoding==encoding_PAW()) {
|
||||
text_valop* text = new text_valop(m_ttf);
|
||||
text->font = font;
|
||||
text->font_modeling = font_modeling;
|
||||
text->strings = strings;
|
||||
_sep->add(text);
|
||||
rtext = text;
|
||||
} else {
|
||||
base_freetype* text = base_freetype::create(m_ttf);
|
||||
text->font = font;
|
||||
text->modeling = font_modeling;
|
||||
text->strings = strings;
|
||||
_sep->add(text);
|
||||
rtext = text;
|
||||
|
||||
Reference in New Issue
Block a user