[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2889 - branches/pingus_sdl/src/gui
From: |
nehalmistry |
Subject: |
[Pingus-CVS] r2889 - branches/pingus_sdl/src/gui |
Date: |
Mon, 13 Aug 2007 22:46:52 +0200 |
Author: nehalmistry
Date: 2007-08-13 22:46:47 +0200 (Mon, 13 Aug 2007)
New Revision: 2889
Modified:
branches/pingus_sdl/src/gui/display.cpp
Log:
fix clipping in Display::draw_line
Modified: branches/pingus_sdl/src/gui/display.cpp
===================================================================
--- branches/pingus_sdl/src/gui/display.cpp 2007-08-13 20:27:46 UTC (rev
2888)
+++ branches/pingus_sdl/src/gui/display.cpp 2007-08-13 20:46:47 UTC (rev
2889)
@@ -247,7 +247,7 @@
// vertical line
if (sx == dx) {
- if (sx < 0 || sx > get_width() - 1) {
+ if ((sx < clipx1 && dx < clipx1) || (sx > clipx2 && dx > clipx2)) {
return;
}
clip(sy, clipy1, clipy2);
@@ -262,7 +262,7 @@
// horizontal
if (sy == dy) {
- if (sy < 0 || sy > get_height() - 1) {
+ if ((sy < clipy1 && dy < clipy1) || (sy > clipy2 && dy > clipy2)) {
return;
}
clip(sx, clipx1, clipx2);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2889 - branches/pingus_sdl/src/gui,
nehalmistry <=