My suggested changes do make a difference.
Try making the following changes to examples/dynapi.gui.graphics.html. Change line 25 from: graphics.setFillColor(lyr.bgcolor); to: graphics.setFillColor('green');
and change line 36 from: graphics.drawCircle(... to graphics.fillCircle(...
This should cause the "draw circle" button to draw filled green circles. WIthout my changes it doesn't work because the Graphics.setFillColor() method is not setting the same variable that the Graphics.fillCircle() method uses.
Andrew.
Leif W wrote:
Hi! I've made changes to my local copy and played with the example page. Can't see any difference, but the example is very simple (draw line, circle, and rectangle - yes I added a rectangle to the example -- button was there but onclick was empty -- which I'll upload to CVS later). Do you have any more complex example pages up with the two different src/gui/graphics.js files, which reveal the bugs caused by the forgotten relics?
Leif
----- Original Message ----- From: "Andrew Gillett" <[EMAIL PROTECTED]><[EMAIL PROTECTED]>
To: "dynapi-dev" Sent: Thursday, March 25, 2004 12:18 AM
Subject: [Dynapi-Dev] Some fixes for src/gui/graphics.js
Hi,
I was looking at some of the graphics functions (dynapi 3) and there are some simple errors. It looks like some variables were renamed at some point, but the old variable names were not all cleaned up. Perhaps someone can commit the changes below to CVS?
The correct variable names are: _s StrokeColor (was color) _w StrokeWeight (was thickness) _f FillColor (was color)
Andrew.
49c49 < fillCircle(x+r,y+r,r,this.color,this._dlyr); --- > fillCircle(x+r,y+r,r,this._f,this._dlyr); 52c52 < drawEllipse(x+w/2,y+h/2,w,h,this.color,false,this.thickness,this._dlyr); --- > drawEllipse(x+w/2,y+h/2,w,h,this._s,false,this._w,this._dlyr); 55c55 < drawEllipse(x+w/2,y+h/2,w,h,this.color,true,this.thickness,this._dlyr); --- > drawEllipse(x+w/2,y+h/2,w,h,this._f,true,this._w,this._dlyr); 58c58 < drawRect(x,y,w,h,this.color,this.thickness,this._dlyr); --- > drawRect(x,y,w,h,this._s,this._w,this._dlyr); 61c61 < fillRect(x,y,w,h,this.color,this._dlyr); --- > fillRect(x,y,w,h,this._f,this._dlyr);
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED]://www.mail-archive.com/[EMAIL PROTECTED]/
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED]://www.mail-archive.com/[EMAIL PROTECTED]/
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/