Mercurial > hg > octave-nkf
changeset 7846:d7737a4268b7
Fix typos in property names (edgealpha/facealpha).
* * *
Adpat OpenGL renderer to type change of edgealpha/facealpha properties.
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Wed, 27 Feb 2008 11:28:22 +0100 |
parents | 25f5d628bc8a |
children | 40b16e04172a |
files | src/ChangeLog src/graphics.h.in src/graphics/ChangeLog src/graphics/opengl/gl-render.cc |
diffstat | 4 files changed, 25 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -27,6 +27,10 @@ 2008-06-04 Michael Goffioul <michael.goffioul@gmail.com> + * graphics.h.in (patch::properties::edgealpha, + surface::properties::facealpha, surface::properties::edgealpha): Fix + typos in property names. + * graphics.h.in (class double_radio_property): New property class for holding face/edge alpha values. (patch::properties::facealpha, patch::properties::edgealpha,
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -3021,7 +3021,7 @@ double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp")) radio_property facelighting , "flat|{none}|gouraud|phong" color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("flat|none|interp")) - double_radio_property edgeealpha , double_radio_property (1.0, radio_values ("flat|interp")) + double_radio_property edgealpha , double_radio_property (1.0, radio_values ("flat|interp")) radio_property edgelighting , "{none}|flat|gouraud|phong" radio_property backfacelighting , "{reverselit}|unlit|lit" double_property ambientstrength , 0.3 @@ -3091,7 +3091,7 @@ array_property cdata l , Matrix () radio_property cdatamapping a , "{scaled}|direct" color_property facecolor , "{flat}|none|interp|texturemap" - double_radio_property faceealpha , double_radio_property (1.0, radio_values ("flat|interp")) + double_radio_property facealpha , double_radio_property (1.0, radio_values ("flat|interp")) color_property edgecolor , color_property (color_values (0, 0, 0), radio_values ("flat|none|interp")) radio_property linestyle , "{-}|--|:|-.|none" double_property linewidth , 0.5 @@ -3106,7 +3106,7 @@ double_property ambientstrength , 0.3 radio_property backfacelighting , "unlit|lit|{reverselit}" double_property diffusestrength , 0.6 - double_radio_property edgeealpha , double_radio_property (1.0, radio_values ("flat|interp")) + double_radio_property edgealpha , double_radio_property (1.0, radio_values ("flat|interp")) radio_property edgelighting , "{none}|flat|gouraud|phong" radio_property erasemode , "{normal}|none|xor|background" radio_property facelighting , "{none}|flat|gouraud|phong"
--- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,9 @@ +2008-02-27 Michael Goffioul <michael.goffioul@gmail.com> + + * opengl/gl-render.cc (opengl_renderer::draw(patch), + opengl_renderer::draw(surface)): Adapt to type change of facealpha and + edgealpha, using double_radio_property class. + 2008-02-26 Michael Goffioul <michael.goffioul@gmail.com> * opengl/gl-render.h: Make sure windows.h is included before OpenGL
--- a/src/graphics/opengl/gl-render.cc +++ b/src/graphics/opengl/gl-render.cc @@ -1699,15 +1699,15 @@ (props.facecolor_is ("texturemap") ? 3 : -1)))); int fl_mode = (props.facelighting_is ("none") ? 0 : (props.facelighting_is ("flat") ? 1 : 2)); - // FIXME: use facealpha as double-radio property - int fa_mode = 0; + int fa_mode = (props.facealpha_is_double () ? 0 : + (props.facealpha_is ("flat") ? 1 : 2)); int ec_mode = (props.edgecolor_is_rgb () ? 0 : (props.edgecolor_is ("flat") ? 1 : (props.edgecolor_is ("interp") ? 2 : -1))); int el_mode = (props.edgelighting_is ("none") ? 0 : (props.edgelighting_is ("flat") ? 1 : 2)); - // FIXME: use edgealpha as double-radio property - int ea_mode = 0; + int ea_mode = (props.edgealpha_is_double () ? 0 : + (props.edgealpha_is ("flat") ? 1 : 2)); Matrix fcolor = (fc_mode == 3 ? Matrix (1, 3, 1.0) : props.get_facecolor_rgb ()); Matrix ecolor = props.get_edgecolor_rgb (); @@ -1766,8 +1766,7 @@ if (! props.facecolor_is ("none")) { - // FIXME: adapt to double-radio property type - if (props.get_facealpha () == 1) + if (props.get_facealpha_double () == 1) { if (fc_mode == 0 || fc_mode == 3) { @@ -1929,8 +1928,7 @@ if (! props.edgecolor_is ("none")) { - // FIXME: adapt to double-radio property - if (props.get_edgealpha () == 1) + if (props.get_edgealpha_double () == 1) { if (ec_mode == 0) { @@ -2201,14 +2199,14 @@ (props.facecolor_is("flat") ? 1 : 2)); int fl_mode = (props.facelighting_is ("none") ? 0 : (props.facelighting_is ("flat") ? 1 : 2)); - // FIXME: use facealpha as to double-radio property - int fa_mode = 0; + int fa_mode = (props.facealpha_is_double () ? 0 : + (props.facealpha_is ("flat") ? 1 : 2)); int ec_mode = (props.edgecolor_is_rgb () ? 0 : (props.edgecolor_is("flat") ? 1 : 2)); int el_mode = (props.edgelighting_is ("none") ? 0 : (props.edgelighting_is ("flat") ? 1 : 2)); - // FIXME: use edgealpha as to double-radio property - int ea_mode = 0; + int ea_mode = (props.edgealpha_is_double () ? 0 : + (props.edgealpha_is ("flat") ? 1 : 2)); Matrix fcolor = props.get_facecolor_rgb (); Matrix ecolor = props.get_edgecolor_rgb (); @@ -2323,7 +2321,7 @@ if (! props.facecolor_is ("none")) { // FIXME: adapt to double-radio property - if (props.get_facealpha () == 1) + if (props.get_facealpha_double () == 1) { if (fc_mode == 0) { @@ -2379,7 +2377,7 @@ if (! props.edgecolor_is ("none")) { // FIXME: adapt to double-radio property - if (props.get_edgealpha () == 1) + if (props.get_edgealpha_double () == 1) { if (ec_mode == 0) {