Re: [Pharo-users] Athens and ellipse drawing

2014-06-29 Thread Nicolai Hess
Igor, what do you think. Is it possible or should it be possible to draw a non-uniform scaled path with an unscaled (stroke-)paint? Nicolai 2014-06-25 21:35 GMT+02:00 Juraj Kubelka : > I have understood it is not possible. > > Cheers, > Juraj > > > > -- > View this message in context: > http:/

Re: [Pharo-users] Athens and ellipse drawing

2014-06-25 Thread Juraj Kubelka
I have understood it is not possible. Cheers, Juraj -- View this message in context: http://forum.world.st/Athens-and-ellipse-drawing-tp4754256p4764784.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Re: [Pharo-users] Athens and ellipse drawing

2014-06-22 Thread Nicolai Hess
in (pure) cairo it is possible to stroke a path, after restoring the current state/transformation: cairo_set_line_width (cr, 0.1); cairo_save (cr); cairo_scale (cr, 0.5, 1); cairo_arc (cr, 0.5, 0.5, 0.40, 0, 2 * M_PI); cairo_restore (cr); cairo_stroke (cr); So we can scale the circle arc to a

Re: [Pharo-users] Athens and ellipse drawing

2014-04-23 Thread Henrik Johansen
On 23 Apr 2014, at 2:31 , Igor Stasenko wrote: > > > > On 23 April 2014 13:17, Henrik Johansen wrote: > > On 22 Apr 2014, at 2:23 , Igor Stasenko wrote: > > > as for why there's 4 arc segments instead of one, its because > > of bad approximation, when drawing more that 90 degree arcs. > >

Re: [Pharo-users] Athens and ellipse drawing

2014-04-23 Thread Igor Stasenko
On 23 April 2014 13:17, Henrik Johansen wrote: > > On 22 Apr 2014, at 2:23 , Igor Stasenko wrote: > > > as for why there's 4 arc segments instead of one, its because > > of bad approximation, when drawing more that 90 degree arcs. > > > > also, in athens, arc segment is defined with following inp

Re: [Pharo-users] Athens and ellipse drawing

2014-04-23 Thread Henrik Johansen
On 22 Apr 2014, at 2:23 , Igor Stasenko wrote: > as for why there's 4 arc segments instead of one, its because > of bad approximation, when drawing more that 90 degree arcs. > > also, in athens, arc segment is defined with following inputs: > - end point of previous segment (implicit) > - angl

Re: [Pharo-users] Athens and ellipse drawing

2014-04-22 Thread stepharo
Thanks for the explanation I will add them to the chapter. On 22/4/14 14:05, Igor Stasenko wrote: On 14 April 2014 13:53, Juraj Kubelka > wrote: El 14-04-2014, a las 8:21, Juraj Kubelka mailto:juraj.kube...@gmail.com>> escribió: Thank you Stef,

Re: [Pharo-users] Athens and ellipse drawing

2014-04-22 Thread Igor Stasenko
as for why there's 4 arc segments instead of one, its because of bad approximation, when drawing more that 90 degree arcs. also, in athens, arc segment is defined with following inputs: - end point of previous segment (implicit) - angle - direction (clockwise/counterclockwise) - end point the rad

Re: [Pharo-users] Athens and ellipse drawing

2014-04-22 Thread Igor Stasenko
On 14 April 2014 13:53, Juraj Kubelka wrote: > > El 14-04-2014, a las 8:21, Juraj Kubelka > escribió: > > Thank you Stef, > > the example helped me a lot to understand how to play with Athens. > > The solution is not what I am looking for. If someone starts to play with > alpha canal, s/he will

Re: [Pharo-users] Athens and ellipse drawing

2014-04-14 Thread Juraj Kubelka
El 14-04-2014, a las 8:21, Juraj Kubelka escribió:Thank you Stef,the example helped me a lot to understand how to play with Athens. The solution is not what I am looking for. If someone starts to play with alpha canal, s/he will get unexpected results.I have finally found

Re: [Pharo-users] Athens and ellipse drawing

2014-04-14 Thread Juraj Kubelka
Thank you Stef,the example helped me a lot to understand how to play with Athens. The solution is not what I am looking for. If someone starts to play with alpha canal, s/he will get unexpected results.I have finally found an example in C language. It look like this:-=-=-=-=- cairo_set_line_width (

Re: [Pharo-users] Athens and ellipse drawing

2014-04-12 Thread Pharo4Stef
AthensSceneView new scene: [ :can | | path | path := can createPath: [ :builder | builder absolute;

Re: [Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Juraj Kubelka
El 11-04-2014, a las 20:56, Igor Stasenko escribió:On 12 April 2014 01:37, Juraj Kubelka  wrote:Thank you Igor,I suspect there is no better solution. But anyway I am surprised, every simple drawing application manages ellipses.  Athens is not an applica

Re: [Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Juraj Kubelka
El 11-04-2014, a las 20:56, Igor Stasenko escribió: > > > > On 12 April 2014 01:37, Juraj Kubelka wrote: > Thank you Igor, > > I suspect there is no better solution. But anyway I am surprised, every > simple drawing application manages ellipses. > > > Athens is not an application, it i

Re: [Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Igor Stasenko
On 12 April 2014 01:37, Juraj Kubelka wrote: > Thank you Igor, > > I suspect there is no better solution. But anyway I am surprised, every > simple drawing application manages ellipses. > > Athens is not an application, it is framework. And why you think that every framework supports drawing elli

Re: [Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Juraj Kubelka
Thank you Igor, I suspect there is no better solution. But anyway I am surprised, every simple drawing application manages ellipses. Thank you anyway. Juraj El 11-04-2014, a las 17:35, Igor Stasenko escribió: > yes, you using stroke for 2nd ellipse, > but stroke width is also subject of sca

Re: [Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Igor Stasenko
yes, you using stroke for 2nd ellipse, but stroke width is also subject of scaling, that's why it has different width, because of non-uniform scaling (x/y). instead you can first, draw a filled ellipse (blue) and then draw green one over it. On 11 April 2014 21:33, Juraj Kubelka wrote: > Hi Igo

[Pharo-users] Athens and ellipse drawing

2014-04-11 Thread Juraj Kubelka
Hi Igor, hi all!I am not sure how to properly draw ellipse. Right now I draw a path like this:The path is created that way:-=-=-=-=-computePath path := self athensCanvascreatePath: [ :builder |  builder absolute; moveTo: 0 @ 0.5; ccwArcTo: 0.5 @ 0.0 angle: 90 degreesToRadians