[Redbutton-devel] SF.net SVN: redbutton: [250] redbutton-browser/trunk
Brought to you by:
skilvington
|
From: <ski...@us...> - 2007-03-19 12:08:09
|
Revision: 250
http://svn.sourceforge.net/redbutton/?rev=250&view=rev
Author: skilvington
Date: 2007-03-19 05:08:06 -0700 (Mon, 19 Mar 2007)
Log Message:
-----------
check ellipse size is >=0 in DynamicLineArtClass
Modified Paths:
--------------
redbutton-browser/trunk/DynamicLineArtClass.c
redbutton-browser/trunk/MHEGCanvas.c
Modified: redbutton-browser/trunk/DynamicLineArtClass.c
===================================================================
--- redbutton-browser/trunk/DynamicLineArtClass.c 2007-03-16 16:57:08 UTC (rev 249)
+++ redbutton-browser/trunk/DynamicLineArtClass.c 2007-03-19 12:08:06 UTC (rev 250)
@@ -479,6 +479,12 @@
error("DynamicLineArtClass_DrawArc: invalid ArcAngle (%d)", arc);
return;
}
+ /* corrigendum puts these limits on the ellipse size */
+ if(box.x_length < 0 || box.y_length < 0)
+ {
+ error("DynamicLineArtClass_DrawArc: invalid ellipse size (%d,%d)", box.x_length, box.y_length);
+ return;
+ }
MHEGCanvas_drawArc(t->inst.canvas, &pos, &box, start, arc, t->inst.LineWidth, t->inst.LineStyle, &t->inst.RefLineColour);
@@ -512,6 +518,12 @@
error("DynamicLineArtClass_DrawSector: invalid ArcAngle (%d)", arc);
return;
}
+ /* corrigendum puts these limits on the ellipse size */
+ if(box.x_length < 0 || box.y_length < 0)
+ {
+ error("DynamicLineArtClass_DrawSector: invalid ellipse size (%d,%d)", box.x_length, box.y_length);
+ return;
+ }
MHEGCanvas_drawSector(t->inst.canvas, &pos, &box, start, arc,
t->inst.LineWidth, t->inst.LineStyle, &t->inst.RefLineColour, &t->inst.RefFillColour);
@@ -558,6 +570,13 @@
box.x_length = GenericInteger_getInteger(¶ms->ellipse_width, caller_gid);
box.y_length = GenericInteger_getInteger(¶ms->ellipse_height, caller_gid);
+ /* corrigendum puts these limits on the ellipse size */
+ if(box.x_length < 0 || box.y_length < 0)
+ {
+ error("DynamicLineArtClass_DrawOval: invalid ellipse size (%d,%d)", box.x_length, box.y_length);
+ return;
+ }
+
MHEGCanvas_drawOval(t->inst.canvas, &pos, &box,
t->inst.LineWidth, t->inst.LineStyle,
&t->inst.RefLineColour, &t->inst.RefFillColour);
Modified: redbutton-browser/trunk/MHEGCanvas.c
===================================================================
--- redbutton-browser/trunk/MHEGCanvas.c 2007-03-16 16:57:08 UTC (rev 249)
+++ redbutton-browser/trunk/MHEGCanvas.c 2007-03-19 12:08:06 UTC (rev 250)
@@ -294,13 +294,6 @@
XGCValues gcvals;
int x, y, w, h;
- /* corrigendum puts these limits on the ellipse size */
- if(box->x_length < 0 || box->y_length < 0)
- {
- error("MHEGCanvas_drawOval: invalid box size (%d,%d)", box->x_length, box->y_length);
- return;
- }
-
if(style != LineStyle_solid)
error("MHEGCanvas_drawOval: LineStyle %d not supported (using a solid line)", style);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|