Mercurial > octave-nkf
comparison src/graphics.cc @ 8333:9238637cb81c
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 18 Nov 2008 11:14:31 -0500 |
parents | be9b14945774 |
children | b6c3b16d4cfa |
comparison
equal
deleted
inserted
replaced
8332:34fde4755a0f | 8333:9238637cb81c |
---|---|
192 retval(2) = pos(2) * parent_dim(0); | 192 retval(2) = pos(2) * parent_dim(0); |
193 retval(3) = pos(3) * parent_dim(1); | 193 retval(3) = pos(3) * parent_dim(1); |
194 } | 194 } |
195 else if (from_units.compare ("characters")) | 195 else if (from_units.compare ("characters")) |
196 { | 196 { |
197 // FIXME: implement this | 197 // FIXME -- implement this. |
198 } | 198 } |
199 else | 199 else |
200 { | 200 { |
201 res = backend.get_screen_resolution (); | 201 res = backend.get_screen_resolution (); |
202 | 202 |
227 retval(2) /= parent_dim(0); | 227 retval(2) /= parent_dim(0); |
228 retval(3) /= parent_dim(1); | 228 retval(3) /= parent_dim(1); |
229 } | 229 } |
230 else if (to_units.compare ("characters")) | 230 else if (to_units.compare ("characters")) |
231 { | 231 { |
232 // FIXME: implement this | 232 // FIXME -- implement this. |
233 } | 233 } |
234 else | 234 else |
235 { | 235 { |
236 if (res <= 0) | 236 if (res <= 0) |
237 res = backend.get_screen_resolution (); | 237 res = backend.get_screen_resolution (); |
682 bool | 682 bool |
683 array_property::validate (const octave_value& v) | 683 array_property::validate (const octave_value& v) |
684 { | 684 { |
685 bool xok = false; | 685 bool xok = false; |
686 | 686 |
687 // FIXME: should we always support []? | 687 // FIXME -- should we always support []? |
688 if (v.is_empty () && v.is_double_type ()) | 688 if (v.is_empty () && v.is_double_type ()) |
689 return true; | 689 return true; |
690 | 690 |
691 // check value type | 691 // check value type |
692 if (type_constraints.size () > 0) | 692 if (type_constraints.size () > 0) |
952 | 952 |
953 if (args.length () > 0) | 953 if (args.length () > 0) |
954 { | 954 { |
955 retval.set (args(0)); | 955 retval.set (args(0)); |
956 | 956 |
957 // FIXME: additional argument could define constraints | 957 // FIXME -- additional argument could define constraints, |
958 // but is this really useful...? | 958 // but is this really useful? |
959 } | 959 } |
960 } | 960 } |
961 else if (type.compare ("color")) | 961 else if (type.compare ("color")) |
962 { | 962 { |
963 color_values cv (0, 0, 0); | 963 color_values cv (0, 0, 0); |
2094 | 2094 |
2095 Matrix | 2095 Matrix |
2096 figure::properties::get_boundingbox (bool) const | 2096 figure::properties::get_boundingbox (bool) const |
2097 { | 2097 { |
2098 graphics_backend b = get_backend (); | 2098 graphics_backend b = get_backend (); |
2099 // FIXME: screen size should be obtained from root object | 2099 // FIXME -- screen size should be obtained from root object. |
2100 Matrix screen_size = b.get_screen_size (); | 2100 Matrix screen_size = b.get_screen_size (); |
2101 Matrix pos; | 2101 Matrix pos; |
2102 | 2102 |
2103 pos = convert_position (get_position ().matrix_value (), get_units (), | 2103 pos = convert_position (get_position ().matrix_value (), get_units (), |
2104 "pixels", screen_size, b); | 2104 "pixels", screen_size, b); |
2112 | 2112 |
2113 void | 2113 void |
2114 figure::properties::set_boundingbox (const Matrix& bb) | 2114 figure::properties::set_boundingbox (const Matrix& bb) |
2115 { | 2115 { |
2116 graphics_backend b = get_backend (); | 2116 graphics_backend b = get_backend (); |
2117 // FIXME: screen size should be obtained from root object | 2117 // FIXME -- screen size should be obtained from root object. |
2118 Matrix screen_size = b.get_screen_size (); | 2118 Matrix screen_size = b.get_screen_size (); |
2119 Matrix pos = bb; | 2119 Matrix pos = bb; |
2120 | 2120 |
2121 pos(1) = screen_size(1) - pos(1) - pos(3); | 2121 pos(1) = screen_size(1) - pos(1) - pos(3); |
2122 pos(1)++; | 2122 pos(1)++; |
2799 | 2799 |
2800 if (cameraviewanglemode_is ("auto")) | 2800 if (cameraviewanglemode_is ("auto")) |
2801 { | 2801 { |
2802 double af; | 2802 double af; |
2803 | 2803 |
2804 // FIXME: Was this really needed? When compared to Matlab, it | 2804 // FIXME -- was this really needed? When compared to Matlab, it |
2805 // does not seem to be required. Need investigation with concrete | 2805 // does not seem to be required. Need investigation with concrete |
2806 // backend to see results visually. | 2806 // backend to see results visually. |
2807 if (false && dowarp) | 2807 if (false && dowarp) |
2808 af = 1.0 / (xM > yM ? xM : yM); | 2808 af = 1.0 / (xM > yM ? xM : yM); |
2809 else | 2809 else |
2914 pba(1) = dy/da(1); | 2914 pba(1) = dy/da(1); |
2915 pba(2) = dz/da(2); | 2915 pba(2) = dz/da(2); |
2916 } | 2916 } |
2917 } | 2917 } |
2918 | 2918 |
2919 // FIXME: if plotboxaspectratiomode is "manual", limits | 2919 // FIXME -- if plotboxaspectratiomode is "manual", limits |
2920 // and/or dataaspectratio might be adapted | 2920 // and/or dataaspectratio might be adapted. |
2921 } | 2921 } |
2922 | 2922 |
2923 // The INTERNAL flag defines whether position or outerposition is used. | 2923 // The INTERNAL flag defines whether position or outerposition is used. |
2924 | 2924 |
2925 Matrix | 2925 Matrix |
2997 } | 2997 } |
2998 | 2998 |
2999 return retval; | 2999 return retval; |
3000 } | 3000 } |
3001 | 3001 |
3002 // FIXME: Remove | 3002 // FIXME -- remove. |
3003 // FIXME: Maybe this should go into array_property class? | 3003 // FIXME -- maybe this should go into array_property class? |
3004 /* | 3004 /* |
3005 static void | 3005 static void |
3006 check_limit_vals (double& min_val, double& max_val, double& min_pos, | 3006 check_limit_vals (double& min_val, double& max_val, double& min_pos, |
3007 const array_property& data) | 3007 const array_property& data) |
3008 { | 3008 { |
3604 NDArray n (dim_vector (q, p, 3), 0.0); | 3604 NDArray n (dim_vector (q, p, 3), 0.0); |
3605 | 3605 |
3606 i1 = i2 = i3 = 0; | 3606 i1 = i2 = i3 = 0; |
3607 j1 = j2 = j3 = 0; | 3607 j1 = j2 = j3 = 0; |
3608 | 3608 |
3609 // FIXME: normal computation at boundaries | 3609 // FIXME -- normal computation at boundaries. |
3610 for (int i = 1; i < (p-1); i++) | 3610 for (int i = 1; i < (p-1); i++) |
3611 { | 3611 { |
3612 if (y_mat) | 3612 if (y_mat) |
3613 { | 3613 { |
3614 i1 = i-1; | 3614 i1 = i-1; |