summaryrefslogtreecommitdiff
path: root/src/mesa/main/drawpix.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 21:28:04 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2000-09-08 21:28:04 +0000
commit48c6a6ecd2b94d73317f1579193d98101566217a (patch)
tree2de10e0a4070195594e73898d6051c3ad266d921 /src/mesa/main/drawpix.c
parente18e0e98fea2384892324c84bf463d65c1159f7b (diff)
changed gl_frame_buffer Xmax and Ymax to be exclusive boundary values
Diffstat (limited to 'src/mesa/main/drawpix.c')
-rw-r--r--src/mesa/main/drawpix.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index 237e702151..7cf7b0030f 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -1,4 +1,4 @@
-/* $Id: drawpix.c,v 1.32 2000/09/06 17:44:52 brianp Exp $ */
+/* $Id: drawpix.c,v 1.33 2000/09/08 21:28:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -72,7 +72,7 @@ _mesa_clip_pixelrect(const GLcontext *ctx,
}
/* right clipping */
if (*destX + *width > buffer->Xmax)
- *width -= (*destX + *width - buffer->Xmax - 1);
+ *width -= (*destX + *width - buffer->Xmax);
if (*width <= 0)
return GL_FALSE;
@@ -85,7 +85,7 @@ _mesa_clip_pixelrect(const GLcontext *ctx,
}
/* top clipping */
if (*destY + *height > buffer->Ymax)
- *height -= (*destY + *height - buffer->Ymax - 1);
+ *height -= (*destY + *height - buffer->Ymax);
if (*height <= 0)
return GL_TRUE;
@@ -161,7 +161,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
destX = ctx->DrawBuffer->Xmin;
}
if (destX + drawWidth > ctx->DrawBuffer->Xmax)
- drawWidth -= (destX + drawWidth - ctx->DrawBuffer->Xmax - 1);
+ drawWidth -= (destX + drawWidth - ctx->DrawBuffer->Xmax);
if (drawWidth <= 0)
return GL_TRUE;
@@ -172,7 +172,7 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
destY = ctx->DrawBuffer->Ymin;
}
if (destY + drawHeight > ctx->DrawBuffer->Ymax)
- drawHeight -= (destY + drawHeight - ctx->DrawBuffer->Ymax - 1);
+ drawHeight -= (destY + drawHeight - ctx->DrawBuffer->Ymax);
if (drawHeight <= 0)
return GL_TRUE;
}
@@ -185,15 +185,15 @@ fast_draw_pixels(GLcontext *ctx, GLint x, GLint y,
destX = ctx->DrawBuffer->Xmin;
}
if (destX + drawWidth > ctx->DrawBuffer->Xmax)
- drawWidth -= (destX + drawWidth - ctx->DrawBuffer->Xmax - 1);
+ drawWidth -= (destX + drawWidth - ctx->DrawBuffer->Xmax);
if (drawWidth <= 0)
return GL_TRUE;
/* vertical clipping */
if (destY > ctx->DrawBuffer->Ymax) {
- skipRows += (destY - ctx->DrawBuffer->Ymax - 1);
- drawHeight -= (destY - ctx->DrawBuffer->Ymax - 1);
- destY = ctx->DrawBuffer->Ymax + 1;
+ skipRows += (destY - ctx->DrawBuffer->Ymax);
+ drawHeight -= (destY - ctx->DrawBuffer->Ymax);
+ destY = ctx->DrawBuffer->Ymax;
}
if (destY - drawHeight < ctx->DrawBuffer->Ymin)
drawHeight -= (ctx->DrawBuffer->Ymin - (destY - drawHeight));