Re: [Gambas-user] Drawing sector
OK, it should be fixed in revision #5431. You don't have to play with Paint.LineJoin anymore. Yes, it works! Thanks! Jussi -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 10/12/2012 22:23, Jussi Lahtinen a écrit : I think this issue is related to the Paint.LineCap and Paint.LineJoin properties. Try to play with them before drawing the pie, I think it will fix the drawing artifacts. Yes, either with Paint.Linejoin = Paint.LineJoinBevel or Paint.LineJoinRound everything works as expected. However Paint.LineCap doesn't seem to do anything at all. Thanks! Jussi OK, it should be fixed in revision #5431. You don't have to play with Paint.LineJoin anymore. -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
OK, makes sense. One tiny thing more... Draw.Foreground = Color.Black Draw.LineWidth = 3 Draw.Circle(106, 106, 105) Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid 'this draws very narrow sector Draw.FillColor = Color.Black Draw.Circle(106, 106, 105, Rad(359), Rad(360)) 'this draws little red cross at center point of the sector. Draw.Foreground = Color.Red Draw.Line(104, 106, 108, 106) Draw.Line(106, 104, 106, 108) However sector is off from center point. See attachment. Jussi On Sun, Dec 9, 2012 at 5:12 PM, Benoît Minisini gam...@users.sourceforge.net wrote: Le 07/12/2012 14:28, Jussi Lahtinen a écrit : Fixed in revision #5415. Something is still different from the original behaviour. I use same circle commands to draw pie chart and it still fails... Test output: Area num. 0: in rads; 0 to 0.89759700342775 Area num. 1: in rads; 0.89759700342775 to 1.79519400685551 Area num. 2: in rads; 1.79519400685551 to 2.69279101028326 Area num. 3: in rads; 2.69279101028326 to 3.59038801371102 Area num. 4: in rads; 3.59038801371102 to 4.48798501713877 Area num. 5: in rads; 4.48798501713877 to 5.38558202056653 Area num. 6: in rads; 5.38558202056653 to 6.28317902399428 Area num. 7: in rads; 6.28317902399428 to 0 It seems that drawing area 7 cover the whole chart. So it would be: Draw.Circle(106, 106, 105, 6.28317902399428, 0) 6.28317902399428 is same as Pi(2) or 360 degrees, which means start is same as end. I think whole circle should be drawn with this: Draw.Circle(106, 106, 105, 0, 6.28317902399428) And this shouldn't draw anything: Draw.Circle(106, 106, 105, 6.28317902399428, 0) Jussi Actually the old Draw class was wrong, because you can draw a pie clockwise (End Start) or counter-clockwise (End Start). So only Start = End should not draw anything (or just a line between the center and the point at the specified angle). -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user attachment: Screenshot.png-- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
haaa vector ... what a great thing for great things ... but not for small ones... does it do the same with a smaller linewidth ? 2012/12/10 Jussi Lahtinen jussi.lahti...@gmail.com OK, makes sense. One tiny thing more... Draw.Foreground = Color.Black Draw.LineWidth = 3 Draw.Circle(106, 106, 105) Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid 'this draws very narrow sector Draw.FillColor = Color.Black Draw.Circle(106, 106, 105, Rad(359), Rad(360)) 'this draws little red cross at center point of the sector. Draw.Foreground = Color.Red Draw.Line(104, 106, 108, 106) Draw.Line(106, 104, 106, 108) However sector is off from center point. See attachment. Jussi On Sun, Dec 9, 2012 at 5:12 PM, Benoît Minisini gam...@users.sourceforge.net wrote: Le 07/12/2012 14:28, Jussi Lahtinen a écrit : Fixed in revision #5415. Something is still different from the original behaviour. I use same circle commands to draw pie chart and it still fails... Test output: Area num. 0: in rads; 0 to 0.89759700342775 Area num. 1: in rads; 0.89759700342775 to 1.79519400685551 Area num. 2: in rads; 1.79519400685551 to 2.69279101028326 Area num. 3: in rads; 2.69279101028326 to 3.59038801371102 Area num. 4: in rads; 3.59038801371102 to 4.48798501713877 Area num. 5: in rads; 4.48798501713877 to 5.38558202056653 Area num. 6: in rads; 5.38558202056653 to 6.28317902399428 Area num. 7: in rads; 6.28317902399428 to 0 It seems that drawing area 7 cover the whole chart. So it would be: Draw.Circle(106, 106, 105, 6.28317902399428, 0) 6.28317902399428 is same as Pi(2) or 360 degrees, which means start is same as end. I think whole circle should be drawn with this: Draw.Circle(106, 106, 105, 0, 6.28317902399428) And this shouldn't draw anything: Draw.Circle(106, 106, 105, 6.28317902399428, 0) Jussi Actually the old Draw class was wrong, because you can draw a pie clockwise (End Start) or counter-clockwise (End Start). So only Start = End should not draw anything (or just a line between the center and the point at the specified angle). -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Yes, it makes difference. See screenshots. Jussi On Mon, Dec 10, 2012 at 8:19 PM, Fabien Bodard gambas...@gmail.com wrote: haaa vector ... what a great thing for great things ... but not for small ones... does it do the same with a smaller linewidth ? 2012/12/10 Jussi Lahtinen jussi.lahti...@gmail.com OK, makes sense. One tiny thing more... Draw.Foreground = Color.Black Draw.LineWidth = 3 Draw.Circle(106, 106, 105) Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid 'this draws very narrow sector Draw.FillColor = Color.Black Draw.Circle(106, 106, 105, Rad(359), Rad(360)) 'this draws little red cross at center point of the sector. Draw.Foreground = Color.Red Draw.Line(104, 106, 108, 106) Draw.Line(106, 104, 106, 108) However sector is off from center point. See attachment. Jussi On Sun, Dec 9, 2012 at 5:12 PM, Benoît Minisini gam...@users.sourceforge.net wrote: Le 07/12/2012 14:28, Jussi Lahtinen a écrit : Fixed in revision #5415. Something is still different from the original behaviour. I use same circle commands to draw pie chart and it still fails... Test output: Area num. 0: in rads; 0 to 0.89759700342775 Area num. 1: in rads; 0.89759700342775 to 1.79519400685551 Area num. 2: in rads; 1.79519400685551 to 2.69279101028326 Area num. 3: in rads; 2.69279101028326 to 3.59038801371102 Area num. 4: in rads; 3.59038801371102 to 4.48798501713877 Area num. 5: in rads; 4.48798501713877 to 5.38558202056653 Area num. 6: in rads; 5.38558202056653 to 6.28317902399428 Area num. 7: in rads; 6.28317902399428 to 0 It seems that drawing area 7 cover the whole chart. So it would be: Draw.Circle(106, 106, 105, 6.28317902399428, 0) 6.28317902399428 is same as Pi(2) or 360 degrees, which means start is same as end. I think whole circle should be drawn with this: Draw.Circle(106, 106, 105, 0, 6.28317902399428) And this shouldn't draw anything: Draw.Circle(106, 106, 105, 6.28317902399428, 0) Jussi Actually the old Draw class was wrong, because you can draw a pie clockwise (End Start) or counter-clockwise (End Start). So only Start = End should not draw anything (or just a line between the center and the point at the specified angle). -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user attachment: linewidth0.5.pngattachment: linewidth6.png-- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 10/12/2012 19:34, Jussi Lahtinen a écrit : Yes, it makes difference. See screenshots. Jussi On Mon, Dec 10, 2012 at 8:19 PM, Fabien Bodard gambas...@gmail.com wrote: haaa vector ... what a great thing for great things ... but not for small ones... does it do the same with a smaller linewidth ? I think this issue is related to the Paint.LineCap and Paint.LineJoin properties. Try to play with them before drawing the pie, I think it will fix the drawing artifacts. Regards, -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
I think this issue is related to the Paint.LineCap and Paint.LineJoin properties. Try to play with them before drawing the pie, I think it will fix the drawing artifacts. Yes, either with Paint.Linejoin = Paint.LineJoinBevel or Paint.LineJoinRound everything works as expected. However Paint.LineCap doesn't seem to do anything at all. Thanks! Jussi -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 07/12/2012 14:28, Jussi Lahtinen a écrit : Fixed in revision #5415. Something is still different from the original behaviour. I use same circle commands to draw pie chart and it still fails... Test output: Area num. 0: in rads; 0 to 0.89759700342775 Area num. 1: in rads; 0.89759700342775 to 1.79519400685551 Area num. 2: in rads; 1.79519400685551 to 2.69279101028326 Area num. 3: in rads; 2.69279101028326 to 3.59038801371102 Area num. 4: in rads; 3.59038801371102 to 4.48798501713877 Area num. 5: in rads; 4.48798501713877 to 5.38558202056653 Area num. 6: in rads; 5.38558202056653 to 6.28317902399428 Area num. 7: in rads; 6.28317902399428 to 0 It seems that drawing area 7 cover the whole chart. So it would be: Draw.Circle(106, 106, 105, 6.28317902399428, 0) 6.28317902399428 is same as Pi(2) or 360 degrees, which means start is same as end. I think whole circle should be drawn with this: Draw.Circle(106, 106, 105, 0, 6.28317902399428) And this shouldn't draw anything: Draw.Circle(106, 106, 105, 6.28317902399428, 0) Jussi Actually the old Draw class was wrong, because you can draw a pie clockwise (End Start) or counter-clockwise (End Start). So only Start = End should not draw anything (or just a line between the center and the point at the specified angle). -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Fixed in revision #5415. Something is still different from the original behaviour. I use same circle commands to draw pie chart and it still fails... Test output: Area num. 0: in rads; 0 to 0.89759700342775 Area num. 1: in rads; 0.89759700342775 to 1.79519400685551 Area num. 2: in rads; 1.79519400685551 to 2.69279101028326 Area num. 3: in rads; 2.69279101028326 to 3.59038801371102 Area num. 4: in rads; 3.59038801371102 to 4.48798501713877 Area num. 5: in rads; 4.48798501713877 to 5.38558202056653 Area num. 6: in rads; 5.38558202056653 to 6.28317902399428 Area num. 7: in rads; 6.28317902399428 to 0 It seems that drawing area 7 cover the whole chart. So it would be: Draw.Circle(106, 106, 105, 6.28317902399428, 0) 6.28317902399428 is same as Pi(2) or 360 degrees, which means start is same as end. I think whole circle should be drawn with this: Draw.Circle(106, 106, 105, 0, 6.28317902399428) And this shouldn't draw anything: Draw.Circle(106, 106, 105, 6.28317902399428, 0) Jussi -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Still something wrong... By this code I would expect to see two sectors each of them quarter of whole circle, now second one (blue) is half of circle. Draw.FillColor = Color.Red Draw.Circle(106, 106, 105, 0, Rad(90)) Draw.FillColor = Color.Blue Draw.Circle(106, 106, 105, Rad(90), Rad(180)) Jussi On Thu, Dec 6, 2012 at 2:21 AM, Benoît Minisini gam...@users.sourceforge.net wrote: Le 05/12/2012 12:51, Benoît Minisini a écrit : Le 02/12/2012 22:59, Jussi Lahtinen a écrit : At least latest revision has changed behaviour of circle keyword (in Qt4). This doesn't draw red sector, instead it seems to draw some part of it which doesn't start from x,y: Draw.Foreground = Color.Black Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid Draw.FillColor = Color.Red Draw.Circle(x, y, iSize, fStartAngle, fAngle) Jussi I confirm the regression. I will look at it... OK, it should be fixed in revision #5413. Regards, -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 06/12/2012 23:51, Jussi Lahtinen a écrit : Still something wrong... By this code I would expect to see two sectors each of them quarter of whole circle, now second one (blue) is half of circle. Draw.FillColor = Color.Red Draw.Circle(106, 106, 105, 0, Rad(90)) Draw.FillColor = Color.Blue Draw.Circle(106, 106, 105, Rad(90), Rad(180)) Jussi Fixed in revision #5415. Regards, -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 02/12/2012 22:59, Jussi Lahtinen a écrit : At least latest revision has changed behaviour of circle keyword (in Qt4). This doesn't draw red sector, instead it seems to draw some part of it which doesn't start from x,y: Draw.Foreground = Color.Black Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid Draw.FillColor = Color.Red Draw.Circle(x, y, iSize, fStartAngle, fAngle) Jussi I confirm the regression. I will look at it... -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
Re: [Gambas-user] Drawing sector
Le 05/12/2012 12:51, Benoît Minisini a écrit : Le 02/12/2012 22:59, Jussi Lahtinen a écrit : At least latest revision has changed behaviour of circle keyword (in Qt4). This doesn't draw red sector, instead it seems to draw some part of it which doesn't start from x,y: Draw.Foreground = Color.Black Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid Draw.FillColor = Color.Red Draw.Circle(x, y, iSize, fStartAngle, fAngle) Jussi I confirm the regression. I will look at it... OK, it should be fixed in revision #5413. Regards, -- Benoît Minisini -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user
[Gambas-user] Drawing sector
At least latest revision has changed behaviour of circle keyword (in Qt4). This doesn't draw red sector, instead it seems to draw some part of it which doesn't start from x,y: Draw.Foreground = Color.Black Draw.LineWidth = 1 Draw.FillStyle = Fill.Solid Draw.FillColor = Color.Red Draw.Circle(x, y, iSize, fStartAngle, fAngle) Jussi -- Keep yourself connected to Go Parallel: DESIGN Expert tips on starting your parallel project right. http://goparallel.sourceforge.net/ ___ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user