Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-07 Thread stepharo
ok let me know when you have a new "stable" version so that I try my example. Stef Le 4/4/16 23:21, Andrei Chis a écrit : Hi Stef, Currently there was a distinction between Shape and Path which turn out to be confusing. So Shape will go away and there will be just a Path (line, circle,

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Ben Coman
On Wed, Apr 6, 2016 at 4:36 PM, Igor Stasenko wrote: > That explains, why, there initially certain features of Cairo, that not > exposed by Athens. > It is not because we can't or just don't care.. we do.. But only after we > can see that it consistent with rest of API and can

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Nicolai Hess
2016-04-06 10:07 GMT+02:00 Igor Stasenko : > > > On 6 April 2016 at 10:35, Nicolai Hess wrote: > >> >> >> 2016-04-05 16:31 GMT+02:00 Igor Stasenko : >> >>> >>> >>> On 5 April 2016 at 17:27, Igor Stasenko wrote:

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Igor Stasenko
That explains, why, there initially certain features of Cairo, that not exposed by Athens. It is not because we can't or just don't care.. we do.. But only after we can see that it consistent with rest of API and can be easily implemented on most of other potential backends. Yes, i am talking

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Igor Stasenko
On 6 April 2016 at 11:14, Thierry Goubier wrote: > > > 2016-04-06 10:07 GMT+02:00 Igor Stasenko : > >> >> >> On 6 April 2016 at 10:35, Nicolai Hess wrote: >> >>> >>> I made some fixes for AthensBalloon (not all are integrated

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Igor Stasenko
I started working on Athens by picking up a previous work by Cyrille (if i'm not mistaken). And his work also predated by Rome plugin , that was done by (and here my memory fails me).. Originally it was looked as a simple wrapper of Cairo library, reflecting its design and API straightly and

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Thierry Goubier
2016-04-06 10:07 GMT+02:00 Igor Stasenko : > > > On 6 April 2016 at 10:35, Nicolai Hess wrote: > >> >> I made some fixes for AthensBalloon (not all are integrated yet, some >> parts are just experimental and needs more tests), the idea is to have >>

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Igor Stasenko
On 6 April 2016 at 10:35, Nicolai Hess wrote: > > > 2016-04-05 16:31 GMT+02:00 Igor Stasenko : > >> >> >> On 5 April 2016 at 17:27, Igor Stasenko wrote: >> >>> >>> >>> On 5 April 2016 at 16:29, Aliaksei Syrel

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-06 Thread Nicolai Hess
2016-04-05 16:31 GMT+02:00 Igor Stasenko : > > > On 5 April 2016 at 17:27, Igor Stasenko wrote: > >> >> >> On 5 April 2016 at 16:29, Aliaksei Syrel wrote: >> >>> Now let's take a look at this code: >>> >>> drawOnSpartaCanvas: aCanvas

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 17:27, Igor Stasenko wrote: > > > On 5 April 2016 at 16:29, Aliaksei Syrel wrote: > >> Now let's take a look at this code: >> >> drawOnSpartaCanvas: aCanvas >> >>> aCanvas >>> clipPreserveBy: self shape during: [ >>> aCanvas

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 16:29, Aliaksei Syrel wrote: > Now let's take a look at this code: > > drawOnSpartaCanvas: aCanvas > >> aCanvas >> clipPreserveBy: self shape during: [ >> aCanvas paintGroup: [ >> aCanvas setPaint: self shape fillPaint. >> aCanvas fillPreserve. >>

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 16:51, Aliaksei Syrel wrote: > Let me now clarify terminology behind path / shape (with fill and stroke). > > We decided to not invent a wheel and rely on our knowledge of english. > Instead it is better to be in sync with terminology used among graphics

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Aliaksei Syrel
Let me now clarify terminology behind path / shape (with fill and stroke). We decided to not invent a wheel and rely on our knowledge of english. Instead it is better to be in sync with terminology used among graphics and vector designers. As an example let's stick with Adobe's naming

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 16:15, Aliaksei Syrel wrote: > Hello Igor > > Thanks for extensive design explanation and effort! > Issues you mentioned in previous emails are important and need to be > addressed :) > fill(), stroke() fillPreserve() strokePreserve() need to disappear in

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Aliaksei Syrel
Now let's take a look at this code: drawOnSpartaCanvas: aCanvas > aCanvas > clipPreserveBy: self shape during: [ > aCanvas paintGroup: [ > aCanvas setPaint: self shape fillPaint. > aCanvas fillPreserve. > aCanvas paintMode source. > aCanvas setStrokePaint: self shape strokePaint. > aCanvas

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Cyril Ferlicot Delbecque
On 05/04/2016 15:08, Igor Stasenko wrote: > > > On 5 April 2016 at 15:58, p...@highoctane.be > > wrote: > > Made a quick gist of of > this: >

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Aliaksei Syrel
Hello Igor Thanks for extensive design explanation and effort! Issues you mentioned in previous emails are important and need to be addressed :) fill(), stroke() fillPreserve() strokePreserve() need to disappear in the end. We will come back to them later. Let me tell a few words about Sparta.

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 15:58, p...@highoctane.be wrote: > Made a quick gist of of this: > https://gist.github.com/philippeback/ef4d128e953de226cf40639641f83e04 > > Thanks. Would be nice if someone with better English than mine skim trough it and fix bad language :) > On Tue,

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread p...@highoctane.be
Made a quick gist of of this: https://gist.github.com/philippeback/ef4d128e953de226cf40639641f83e04 On Tue, Apr 5, 2016 at 1:33 PM, Igor Stasenko wrote: > > > On 5 April 2016 at 04:00, Ben Coman wrote: > >> On Tue, Apr 5, 2016 at 2:51 AM, Igor Stasenko

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
Couple more words about that fill() function abstraction. Now you probably understand why there's no notion of stroke operation in Athens. Because instead of introducing it that way, by adding new kind of a function stroke(shape,paint) from our perspective, it falls into our more generic fill()

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 04:00, Ben Coman wrote: > On Tue, Apr 5, 2016 at 2:51 AM, Igor Stasenko wrote: > > > > Some more bashing today.. (don't take it personal, i may be wrong) > > > > BlPath hierarchy.. and BlShape. > > > > Why you redefining what is shape

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 02:37, Aliaksei Syrel wrote: > About hit detection. Idea was to be completely general. And this is the > only approach I found (still bad because uses native calls instead of > athens-like solution) that works with text. Text is also a shape and it's >

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Igor Stasenko
On 5 April 2016 at 02:34, Aliaksei Syrel wrote: > > Seriously, brute force is synonym of dumb. If you cannot solve the > problem > by anything else than using brute force, then first thing you do, you > leave an extensive comment "sorry guys, this piece stinks, but i was

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-05 Thread Erik Stel
Hi Igor and others, (Without having seen any of the code, but from experience on other (Javascript) project, beziers might be useful. Maybe the mentioned approach for polygon approximation is already based on beziers. Forgive me for wasting your time in that case.) Beziers may be a good starting

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Ben Coman
On Tue, Apr 5, 2016 at 2:51 AM, Igor Stasenko wrote: > > Some more bashing today.. (don't take it personal, i may be wrong) > > BlPath hierarchy.. and BlShape. > > Why you redefining what is shape and what is path? > Of course, you are free to do it in Bloc.. > But in terms of

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Aliaksei Syrel
About hit detection. Idea was to be completely general. And this is the only approach I found (still bad because uses native calls instead of athens-like solution) that works with text. Text is also a shape and it's very cool to be able to detect events inside characters. Imagine morph in form of

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Aliaksei Syrel
> Seriously, brute force is synonym of dumb. If you cannot solve the problem by anything else than using brute force, then first thing you do, you leave an extensive comment "sorry guys, this piece stinks, but i was <...> unable to do any better". That is enough, Igor. Calling other developers or

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 5 April 2016 at 00:50, Anonymous wrote: > As far as I know bloc already has perfect hit detection. In BlPath. What a > dumb state holder! > > Aha, i see - containsX: x Y: y render the path to determine if it contains point or not. Thank you for pointing out! Now

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Anonymous
As far as I know bloc already has perfect hit detection. In BlPath. What a dumb state holder! -- View this message in context: http://forum.world.st/bloc-I-do-not-understand-why-some-behavior-is-not-in-the-right-place-tp4888273p4888315.html Sent from the Pharo Smalltalk Developers mailing list

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 5 April 2016 at 01:12, Igor Stasenko wrote: > > > On 5 April 2016 at 00:51, Andrei Chis wrote: > > btw, Andrei , if you looking how you can test if point contains shape or > not, take a look at AthensCurveFlattener. > It converts curved path,

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 5 April 2016 at 00:51, Andrei Chis wrote: btw, Andrei , if you looking how you can test if point contains shape or not, take a look at AthensCurveFlattener. It converts curved path, that containing Bezier curves (or not) into simple polygonal shape that consists

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Andrei Chis
On Mon, Apr 4, 2016 at 11:45 PM, Igor Stasenko wrote: > > > On 4 April 2016 at 23:17, stepharo wrote: > >> Doru >> >> I have the impression that >> clipping and interaction can be defined by a "shape" >> then the drawing can be either drawn in a canvas or

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 4 April 2016 at 23:17, stepharo wrote: > Doru > > I have the impression that > clipping and interaction can be defined by a "shape" > then the drawing can be either drawn in a canvas or delegate to something > else (for example for the cursor if there is an hardware

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 4 April 2016 at 23:21, stepharo wrote: > Hi igor > > I like your feedback. > Could you summarize it based on the latest alpha version and now that you > saw the code? > > My biggest source of concern, when i look at it is attempt to funnel features of Athens to obfuscate it

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Andrei Chis
Hi Stef, Currently there was a distinction between Shape and Path which turn out to be confusing. So Shape will go away and there will be just a Path (line, circle, rectangle, etc). We started to refactor this during the PharoDays. And yes, Rectangle will be polymorphic with Path. BlElement

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread stepharo
Hi igor I like your feedback. Could you summarize it based on the latest alpha version and now that you saw the code? In the bloc version you discussed with alain (in the house I was renovating) an element had a view that were responsibe of the rendering but it was not good. Stef Le

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread stepharo
Doru I have the impression that clipping and interaction can be defined by a "shape" then the drawing can be either drawn in a canvas or delegate to something else (for example for the cursor if there is an hardware rendering). I like this discussion and the feedback of igor because he is

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
Some more bashing today.. (don't take it personal, i may be wrong) BlPath hierarchy.. and BlShape. Why you redefining what is shape and what is path? Of course, you are free to do it in Bloc.. But in terms of Athens, all of BlPath are actually - shapes.. And BlShape is some kind of encapsulation

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
Nevermind, i found. Here some comments. Q. So, why you think i made Color to be polymorphic with Athens Paint protocol? A. Exactly to avoid producing extra entities like this: (BlColorPaint new color: (Color blue alpha: 0.5)) Because this BlColorPaint adds nothing , has no any extra

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Cyril Ferlicot D.
Le 04/04/2016 18:56, Igor Stasenko a écrit : > > where i can download and look at this code? > Hi Igor, Via Pharo Launcher under Moose Jenkins -> bloc. Or at https://ci.inria.fr/moose/job/bloc/ > > -- > Best regards, > Igor Stasenko. -- Cyril Ferlicot http://www.synectique.eu 165

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Tudor Girba
Hi, Indeed, this was not clear. The original idea of the shape was to be primarily responsible for the clipping, but in the meantime the stroke and fill filtered in the implementation. Alex, Andrei and I will now change the “shape” to only be responsible for clipping and leave the drawing to

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
On 4 April 2016 at 19:00, stepharo wrote: > I saw in bleedingEdge it is different and looks better. > Now I was wondering why shape did not do the rendering and I thought that > this is may be because a shape can be used for doing something else > than rendering. For example

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread stepharo
I saw in bleedingEdge it is different and looks better. Now I was wondering why shape did not do the rendering and I thought that this is may be because a shape can be used for doing something else than rendering. For example clipping or as igor mentioned defining the shape of the interaction

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Tudor Girba
Hi, Please take the latest version :). Cheers, Doru > On Apr 4, 2016, at 8:28 AM, Igor Stasenko wrote: > > What is it? > > Why people so obsessed to overcomplicate everything? > How drawFillOnAthensCanvas would look like, if you do things right? > > BlElement

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Igor Stasenko
What is it? Why people so obsessed to overcomplicate everything? How drawFillOnAthensCanvas would look like, if you do things right? BlElement >>drawOnAthensCanvas: aCanvas ^ aCanvas draw: self shape. pfff On 4 April 2016 at 18:17, stepharo wrote: > BlElement

Re: [Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread Andrei Chis
Hi Stef, Which build/version are you using? These methods are removed in the latest version. You can download the latest version from the Moose CI. From the bloc project you need the bleeding edge build. The link to this version is here:

[Pharo-dev] [ bloc ] I do not understand why some behavior is not in the right place

2016-04-04 Thread stepharo
BlElement >>drawStrokeOnAthensCanvas: aCanvas "Actually render stroke of a receiver on aCanvas in local bounds. Override to customize. aCanvas is an instance of AthensCanvas aCanvas must not be nil" | pathTransform strokePath strokeScaling strokeOffset | "fast exit if