comparison libinterp/corefcn/graphics.cc @ 27929:265b386f8b20

maint: Use two spaces between sentences in code comments. * Canvas.cc, Figure.cc, ObjectProxy.cc, documentation.cc, gui-preferences-sc.h, gui-settings.cc, file-editor-tab.cc, file-editor.cc, find-dialog.cc, octave-qscintilla.cc, main-window.cc, qt-interpreter-events.cc, resource-manager.cc, workspace-model.cc, gl2ps-print.cc, graphics.cc, ls-hdf5.cc, urlwrite.cc, __ode15__.cc, gzip.cc, pt-anon-scopes.cc, pt-jit.cc, DASPK.cc, url-transfer.cc: Use two spaces between sentences in code comments.
author Rik <rik@octave.org>
date Fri, 10 Jan 2020 12:10:13 -0800
parents bd51beb6205e
children b018f553fd85
comparison
equal deleted inserted replaced
27928:6804f2feea46 27929:265b386f8b20
5243 graphics_object go = gh_mgr.get_object (get_parent ()); 5243 graphics_object go = gh_mgr.get_object (get_parent ());
5244 5244
5245 Matrix parent_bb = go.get_properties ().get_boundingbox (true); 5245 Matrix parent_bb = go.get_properties ().get_boundingbox (true);
5246 5246
5247 // FIXME: The layout should be clean at this stage and we should not have to 5247 // FIXME: The layout should be clean at this stage and we should not have to
5248 // update ticks and labels positions here again. See bug #48718. 5248 // update ticks and labels positions here again. See bug #48718.
5249 update_ticklength (); 5249 update_ticklength ();
5250 5250
5251 Matrix ext = get_extent (true, true); 5251 Matrix ext = get_extent (true, true);
5252 ext(1) = parent_bb(3) - ext(1) - ext(3); 5252 ext(1) = parent_bb(3) - ext(1) - ext(3);
5253 ext(0)++; 5253 ext(0)++;
7109 } 7109 }
7110 else 7110 else
7111 { 7111 {
7112 Matrix text_ext = text_props.get_extent_matrix (); 7112 Matrix text_ext = text_props.get_extent_matrix ();
7113 7113
7114 // The text extent is returned in device pixels. Unscale and 7114 // The text extent is returned in device pixels. Unscale and
7115 // work with logical pixels 7115 // work with logical pixels
7116 double dpr = device_pixel_ratio (get___myhandle__ ()); 7116 double dpr = device_pixel_ratio (get___myhandle__ ());
7117 if (dpr != 1.0) 7117 if (dpr != 1.0)
7118 for (int j = 0; j < 4; j++) 7118 for (int j = 0; j < 4; j++)
7119 text_ext(j) /= dpr; 7119 text_ext(j) /= dpr;
8738 xproperties.zscale_is ("log")); 8738 xproperties.zscale_is ("log"));
8739 } 8739 }
8740 else 8740 else
8741 { 8741 {
8742 // FIXME: get_children_limits is only needed here in order to know 8742 // FIXME: get_children_limits is only needed here in order to know
8743 // if there are 3D children. Is there a way to avoid this call? 8743 // if there are 3D children. Is there a way to avoid this call?
8744 get_children_limits (min_val, max_val, min_pos, max_neg, kids, 'z'); 8744 get_children_limits (min_val, max_val, min_pos, max_neg, kids, 'z');
8745 8745
8746 xproperties.set_has3Dkids ((max_val - min_val) > 8746 xproperties.set_has3Dkids ((max_val - min_val) >
8747 std::numeric_limits<double>::epsilon ()); 8747 std::numeric_limits<double>::epsilon ());
8748 8748
9722 9722
9723 // core coplanar tester 9723 // core coplanar tester
9724 bool is_coplanar (const Matrix &cov) 9724 bool is_coplanar (const Matrix &cov)
9725 { 9725 {
9726 // Accuracy note: this test will also accept single precision input (although 9726 // Accuracy note: this test will also accept single precision input (although
9727 // stored in double precision). This is because the error threshold is 9727 // stored in double precision). This is because the error threshold is
9728 // sqrt(tol) = 1.5e-7. 9728 // sqrt(tol) = 1.5e-7.
9729 double tol = 100 * std::numeric_limits<double>::epsilon (); 9729 double tol = 100 * std::numeric_limits<double>::epsilon ();
9730 EIG eig (cov, false, false, true); 9730 EIG eig (cov, false, false, true);
9731 ColumnVector ev = real (eig.eigenvalues ()); 9731 ColumnVector ev = real (eig.eigenvalues ());
9732 return ev.min () <= tol * ev.max (); 9732 return ev.min () <= tol * ev.max ();
9782 coplanar_ends.push_back (nc - 1); 9782 coplanar_ends.push_back (nc - 1);
9783 break; 9783 break;
9784 } 9784 }
9785 9785
9786 // Algorithm: Start from 3 points, keep adding points until the point set 9786 // Algorithm: Start from 3 points, keep adding points until the point set
9787 // is no more in a plane. Record the coplanar point set, then advance 9787 // is no more in a plane. Record the coplanar point set, then advance
9788 // i_start. 9788 // i_start.
9789 9789
9790 // Prepare 1+3 points for coplanar test. 9790 // Prepare 1+3 points for coplanar test.
9791 // The first point is implicitly included. 9791 // The first point is implicitly included.
9792 for (octave_idx_type j = 0; j < 3; j++) 9792 for (octave_idx_type j = 0; j < 3; j++)
12238 busyaction = base_graphics_event::INTERRUPT; 12238 busyaction = base_graphics_event::INTERRUPT;
12239 else if (go.get_properties ().get_busyaction () == "cancel") 12239 else if (go.get_properties ().get_busyaction () == "cancel")
12240 busyaction = base_graphics_event::CANCEL; 12240 busyaction = base_graphics_event::CANCEL;
12241 12241
12242 // The "closerequestfcn" callback must be executed once the figure has 12242 // The "closerequestfcn" callback must be executed once the figure has
12243 // been made current. Let "close" do the job. 12243 // been made current. Let "close" do the job.
12244 if (cname == "closerequestfcn") 12244 if (cname == "closerequestfcn")
12245 { 12245 {
12246 std::string cmd ("close (gcbf ());"); 12246 std::string cmd ("close (gcbf ());");
12247 post_event (graphics_event::create_mcode_event (h, cmd, busyaction)); 12247 post_event (graphics_event::create_mcode_event (h, cmd, busyaction));
12248 } 12248 }