… | |
… | |
666 | if (result) |
666 | if (result) |
667 | { |
667 | { |
668 | XGCValues gcv; |
668 | XGCValues gcv; |
669 | GC gc; |
669 | GC gc; |
670 | |
670 | |
671 | if (pixmap) |
|
|
672 | { |
|
|
673 | if (pmap_width != new_pmap_width |
|
|
674 | || pmap_height != new_pmap_height |
|
|
675 | || pmap_depth != target->depth) |
|
|
676 | { |
|
|
677 | XFreePixmap (target->dpy, pixmap); |
|
|
678 | pixmap = None; |
|
|
679 | } |
|
|
680 | } |
|
|
681 | |
|
|
682 | /* create Pixmap */ |
671 | /* create Pixmap */ |
683 | if (pixmap == None) |
672 | if (pixmap == None |
|
|
673 | || pmap_width != new_pmap_width |
|
|
674 | || pmap_height != new_pmap_height |
|
|
675 | || pmap_depth != target->depth) |
684 | { |
676 | { |
|
|
677 | if (pixmap) |
|
|
678 | XFreePixmap (target->dpy, pixmap); |
685 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
679 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
686 | pmap_width = new_pmap_width; |
680 | pmap_width = new_pmap_width; |
687 | pmap_height = new_pmap_height; |
681 | pmap_height = new_pmap_height; |
688 | pmap_depth = target->depth; |
682 | pmap_depth = target->depth; |
689 | } |
683 | } |
… | |
… | |
797 | new_pmap_width = min (image_width, target_width); |
791 | new_pmap_width = min (image_width, target_width); |
798 | new_pmap_height = min (image_height, target_height); |
792 | new_pmap_height = min (image_height, target_height); |
799 | } |
793 | } |
800 | } |
794 | } |
801 | |
795 | |
802 | if (pixmap) |
|
|
803 | { |
|
|
804 | if (pmap_width != new_pmap_width |
|
|
805 | || pmap_height != new_pmap_height |
|
|
806 | || pmap_depth != target->depth) |
|
|
807 | { |
|
|
808 | XFreePixmap (target->dpy, pixmap); |
|
|
809 | pixmap = None; |
|
|
810 | } |
|
|
811 | } |
|
|
812 | |
|
|
813 | if (pixmap == None) |
796 | if (pixmap == None |
|
|
797 | || pmap_width != new_pmap_width |
|
|
798 | || pmap_height != new_pmap_height |
|
|
799 | || pmap_depth != target->depth) |
814 | { |
800 | { |
|
|
801 | if (pixmap) |
|
|
802 | XFreePixmap (target->dpy, pixmap); |
815 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
803 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
816 | pmap_width = new_pmap_width; |
804 | pmap_width = new_pmap_width; |
817 | pmap_height = new_pmap_height; |
805 | pmap_height = new_pmap_height; |
818 | pmap_depth = target->depth; |
806 | pmap_depth = target->depth; |
819 | } |
807 | } |