X-Git-Url: http://git.cinelerra-gg.org/git/?p=goodguy%2Fhistory.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcursor.C;h=b392dda13b8b5a39d985a0b31d0684abd50dade3;hp=f5bda7c7efb8295160e8003a556c8ca1e94f01c4;hb=HEAD;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd diff --git a/cinelerra-5.1/cinelerra/cursor.C b/cinelerra-5.1/cinelerra/cursor.C index f5bda7c7..b392dda1 100644 --- a/cinelerra-5.1/cinelerra/cursor.C +++ b/cinelerra-5.1/cinelerra/cursor.C @@ -2,21 +2,21 @@ /* * CINELERRA * Copyright (C) 2008 Adam Williams - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * + * */ #include "cursor.h" @@ -51,7 +51,7 @@ return 0; int Cursor_::draw(int flash, long selectionstart, long selectionend, long zoom_sample, long viewstart, int vertical) { return 0; - if(canvas->get_h() * canvas->get_w() == 0) return 1; + if(canvas->get_h() * canvas->get_w() == 0) return 1; if(zoom_sample == 0) return 1; // no canvas long start = viewstart; @@ -70,7 +70,7 @@ return 0; { pixel1 = (selectionstart - start) / zoom_sample; } - + if(selectionend > end) { pixel2 = (vertical ? canvas->get_h() : canvas->get_w()); @@ -83,13 +83,13 @@ return 0; canvas->set_inverse(); canvas->set_color(WHITE); - + if(vertical) canvas->draw_box(0, pixel1, canvas->get_w(), pixel2 - pixel1); else canvas->draw_box(pixel1, 0, pixel2 - pixel1, canvas->get_h()); - - + + canvas->set_opaque(); } if(flash) canvas->flash();