comparison src/graphics.cc @ 13908:32a77debff75

strip trailing spaces
author Konstantinos Poulios <logari81@googlemail.com>
date Tue, 22 Nov 2011 17:50:11 +0100
parents 1367f2db49a2
children 2af665333b86
comparison
equal deleted inserted replaced
13906:155e9c625761 13908:32a77debff75
2382 2382
2383 static void 2383 static void
2384 xinitialize (const graphics_handle& h) 2384 xinitialize (const graphics_handle& h)
2385 { 2385 {
2386 graphics_object go = gh_manager::get_object (h); 2386 graphics_object go = gh_manager::get_object (h);
2387 2387
2388 if (go) 2388 if (go)
2389 go.initialize (); 2389 go.initialize ();
2390 } 2390 }
2391 2391
2392 // --------------------------------------------------------------------- 2392 // ---------------------------------------------------------------------
7072 ft_render text_renderer; 7072 ft_render text_renderer;
7073 Matrix box; 7073 Matrix box;
7074 7074
7075 // FIXME: parsed content should be cached for efficiency 7075 // FIXME: parsed content should be cached for efficiency
7076 // FIXME: support multiline text 7076 // FIXME: support multiline text
7077 7077
7078 elt = text_parser_none ().parse (get_string_string ()); 7078 elt = text_parser_none ().parse (get_string_string ());
7079 #ifdef HAVE_FONTCONFIG 7079 #ifdef HAVE_FONTCONFIG
7080 text_renderer.set_font (get_fontname (), 7080 text_renderer.set_font (get_fontname (),
7081 get_fontweight (), 7081 get_fontweight (),
7082 get_fontangle (), 7082 get_fontangle (),
7103 Matrix pos = get_position ().matrix_value (); 7103 Matrix pos = get_position ().matrix_value ();
7104 7104
7105 graphics_object parent_obj = gh_manager::get_object (get_parent ()); 7105 graphics_object parent_obj = gh_manager::get_object (get_parent ());
7106 Matrix parent_bbox = parent_obj.get_properties ().get_boundingbox (true), 7106 Matrix parent_bbox = parent_obj.get_properties ().get_boundingbox (true),
7107 parent_size = parent_bbox.extract_n (0, 2, 1, 2); 7107 parent_size = parent_bbox.extract_n (0, 2, 1, 2);
7108 7108
7109 pos = convert_position (pos, cached_units, get_units (), parent_size); 7109 pos = convert_position (pos, cached_units, get_units (), parent_size);
7110 set_position (pos); 7110 set_position (pos);
7111 7111
7112 cached_units = get_units (); 7112 cached_units = get_units ();
7113 } 7113 }
7274 Matrix pos = get_position ().matrix_value (); 7274 Matrix pos = get_position ().matrix_value ();
7275 7275
7276 graphics_object parent_obj = gh_manager::get_object (get_parent ()); 7276 graphics_object parent_obj = gh_manager::get_object (get_parent ());
7277 Matrix parent_bbox = parent_obj.get_properties ().get_boundingbox (true), 7277 Matrix parent_bbox = parent_obj.get_properties ().get_boundingbox (true),
7278 parent_size = parent_bbox.extract_n (0, 2, 1, 2); 7278 parent_size = parent_bbox.extract_n (0, 2, 1, 2);
7279 7279
7280 pos = convert_position (pos, old_units, get_units (), parent_size); 7280 pos = convert_position (pos, old_units, get_units (), parent_size);
7281 set_position (pos); 7281 set_position (pos);
7282 } 7282 }
7283 7283
7284 void 7284 void
7454 public: 7454 public:
7455 callback_event (const graphics_handle& h, const std::string& name, 7455 callback_event (const graphics_handle& h, const std::string& name,
7456 const octave_value& data = Matrix ()) 7456 const octave_value& data = Matrix ())
7457 : base_graphics_event (), handle (h), callback_name (name), 7457 : base_graphics_event (), handle (h), callback_name (name),
7458 callback (), callback_data (data) { } 7458 callback (), callback_data (data) { }
7459 7459
7460 callback_event (const graphics_handle& h, const octave_value& cb, 7460 callback_event (const graphics_handle& h, const octave_value& cb,
7461 const octave_value& data = Matrix ()) 7461 const octave_value& data = Matrix ())
7462 : base_graphics_event (), handle (h), callback_name (), 7462 : base_graphics_event (), handle (h), callback_name (),
7463 callback (cb), callback_data (data) { } 7463 callback (cb), callback_data (data) { }
7464 7464
7625 if (octave_thread::is_octave_thread ()) 7625 if (octave_thread::is_octave_thread ())
7626 gh_manager::execute_callback (h, l, octave_value ()); 7626 gh_manager::execute_callback (h, l, octave_value ());
7627 else 7627 else
7628 { 7628 {
7629 gh_manager::auto_lock guard; 7629 gh_manager::auto_lock guard;
7630 7630
7631 do_post_event (graphics_event::create_callback_event (h, l)); 7631 do_post_event (graphics_event::create_callback_event (h, l));
7632 } 7632 }
7633 } 7633 }
7634 7634
7635 void 7635 void
7771 gh_manager::do_process_events (bool force) 7771 gh_manager::do_process_events (bool force)
7772 { 7772 {
7773 graphics_event e; 7773 graphics_event e;
7774 bool old_Vdrawnow_requested = Vdrawnow_requested; 7774 bool old_Vdrawnow_requested = Vdrawnow_requested;
7775 unwind_protect frame; 7775 unwind_protect frame;
7776 7776
7777 static int process_events_executing = 0; 7777 static int process_events_executing = 0;
7778 7778
7779 frame.protect_var (process_events_executing); 7779 frame.protect_var (process_events_executing);
7780 7780
7781 if (++process_events_executing <= 1) 7781 if (++process_events_executing <= 1)
7782 { 7782 {
7783 do 7783 do
7832 } 7832 }
7833 7833
7834 return 0; 7834 return 0;
7835 } 7835 }
7836 7836
7837 void 7837 void
7838 gh_manager::do_enable_event_processing (bool enable) 7838 gh_manager::do_enable_event_processing (bool enable)
7839 { 7839 {
7840 gh_manager::auto_lock guard; 7840 gh_manager::auto_lock guard;
7841 7841
7842 if (enable) 7842 if (enable)