comparison src/event.c @ 451:5c9e2a8a4bd8

Remove all "cairo" wording. - all cairo are replaced by mbe version - except pango relative ones.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 05 Aug 2009 16:10:47 +0800
parents a417fd980228
children cd6f57b9b104
comparison
equal deleted inserted replaced
450:a417fd980228 451:5c9e2a8a4bd8
556 break; 556 break;
557 #endif 557 #endif
558 } 558 }
559 } 559 }
560 560
561 /*! \brief Implement exactly point testing with Cairo. 561 /*! \brief Implement exactly point testing with MB graphic engine.
562 * 562 *
563 * \note This function should not be called directly. Call 563 * \note This function should not be called directly. Call
564 * _shape_pos_is_in() insteaded. 564 * _shape_pos_is_in() insteaded.
565 */ 565 */
566 static int _shape_pos_is_in_cairo(shape_t *shape, co_aix x, co_aix y, 566 static int _shape_pos_is_in_mbe(shape_t *shape, co_aix x, co_aix y,
567 int *in_stroke, mbe_t *cr) { 567 int *in_stroke, mbe_t *cr) {
568 draw_shape_path(shape, cr); 568 draw_shape_path(shape, cr);
569 if(shape->fill) { 569 if(shape->fill) {
570 if(mbe_in_fill(cr, x, y)) { 570 if(mbe_in_fill(cr, x, y)) {
571 *in_stroke = 0; 571 *in_stroke = 0;
590 590
591 r = sh_pos_is_in(shape, x, y); 591 r = sh_pos_is_in(shape, x, y);
592 if(!r) 592 if(!r)
593 return FALSE; 593 return FALSE;
594 594
595 r = _shape_pos_is_in_cairo(shape, x, y, in_stroke, cr); 595 r = _shape_pos_is_in_mbe(shape, x, y, in_stroke, cr);
596 mbe_new_path(cr); 596 mbe_new_path(cr);
597 if(!r) 597 if(!r)
598 return FALSE; 598 return FALSE;
599 599
600 return TRUE; 600 return TRUE;
733 * descendants. 733 * descendants.
734 * 734 *
735 * coord is relative less than shapes. Check areas of coord can 735 * coord is relative less than shapes. Check areas of coord can
736 * skip sub-trees and avoid useless heavy computation. For shapes, 736 * skip sub-trees and avoid useless heavy computation. For shapes,
737 * it not only check overlay of area. It also check overlay by 737 * it not only check overlay of area. It also check overlay by
738 * actually drawing on a cairo surface. 738 * actually drawing on a mbe surface.
739 */ 739 */
740 static 740 static
741 int _is_obj_objs_overlay(mb_obj_t *obj, mb_obj_t *others_root, 741 int _is_obj_objs_overlay(mb_obj_t *obj, mb_obj_t *others_root,
742 mbe_t *cr) { 742 mbe_t *cr) {
743 area_t *area, *candi_area; 743 area_t *area, *candi_area;
823 } 823 }
824 } 824 }
825 825
826 /*! \brief Test if two objects are overlaid. 826 /*! \brief Test if two objects are overlaid.
827 * 827 *
828 * \todo Detect overlay in better way with cairo. 828 * \todo Detect overlay in better way with mbe.
829 * \note This function cost heavy on CPU power. 829 * \note This function cost heavy on CPU power.
830 */ 830 */
831 int mb_objs_are_overlay(redraw_man_t *rdman, 831 int mb_objs_are_overlay(redraw_man_t *rdman,
832 mb_obj_t *obj1, mb_obj_t *obj2) { 832 mb_obj_t *obj1, mb_obj_t *obj2) {
833 mbe_t *cr; 833 mbe_t *cr;