You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2014/09/08 09:48:15 UTC

[FlexJS] Drawing API

FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions

So far, the rendering fidelity between the Flash and SVG/HTML5 version is
very very close.  For sure, there are some pretty major things to be worked
out, but generally so far, the results have been very encouraging.

You can see a quick and dirty example here:
Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/

HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
Android browser and iPad Safari.

Next up, i will be working on the following items:
Polygons, Linear gradients, Radial gradients, filters and drop shadows.
These should bring us very close to our current FXG based drawing APIs.

After that, I plan on programmatically recreating a few FXG based skins in
FlexJS and see how we can apply it skins on UI components.

Feedback welcome!

[1]
https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
[2]
https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Or lineTo?

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Off to of head think you want to use drawLine rather than drawPath

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> Are you saying this change, which you advocated, was wrong?  Was there a
> reversal of the thread somewhere?

Neither - see my other email and the original thread on legal.

> Can you point me to a podling or two that got rejected for doing this for AL 3rd party content?

Off top of head look at Drill + Flink. There been other cases but usually it's fix this before you next release, having extra stuff in LICENSE is not as big an issue as missing stuff from LICENSE as the minimum legal requirement have still been met.

Thanks,
Justin

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> The second entry in the Installer LICENSE for the updater is not a binary.
> Are you saying we did that wrong?

I'd say it's not required. Having extra stuff in LICENSE is not a legal issue as the minimum requirements have been met, but they may not need to be there.

> You are correct that it isn't "legally required" by the AL.  As I said in
> my email, it appears to be a convention, not even policy, and we started
> following that convention with the Installer release.

It's not required, not policy and not even a convention as far as I can see. There have been several discussions on incubator about this in recent time, including one suggestion to list 3rd party Apache licensed software in a separate file instead of not listing it at all.

> I'm surprised folks are getting rejected.  I'd like to know more about
> what podlings got rejected and why and if sebb supported the rejection.

You'll need to just ask him if you want his opinion, I can't recall any objections so I would guess not.

Justin

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.
The second entry in the Installer LICENSE for the updater is not a binary.
 Are you saying we did that wrong?

You are correct that it isn't "legally required" by the AL.  As I said in
my email, it appears to be a convention, not even policy, and we started
following that convention with the Installer release.

I'm surprised folks are getting rejected.  I'd like to know more about
what podlings got rejected and why and if sebb supported the rejection.

-Alex

On 9/9/14 3:23 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>The issue with Open Sans font is different as it is a binary not a source
>file. It's Apache licensed but not obviously so. Most Apache licences
>software have source headers so you know how they were licensed, but a
>binary font file doesn't have a source header that's easily readable (the
>metedata in the binary may include the license information), so that
>pointer in LICENSE is just making the licensing clear. It's not actually
>legally required by the Apache license.
>
>Thanks,
>Justin


Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

The issue with Open Sans font is different as it is a binary not a source file. It's Apache licensed but not obviously so. Most Apache licences software have source headers so you know how they were licensed, but a binary font file doesn't have a source header that's easily readable (the metedata in the binary may include the license information), so that pointer in LICENSE is just making the licensing clear. It's not actually legally required by the Apache license.

Thanks,
Justin

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.
On 9/9/14 2:57 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>Please do not do this. There have been several incubator projects who's
>release candidates have been rejected for including Apache licensed
>software in LICENSE. If something is Apache licensed 3rd party or not
>there is no need to add it to LICENSE. [1]
Interesting.  Do you remember this thread [2]?
It resulted in us adding the following to the Installer LICENSE.

-------
APACHE FLEX SUBCOMPONENTS:

The Apache Flex Installer includes a number of subcomponents with
separate copyright notices and license terms. Your use of the source
code for the these subcomponents is subject to the terms and
conditions of the following licenses.

The Open-Sans font is available under Apache License 2.0.  For details
see common/src/assets/fonts/open-sans/

The NativeApplicationUpdater is available under Apache License 2.0.
For details see installer/src/com/riaspace/
-------


Are you saying this change, which you advocated, was wrong?  Was there a
reversal of the thread somewhere?  Can you point me to a podling or two
that got rejected for doing this for AL 3rd party content?

>
>1.http://www.apache.org/dev/licensing-howto.html#alv2-dep

[2] 
http://mail-archives.apache.org/mod_mbox/www-legal-discuss/201406.mbox/%3cC
AOGo0VandukWwdgzmf5faRuTKcQBzDBBoYUP+twdcVe+35XB8w@mail.gmail.com%3e


Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/14 5:38 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>>> or list where the code came form in another file,
>> Our last instructions are to do so in the LICENSE file.
>
>For a binary file whose license wasn't immediately clear. Here we have a
>source file with an Apache header, this is clearly covered by [1].
Maybe I wasn't clear enough: by "last instructions" I meant this thread
[2] in which sebb approved a patch that would modify the paragraph you
link to in [1] to read:

"Assuming once again that that the bundled dependency itself contains no
bundled subcomponents under other licenses and thus the ALv2 applies
uniformly to all files, there is no need to add another copy of the ALv2
license, but if the dependency is third-party, the LICENSE file should
include:

 'Includes Foo V1.2 under the Apache License 2.0'"


It does not mention binaries so I think it applies to source as well.  I
guess I could see if I have karma to go apply the patch now, but you're
saying there's another thread on documenting 3rd party works somewhere
else in the ASF?  Is on another list besides general@ or is it buried in
some podling's vote thread?

Thanks,
-Alex
>
>1. http://www.apache.org/dev/licensing-howto.html#alv2-dep
[2] 
http://mail-archives.apache.org/mod_mbox/www-legal-discuss/201406.mbox/%3cC
AOGo0VandukWwdgzmf5faRuTKcQBzDBBoYUP+twdcVe+35XB8w@mail.gmail.com%3e


Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

>> or list where the code came form in another file,
> Our last instructions are to do so in the LICENSE file.

For a binary file whose license wasn't immediately clear. Here we have a source file with an Apache header, this is clearly covered by [1]. 

Thanks,
Justin

1. http://www.apache.org/dev/licensing-howto.html#alv2-dep

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.
I guess we've hit another disagreement.  I'm not sure we need a ruling
right away and since Justin says the topic is under debate in the
incubator, I think we should go with our last instructions for now and get
a final ruling later.

On 9/9/14 4:13 PM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>
>Under the terms of the Apache licence you can include that code with no
>changes to LICENSE or NOTICE.
Agree.

>IMO it wouldn't hurt and may be helpful to ask permission,
I wouldn't want to set such a precedent.  We've included other AL works
without permission.

> or list where the code came form in another file,
Our last instructions are to do so in the LICENSE file.

>or add the original author to the CONTRIBUTORS file or similar.
AFAIK, we have not done that for other bundled works.  Doesn't feel right
to me.

>Knowing what software has been bundled, where it came from and what
>version it was is always good to know.
And again, our last instructions are to do so in LICENSE.

-Alex


Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> I want to include the svgweb version since they have made all the
> modifications that I want and hence easily plugs into the Path api.

Probably what should of happened was text added to their NOTICE file when the header was changed and then we would of carried that over to our NOTICE file. But given the move was from one permissive license to another I'm not sure that's even required. But as there's no NOTICE file there no need to do anything.

Under the terms of the Apache licence you can include that code with no changes to LICENSE or NOTICE. IMO it wouldn't hurt and may be helpful to ask permission, or list where the code came form in another file, or add the original author to the CONTRIBUTORS file or similar. Knowing what software has been bundled, where it came from and what version it was is always good to know.

Thanks,
Justin

Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, Sep 9, 2014 at 3:21 PM, Alex Harui <ah...@adobe.com> wrote:

> Again, I am not an authority, but I believe permissive licenses like
> Apache and MIT allow for re-licensing.  The question is, which work do you
> want to include?
>

I want to include the svgweb version since they have made all the
modifications that I want and hence easily plugs into the Path api.

Thanks,
Om


>
> -Alex
>
> On 9/9/14 3:10 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >Okay, time to reset this conversation.  I was digging deeper and found a
> >comment on the class in svgweb that mentions that this code actually came
> >from the Degrafa library [1]
> >
> >Degrafa is released under MIT license [2].
> >
> >I guess this means that we still have to add this under the subcomponents
> >area in the LICENSE file, right?
> >
> >Thanks,
> >Om
> >
> >[1]
> >
> https://code.google.com/p/degrafa/source/browse/branches/Origin/Degrafa/co
> >m/degrafa/geometry/utilities/ArcUtils.as?r=187
> >[2] https://code.google.com/p/degrafa/
> >
> >On Tue, Sep 9, 2014 at 2:57 PM, Justin Mclean <ju...@classsoftware.com>
> >wrote:
> >
> >> Hi,
> >>
> >> Please do not do this. There have been several incubator projects who's
> >> release candidates have been rejected for including Apache licensed
> >> software in LICENSE. If something is Apache licensed 3rd party or not
> >>there
> >> is no need to add it to LICENSE. [1]
> >>
> >> > Yes.  And we should make a note that it is third-party in the LICENSE
> >> file
> >> > by adding:
> >> >
> >> > --------
> >> > APACHE FLEX SUBCOMPONENTS:
> >> >
> >> > The Apache Flex Installer includes a number of subcomponents with
> >> > separate copyright notices and license terms. Your use of the source
> >> > code for the these subcomponents is subject to the terms and
> >> > conditions of the following licenses.
> >> >
> >> > The Elliptical Arc algorithm is available under Apache License 2.0.
> >>For
> >> > details
> >> > see <path to file>
> >> >
> >> > --------
> >>
> >> Justin
> >>
> >> 1.http://www.apache.org/dev/licensing-howto.html#alv2-dep
>
>

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.
Again, I am not an authority, but I believe permissive licenses like
Apache and MIT allow for re-licensing.  The question is, which work do you
want to include?

-Alex

On 9/9/14 3:10 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>Okay, time to reset this conversation.  I was digging deeper and found a
>comment on the class in svgweb that mentions that this code actually came
>from the Degrafa library [1]
>
>Degrafa is released under MIT license [2].
>
>I guess this means that we still have to add this under the subcomponents
>area in the LICENSE file, right?
>
>Thanks,
>Om
>
>[1]
>https://code.google.com/p/degrafa/source/browse/branches/Origin/Degrafa/co
>m/degrafa/geometry/utilities/ArcUtils.as?r=187
>[2] https://code.google.com/p/degrafa/
>
>On Tue, Sep 9, 2014 at 2:57 PM, Justin Mclean <ju...@classsoftware.com>
>wrote:
>
>> Hi,
>>
>> Please do not do this. There have been several incubator projects who's
>> release candidates have been rejected for including Apache licensed
>> software in LICENSE. If something is Apache licensed 3rd party or not
>>there
>> is no need to add it to LICENSE. [1]
>>
>> > Yes.  And we should make a note that it is third-party in the LICENSE
>> file
>> > by adding:
>> >
>> > --------
>> > APACHE FLEX SUBCOMPONENTS:
>> >
>> > The Apache Flex Installer includes a number of subcomponents with
>> > separate copyright notices and license terms. Your use of the source
>> > code for the these subcomponents is subject to the terms and
>> > conditions of the following licenses.
>> >
>> > The Elliptical Arc algorithm is available under Apache License 2.0.
>>For
>> > details
>> > see <path to file>
>> >
>> > --------
>>
>> Justin
>>
>> 1.http://www.apache.org/dev/licensing-howto.html#alv2-dep


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
Okay, time to reset this conversation.  I was digging deeper and found a
comment on the class in svgweb that mentions that this code actually came
from the Degrafa library [1]

Degrafa is released under MIT license [2].

I guess this means that we still have to add this under the subcomponents
area in the LICENSE file, right?

Thanks,
Om

[1]
https://code.google.com/p/degrafa/source/browse/branches/Origin/Degrafa/com/degrafa/geometry/utilities/ArcUtils.as?r=187
[2] https://code.google.com/p/degrafa/

On Tue, Sep 9, 2014 at 2:57 PM, Justin Mclean <ju...@classsoftware.com>
wrote:

> Hi,
>
> Please do not do this. There have been several incubator projects who's
> release candidates have been rejected for including Apache licensed
> software in LICENSE. If something is Apache licensed 3rd party or not there
> is no need to add it to LICENSE. [1]
>
> > Yes.  And we should make a note that it is third-party in the LICENSE
> file
> > by adding:
> >
> > --------
> > APACHE FLEX SUBCOMPONENTS:
> >
> > The Apache Flex Installer includes a number of subcomponents with
> > separate copyright notices and license terms. Your use of the source
> > code for the these subcomponents is subject to the terms and
> > conditions of the following licenses.
> >
> > The Elliptical Arc algorithm is available under Apache License 2.0.  For
> > details
> > see <path to file>
> >
> > --------
>
> Justin
>
> 1.http://www.apache.org/dev/licensing-howto.html#alv2-dep

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

Please do not do this. There have been several incubator projects who's release candidates have been rejected for including Apache licensed software in LICENSE. If something is Apache licensed 3rd party or not there is no need to add it to LICENSE. [1]

> Yes.  And we should make a note that it is third-party in the LICENSE file
> by adding:
> 
> --------
> APACHE FLEX SUBCOMPONENTS:
> 
> The Apache Flex Installer includes a number of subcomponents with
> separate copyright notices and license terms. Your use of the source
> code for the these subcomponents is subject to the terms and
> conditions of the following licenses.
> 
> The Elliptical Arc algorithm is available under Apache License 2.0.  For
> details
> see <path to file>
> 
> --------

Justin

1.http://www.apache.org/dev/licensing-howto.html#alv2-dep

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/14 11:18 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>I will just bring that file as is with their headers and copyright info.
>And make static calls to methods in that class.
>
>Just to be clear, is it okay to copy that file as is into our codebase?
Yes.  And we should make a note that it is third-party in the LICENSE file
by adding:

--------
APACHE FLEX SUBCOMPONENTS:

The Apache Flex Installer includes a number of subcomponents with
separate copyright notices and license terms. Your use of the source
code for the these subcomponents is subject to the terms and
conditions of the following licenses.

The Elliptical Arc algorithm is available under Apache License 2.0.  For
details
see <path to file>

--------

If it were my choice, I would just download it as part of the build and/or
release packaging, but downloading does make the build more fragile, and
you'd have to change the LICENSE either way, and we've already got
third-party stuff in the repo for Open-Sans font and RiaSpace updater, etc.

-Alex


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Tue, Sep 9, 2014 at 10:48 AM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 9/9/14 9:51 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> >Not to poke my nose to deep into what is shaping up to be one of those
> >nice
> >and informative legal threads, but I think I may have a relevant question:
> >if some bit of code is AL, is there a 'legal' way to rip it apart and put
> >it back together again, improved and upgraded and then use it for the
> >project?
> I do not claim to have authority to give a final answer, which is why we
> usually end up asking on legal-discuss, but my mental model is this:
>
> -Every line of code was written by somebody, and therefore copyrighted by
> that somebody (or their employer).
> -The Apache License says you can bundle those lines of code into some
> larger code base and modify or add to them.
> -Copyright law says that after some amount of modification, you own the
> lines you changed/added and somebody owns the lines you didn't touch.
>
> IMO, the law sort of stops there, then policy starts to take over:
>
> -There is an unwritten policy that says that Apache projects do not "take"
> code.  It must be "donated".
> -Apache projects are free to use code from other projects within the ASF.
> -AL-licensed code not outside the ASF is considered third-party.
> -Things not donated can be bundled as third-party.
> -Third-party headers should remain intact and not modified to the standard
> ASF header.
> -Copyrights in NOTICE files in bundled AL works get aggregated in the
> top-level NOTICE file
>
> And then there is a convention we learned about during the last installer
> release.
> -The LICENSE file should provide pointers to third-party works
>
> So, IMO, the answer to your question is "yes", but then we have to handle
> it properly afterwards.  If you take some code and totally rewrite it, I
> believe it is then all yours.  This would be the case when porting code
> from one language to another.
> It gets murky if you re-implement some functionality already in the same
> language.  For MD5Stream, I took the code from a third party, left the
> public function headers and some constants intact and rewrote the method
> bodies.  When done, I felt that there was no creative content left from
> the original so I considered it mine and "donated" it to the ASF.  In
> briefly looking at the code Om borrowed, it looked like lots of it was
> from the original so I would think it needs third-party handling.  IMO, if
> you think the end result is going to have a fair amount of original code
> in it, I would start from a copy of the original file and modify it, as
> opposed to starting a blank file and copying third-party code into it.
>
>
I don't have anything useful to add to that well written
algorithm/function.
I will just bring that file as is with their headers and copyright info.
And make static calls to methods in that class.

Just to be clear, is it okay to copy that file as is into our codebase?

Thanks,
Om



> -Alex
>
>
>

Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

>> -Every line of code was written by somebody, and therefore copyrighted by
>> that somebody (or their employer).

Depends on the actually LICENSE. If you look at [1] you see that it states:

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

>> -There is an unwritten policy that says that Apache projects do not "take"
>> code.  It must be "donated".

In this case IMO there's no need to, but it certainly doesn't hurt to ask the owner of the code for permission, even though it is already given by the license (see above).

>> -The LICENSE file should provide pointers to third-party works

That's is for MIT and BSD licensed works not Apache licensed works.

Thanks,
Justin

1. http://www.apache.org/licenses/LICENSE-2.0

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/14 11:39 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

>Thanks Alex! The way you explain it helps me to (finally) understand how
>this stuff fits together.
>
>Would you mind if I put that information in the Wiki, for future reference
>and instruction?

I suppose, but again, it isn't authoritative.  Also, I forgot to emphasize
that all that I wrote only applies to AL-licensed stuff.  It can be
different even for other category A licenses.

-Alex


Re: [FlexJS] Drawing API

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Thanks Alex! The way you explain it helps me to (finally) understand how
this stuff fits together.

Would you mind if I put that information in the Wiki, for future reference
and instruction?

EdB



On Tue, Sep 9, 2014 at 7:48 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 9/9/14 9:51 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
> >Not to poke my nose to deep into what is shaping up to be one of those
> >nice
> >and informative legal threads, but I think I may have a relevant question:
> >if some bit of code is AL, is there a 'legal' way to rip it apart and put
> >it back together again, improved and upgraded and then use it for the
> >project?
> I do not claim to have authority to give a final answer, which is why we
> usually end up asking on legal-discuss, but my mental model is this:
>
> -Every line of code was written by somebody, and therefore copyrighted by
> that somebody (or their employer).
> -The Apache License says you can bundle those lines of code into some
> larger code base and modify or add to them.
> -Copyright law says that after some amount of modification, you own the
> lines you changed/added and somebody owns the lines you didn't touch.
>
> IMO, the law sort of stops there, then policy starts to take over:
>
> -There is an unwritten policy that says that Apache projects do not "take"
> code.  It must be "donated".
> -Apache projects are free to use code from other projects within the ASF.
> -AL-licensed code not outside the ASF is considered third-party.
> -Things not donated can be bundled as third-party.
> -Third-party headers should remain intact and not modified to the standard
> ASF header.
> -Copyrights in NOTICE files in bundled AL works get aggregated in the
> top-level NOTICE file
>
> And then there is a convention we learned about during the last installer
> release.
> -The LICENSE file should provide pointers to third-party works
>
> So, IMO, the answer to your question is "yes", but then we have to handle
> it properly afterwards.  If you take some code and totally rewrite it, I
> believe it is then all yours.  This would be the case when porting code
> from one language to another.
> It gets murky if you re-implement some functionality already in the same
> language.  For MD5Stream, I took the code from a third party, left the
> public function headers and some constants intact and rewrote the method
> bodies.  When done, I felt that there was no creative content left from
> the original so I considered it mine and "donated" it to the ASF.  In
> briefly looking at the code Om borrowed, it looked like lots of it was
> from the original so I would think it needs third-party handling.  IMO, if
> you think the end result is going to have a fair amount of original code
> in it, I would start from a copy of the original file and modify it, as
> opposed to starting a blank file and copying third-party code into it.
>
> -Alex
>
>
>


-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/14 9:51 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>Not to poke my nose to deep into what is shaping up to be one of those
>nice
>and informative legal threads, but I think I may have a relevant question:
>if some bit of code is AL, is there a 'legal' way to rip it apart and put
>it back together again, improved and upgraded and then use it for the
>project?
I do not claim to have authority to give a final answer, which is why we
usually end up asking on legal-discuss, but my mental model is this:

-Every line of code was written by somebody, and therefore copyrighted by
that somebody (or their employer).
-The Apache License says you can bundle those lines of code into some
larger code base and modify or add to them.
-Copyright law says that after some amount of modification, you own the
lines you changed/added and somebody owns the lines you didn't touch.

IMO, the law sort of stops there, then policy starts to take over:

-There is an unwritten policy that says that Apache projects do not "take"
code.  It must be "donated".
-Apache projects are free to use code from other projects within the ASF.
-AL-licensed code not outside the ASF is considered third-party.
-Things not donated can be bundled as third-party.
-Third-party headers should remain intact and not modified to the standard
ASF header.
-Copyrights in NOTICE files in bundled AL works get aggregated in the
top-level NOTICE file

And then there is a convention we learned about during the last installer
release.
-The LICENSE file should provide pointers to third-party works

So, IMO, the answer to your question is "yes", but then we have to handle
it properly afterwards.  If you take some code and totally rewrite it, I
believe it is then all yours.  This would be the case when porting code
from one language to another.
It gets murky if you re-implement some functionality already in the same
language.  For MD5Stream, I took the code from a third party, left the
public function headers and some constants intact and rewrote the method
bodies.  When done, I felt that there was no creative content left from
the original so I considered it mine and "donated" it to the ASF.  In
briefly looking at the code Om borrowed, it looked like lots of it was
from the original so I would think it needs third-party handling.  IMO, if
you think the end result is going to have a fair amount of original code
in it, I would start from a copy of the original file and modify it, as
opposed to starting a blank file and copying third-party code into it.

-Alex
 


Re: [FlexJS] Drawing API

Posted by Erik de Bruin <er...@ixsoftware.nl>.
>
> >> As part of this implementation, I borrowed the drawEllipicalArc() method
> >> from the svgweb library(flash implementation of SVG) [1]  The code is
> >> Apache licensed.  I have added the link to the original code as a
> >>comment
> >> in our code.  Do I need to mention this in the NOTICE or LICENSE files?
> >
> >As it's Apache licences nothing need to be added NOTICE and LICENSE. [1]
> >You only need to add something if there was a NOTICE file. (which looks
> >like there isn't).
>
> It looks like lots of lines of code were "borrowed" which, IMO, means it
> is still third-party and not donated.  I'm wondering if there was any way
> to use their file as-is, or their file with slight modifications.  That
> would make it more clear that this is mostly or entirely a third-party
> work.  Then their header would be on the file with their copyright, and I
> think we'd mention it in LICENSE like we did for Open-Sans font which is
> also AL.
>

Not to poke my nose to deep into what is shaping up to be one of those nice
and informative legal threads, but I think I may have a relevant question:
if some bit of code is AL, is there a 'legal' way to rip it apart and put
it back together again, improved and upgraded and then use it for the
project?

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.

On 9/9/14 1:30 AM, "Justin Mclean" <ju...@classsoftware.com> wrote:

>Hi,
>
>> As part of this implementation, I borrowed the drawEllipicalArc() method
>> from the svgweb library(flash implementation of SVG) [1]  The code is
>> Apache licensed.  I have added the link to the original code as a
>>comment
>> in our code.  Do I need to mention this in the NOTICE or LICENSE files?
>
>As it's Apache licences nothing need to be added NOTICE and LICENSE. [1]
>You only need to add something if there was a NOTICE file. (which looks
>like there isn't).

It looks like lots of lines of code were "borrowed" which, IMO, means it
is still third-party and not donated.  I'm wondering if there was any way
to use their file as-is, or their file with slight modifications.  That
would make it more clear that this is mostly or entirely a third-party
work.  Then their header would be on the file with their copyright, and I
think we'd mention it in LICENSE like we did for Open-Sans font which is
also AL.

-Alex


Re: [FlexJS] Drawing API

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

> As part of this implementation, I borrowed the drawEllipicalArc() method
> from the svgweb library(flash implementation of SVG) [1]  The code is
> Apache licensed.  I have added the link to the original code as a comment
> in our code.  Do I need to mention this in the NOTICE or LICENSE files?

As it's Apache licences nothing need to be added NOTICE and LICENSE. [1] You only need to add something if there was a NOTICE file. (which looks like there isn't).

Also seem fine as per their license file [2]

Thanks,
Justin

1.http://www.apache.org/dev/licensing-howto.html#alv2-dep
2. https://code.google.com/p/svgweb/source/browse/trunk/COPYING.txt

Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
Have run into a problem on the JS side. Firebox is telling me that in this
code from GraphicShape.js:

org.apache.flex.core.graphics.GraphicShape.prototype.addedToParent =
function() {
  var bbox = this.element.getBBox();
  this.resize(this.x_, this.y_, bbox.width + this.x_ * 2, bbox.height +
this.y_ * 2);
};


this.element.getBBox() is returning undefined. I know that this.element is
set with an SVG element.

I'm using Firefox 31.0 on Mac OS X.

Peter Ent
Adobe Systems

On 9/9/14 10:37 AM, "Peter Ent" <pe...@adobe.com> wrote:

>The update to handle 'A' and 'a' works great! Thanks.
>
>Peter Ent
>Adobe Systems
>
>On 9/9/14 3:42 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
>>On Mon, Sep 8, 2014 at 3:53 PM, OmPrakash Muppirala
>><bi...@gmail.com>
>>wrote:
>>
>>> On Mon, Sep 8, 2014 at 1:59 PM, Peter Ent <pe...@adobe.com> wrote:
>>>
>>>> I haven't tried the JS side - this is all Flash. In SVG, the fill
>>>>takes
>>>> care of closing the path; I'm not using any line or border.
>>>>
>>>>
>>> Yes, it looks like the A parameter is not supported.  I will work on
>>> adding this support in Path.  I took a big chunk of the Path
>>>implementation
>>> from spark.primitives.Path.  It seems like we do need to tweak it
>>>further.
>>>
>>>
>>Hi,
>>
>>The support for 'a' and 'A' (Elliptical Arc) has been added to the Flash
>>implementation of the Path api.  I tried with this:
>>
>>path.drawPath(250,500,"M 50 50 L 100 50 A 50 50 0 0 0 50 0 Z");
>>
>>and got a nice little wedge drawn on the screen.
>>
>>More importantly, the Flash and SVG renderings look (almost) the same.
>>
>>As part of this implementation, I borrowed the drawEllipicalArc() method
>>from the svgweb library(flash implementation of SVG) [1]  The code is
>>Apache licensed.  I have added the link to the original code as a comment
>>in our code.  Do I need to mention this in the NOTICE or LICENSE files?
>>
>>Peter, if you can do some more testing and let me know your feedback,
>>that
>>would be great.
>>
>>And looks like this can be added to the current SDK's FXG implementation
>>as
>>well.  I am surprised that we did not hit this issue in the current SDK.
>>
>>Thanks,
>>Om
>>
>>[1]
>>https://code.google.com/p/svgweb/source/browse/trunk/src/org/svgweb/utils
>>/
>>EllipticalArc.as?r=1251
>>
>>
>>
>>
>>> I see that mx.charts.chartClasses.GraphicsUtilities has a drawArc()
>>> method.   I will probably end up using that implementation.
>>>
>>>
>>>> Which brings me to the next issue. When drawing a series of connected
>>>> lines (for the LineChart), the first and last points are getting
>>>> connected, which I do not want. My loop to build the path looks like
>>>>this,
>>>> below. point[0] != point[last] so they should not be connected. I
>>>>tried
>>>> "z" and "Z" thinking one meant leave the path closed and one closed
>>>>the
>>>> path, but that didn't make any difference.
>>>>
>>>>                                 var pathString:String = "";
>>>>
>>>>                                 for (var i:int=0; i < points.length;
>>>>i++)
>>>> {
>>>>                                     var point:Object = points[i];
>>>>                                         if (i == 0) pathString += "M
>>>> "+point.x+" "+point.y+" ";
>>>>                                         else pathString += "L
>>>>"+point.x+"
>>>> "+point.y+" ";
>>>>                                 }
>>>>
>>>>                                 pathString += "Z";
>>>>
>>>>                                 path.drawPath(0, 0, pathString);
>>>>
>>>>
>>>
>>> That is weird.  I will play with it and see why that is happening.
>>>
>>
>>> Is moveTo() and lineTo() a better approach?
>>>
>>> In psedocode, the lines would be drawn like this:
>>>
>>> graphics.moveTo(points[0].x, points[0].y);
>>> for (var i:int=0; i < points.length; i++) {
>>>   if(i+1 < points.length)
>>>   {
>>>     graphics.lineTo(points[i+1].x, points[i+1].y);
>>>   }
>>> }
>>>
>>> In any case, I have the Line class in my list of Graphic elements  to
>>> implement.
>>>
>>>
>>
>>
>>
>>> Thanks,
>>> Om
>>>
>>>
>>>>
>>>> Thanks,
>>>> Peter Ent
>>>> Adobe Systems
>>>>
>>>> On 9/8/14 4:13 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>>>
>>>> >On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:
>>>> >
>>>> >> I took care of the gjslint issues.
>>>> >>
>>>> >
>>>> >Thanks!  Hope it was not too much trouble.
>>>> >
>>>> >
>>>> >>
>>>> >> Can you supply more information about Path and what is in the path
>>>> >>string?
>>>> >> I have a path working in SVG to do the wedges for the pie chart,
>>>>but
>>>> >>that
>>>> >> same string isn't working with core.graphics.Path.
>>>> >>
>>>> >> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 +
>>>>' A'
>>>> >>+
>>>> >> radius + ' ' + radius +
>>>> >>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
>>>> >>
>>>> >>
>>>> >> It doesn't look, to me, like "A" is being recognized.
>>>> >>
>>>> >
>>>> >The path looks like it is doing the following:
>>>> >M x y : move to x, y
>>>> >L x1 y1 : draw line from x,y to x1,y1
>>>> >A radius radius  : draw an arc with xradius=radius and yradius =
>>>>radius
>>>> >(so, a circular arc)
>>>> >0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
>>>> >x2 y2 : ending point of the arc
>>>> >z : finish drawing
>>>> >
>>>> >BTW, don't you need another line to complete the wedge?
>>>> >
>>>> >Is it working fine on the flash side?  I will take a look soon.
>>>> >
>>>> >Thanks,
>>>> >Om
>>>> >
>>>> >
>>>> >>
>>>> >> Thanks,
>>>> >> Peter Ent
>>>> >> Adobe Systems
>>>> >>
>>>> >> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com>
>>>> wrote:
>>>> >>
>>>> >> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>>>> >> >>
>>>> >> >> I forgot to add that when I build flex-asjs, gjslint finds a
>>>>number
>>>> >>of
>>>> >> >> issues in the new JS graphics code (its usual, spaces at the end
>>>>of
>>>> >> >>lines,
>>>> >> >> sort of thing). I think I am using version 2.3.10 of gjslint but
>>>>I'm
>>>> >>not
>>>> >> >> 100% sure.
>>>> >> >
>>>> >> >Yeah, unfortunately there is no gjslint available for Windows.  I
>>>> >>guess I
>>>> >> >will need you Mac folks to help me out with this :-)
>>>> >> >
>>>> >> >Thanks,
>>>> >> >Om
>>>> >> >
>>>> >> >>
>>>> >> >> Peter Ent
>>>> >> >> Adobe Systems
>>>> >> >>
>>>> >> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com>
>>>> >>wrote:
>>>> >> >>
>>>> >> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle,
>>>> >>Path,
>>>> >> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2]
>>>> >>versions
>>>> >> >> >
>>>> >> >> >So far, the rendering fidelity between the Flash and SVG/HTML5
>>>> >>version
>>>> >> >>is
>>>> >> >> >very very close.  For sure, there are some pretty major things
>>>>to
>>>> be
>>>> >> >> >worked
>>>> >> >> >out, but generally so far, the results have been very
>>>>encouraging.
>>>> >> >> >
>>>> >> >> >You can see a quick and dirty example here:
>>>> >> >> >Flash version:
>>>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>>>> >> >> >HTML5 version:
>>>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>>>> >> >> >
>>>> >> >> >HTML5 version has been tested to work fine on Chrome, Firefox,
>>>> IE11,
>>>> >> >> >Android browser and iPad Safari.
>>>> >> >> >
>>>> >> >> >Next up, i will be working on the following items:
>>>> >> >> >Polygons, Linear gradients, Radial gradients, filters and drop
>>>> >>shadows.
>>>> >> >> >These should bring us very close to our current FXG based
>>>>drawing
>>>> >>APIs.
>>>> >> >> >
>>>> >> >> >After that, I plan on programmatically recreating a few FXG
>>>>based
>>>> >>skins
>>>> >> >in
>>>> >> >> >FlexJS and see how we can apply it skins on UI components.
>>>> >> >> >
>>>> >> >> >Feedback welcome!
>>>> >> >> >
>>>> >> >> >[1]
>>>> >> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> 
>>>>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects
>>>>/
>>>>F
>>>> >>l
>>>> >> >> >exJSUI/src/org/apache/flex/core/graphics
>>>> >> >> >[2]
>>>> >> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> 
>>>>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/s
>>>>r
>>>>c
>>>> >>/
>>>> >> >> >org/apache/flex/core/graphics
>>>> >> >>
>>>> >>
>>>> >>
>>>>
>>>>
>>>
>


Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
The update to handle 'A' and 'a' works great! Thanks.

Peter Ent
Adobe Systems

On 9/9/14 3:42 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Mon, Sep 8, 2014 at 3:53 PM, OmPrakash Muppirala <bi...@gmail.com>
>wrote:
>
>> On Mon, Sep 8, 2014 at 1:59 PM, Peter Ent <pe...@adobe.com> wrote:
>>
>>> I haven't tried the JS side - this is all Flash. In SVG, the fill takes
>>> care of closing the path; I'm not using any line or border.
>>>
>>>
>> Yes, it looks like the A parameter is not supported.  I will work on
>> adding this support in Path.  I took a big chunk of the Path
>>implementation
>> from spark.primitives.Path.  It seems like we do need to tweak it
>>further.
>>
>>
>Hi,
>
>The support for 'a' and 'A' (Elliptical Arc) has been added to the Flash
>implementation of the Path api.  I tried with this:
>
>path.drawPath(250,500,"M 50 50 L 100 50 A 50 50 0 0 0 50 0 Z");
>
>and got a nice little wedge drawn on the screen.
>
>More importantly, the Flash and SVG renderings look (almost) the same.
>
>As part of this implementation, I borrowed the drawEllipicalArc() method
>from the svgweb library(flash implementation of SVG) [1]  The code is
>Apache licensed.  I have added the link to the original code as a comment
>in our code.  Do I need to mention this in the NOTICE or LICENSE files?
>
>Peter, if you can do some more testing and let me know your feedback, that
>would be great.
>
>And looks like this can be added to the current SDK's FXG implementation
>as
>well.  I am surprised that we did not hit this issue in the current SDK.
>
>Thanks,
>Om
>
>[1]
>https://code.google.com/p/svgweb/source/browse/trunk/src/org/svgweb/utils/
>EllipticalArc.as?r=1251
>
>
>
>
>> I see that mx.charts.chartClasses.GraphicsUtilities has a drawArc()
>> method.   I will probably end up using that implementation.
>>
>>
>>> Which brings me to the next issue. When drawing a series of connected
>>> lines (for the LineChart), the first and last points are getting
>>> connected, which I do not want. My loop to build the path looks like
>>>this,
>>> below. point[0] != point[last] so they should not be connected. I tried
>>> "z" and "Z" thinking one meant leave the path closed and one closed the
>>> path, but that didn't make any difference.
>>>
>>>                                 var pathString:String = "";
>>>
>>>                                 for (var i:int=0; i < points.length;
>>>i++)
>>> {
>>>                                     var point:Object = points[i];
>>>                                         if (i == 0) pathString += "M
>>> "+point.x+" "+point.y+" ";
>>>                                         else pathString += "L
>>>"+point.x+"
>>> "+point.y+" ";
>>>                                 }
>>>
>>>                                 pathString += "Z";
>>>
>>>                                 path.drawPath(0, 0, pathString);
>>>
>>>
>>
>> That is weird.  I will play with it and see why that is happening.
>>
>
>> Is moveTo() and lineTo() a better approach?
>>
>> In psedocode, the lines would be drawn like this:
>>
>> graphics.moveTo(points[0].x, points[0].y);
>> for (var i:int=0; i < points.length; i++) {
>>   if(i+1 < points.length)
>>   {
>>     graphics.lineTo(points[i+1].x, points[i+1].y);
>>   }
>> }
>>
>> In any case, I have the Line class in my list of Graphic elements  to
>> implement.
>>
>>
>
>
>
>> Thanks,
>> Om
>>
>>
>>>
>>> Thanks,
>>> Peter Ent
>>> Adobe Systems
>>>
>>> On 9/8/14 4:13 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>>
>>> >On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:
>>> >
>>> >> I took care of the gjslint issues.
>>> >>
>>> >
>>> >Thanks!  Hope it was not too much trouble.
>>> >
>>> >
>>> >>
>>> >> Can you supply more information about Path and what is in the path
>>> >>string?
>>> >> I have a path working in SVG to do the wedges for the pie chart, but
>>> >>that
>>> >> same string isn't working with core.graphics.Path.
>>> >>
>>> >> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 +
>>>' A'
>>> >>+
>>> >> radius + ' ' + radius +
>>> >>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
>>> >>
>>> >>
>>> >> It doesn't look, to me, like "A" is being recognized.
>>> >>
>>> >
>>> >The path looks like it is doing the following:
>>> >M x y : move to x, y
>>> >L x1 y1 : draw line from x,y to x1,y1
>>> >A radius radius  : draw an arc with xradius=radius and yradius =
>>>radius
>>> >(so, a circular arc)
>>> >0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
>>> >x2 y2 : ending point of the arc
>>> >z : finish drawing
>>> >
>>> >BTW, don't you need another line to complete the wedge?
>>> >
>>> >Is it working fine on the flash side?  I will take a look soon.
>>> >
>>> >Thanks,
>>> >Om
>>> >
>>> >
>>> >>
>>> >> Thanks,
>>> >> Peter Ent
>>> >> Adobe Systems
>>> >>
>>> >> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com>
>>> wrote:
>>> >>
>>> >> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>>> >> >>
>>> >> >> I forgot to add that when I build flex-asjs, gjslint finds a
>>>number
>>> >>of
>>> >> >> issues in the new JS graphics code (its usual, spaces at the end
>>>of
>>> >> >>lines,
>>> >> >> sort of thing). I think I am using version 2.3.10 of gjslint but
>>>I'm
>>> >>not
>>> >> >> 100% sure.
>>> >> >
>>> >> >Yeah, unfortunately there is no gjslint available for Windows.  I
>>> >>guess I
>>> >> >will need you Mac folks to help me out with this :-)
>>> >> >
>>> >> >Thanks,
>>> >> >Om
>>> >> >
>>> >> >>
>>> >> >> Peter Ent
>>> >> >> Adobe Systems
>>> >> >>
>>> >> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com>
>>> >>wrote:
>>> >> >>
>>> >> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle,
>>> >>Path,
>>> >> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2]
>>> >>versions
>>> >> >> >
>>> >> >> >So far, the rendering fidelity between the Flash and SVG/HTML5
>>> >>version
>>> >> >>is
>>> >> >> >very very close.  For sure, there are some pretty major things
>>>to
>>> be
>>> >> >> >worked
>>> >> >> >out, but generally so far, the results have been very
>>>encouraging.
>>> >> >> >
>>> >> >> >You can see a quick and dirty example here:
>>> >> >> >Flash version:
>>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>>> >> >> >HTML5 version:
>>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>>> >> >> >
>>> >> >> >HTML5 version has been tested to work fine on Chrome, Firefox,
>>> IE11,
>>> >> >> >Android browser and iPad Safari.
>>> >> >> >
>>> >> >> >Next up, i will be working on the following items:
>>> >> >> >Polygons, Linear gradients, Radial gradients, filters and drop
>>> >>shadows.
>>> >> >> >These should bring us very close to our current FXG based
>>>drawing
>>> >>APIs.
>>> >> >> >
>>> >> >> >After that, I plan on programmatically recreating a few FXG
>>>based
>>> >>skins
>>> >> >in
>>> >> >> >FlexJS and see how we can apply it skins on UI components.
>>> >> >> >
>>> >> >> >Feedback welcome!
>>> >> >> >
>>> >> >> >[1]
>>> >> >> >
>>> >> >
>>> >>
>>> >>
>>> 
>>>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/
>>>F
>>> >>l
>>> >> >> >exJSUI/src/org/apache/flex/core/graphics
>>> >> >> >[2]
>>> >> >> >
>>> >> >
>>> >>
>>> >>
>>> 
>>>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/sr
>>>c
>>> >>/
>>> >> >> >org/apache/flex/core/graphics
>>> >> >>
>>> >>
>>> >>
>>>
>>>
>>


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Sep 8, 2014 at 3:53 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> On Mon, Sep 8, 2014 at 1:59 PM, Peter Ent <pe...@adobe.com> wrote:
>
>> I haven't tried the JS side - this is all Flash. In SVG, the fill takes
>> care of closing the path; I'm not using any line or border.
>>
>>
> Yes, it looks like the A parameter is not supported.  I will work on
> adding this support in Path.  I took a big chunk of the Path implementation
> from spark.primitives.Path.  It seems like we do need to tweak it further.
>
>
Hi,

The support for 'a' and 'A' (Elliptical Arc) has been added to the Flash
implementation of the Path api.  I tried with this:

path.drawPath(250,500,"M 50 50 L 100 50 A 50 50 0 0 0 50 0 Z");

and got a nice little wedge drawn on the screen.

More importantly, the Flash and SVG renderings look (almost) the same.

As part of this implementation, I borrowed the drawEllipicalArc() method
from the svgweb library(flash implementation of SVG) [1]  The code is
Apache licensed.  I have added the link to the original code as a comment
in our code.  Do I need to mention this in the NOTICE or LICENSE files?

Peter, if you can do some more testing and let me know your feedback, that
would be great.

And looks like this can be added to the current SDK's FXG implementation as
well.  I am surprised that we did not hit this issue in the current SDK.

Thanks,
Om

[1]
https://code.google.com/p/svgweb/source/browse/trunk/src/org/svgweb/utils/EllipticalArc.as?r=1251




> I see that mx.charts.chartClasses.GraphicsUtilities has a drawArc()
> method.   I will probably end up using that implementation.
>
>
>> Which brings me to the next issue. When drawing a series of connected
>> lines (for the LineChart), the first and last points are getting
>> connected, which I do not want. My loop to build the path looks like this,
>> below. point[0] != point[last] so they should not be connected. I tried
>> "z" and "Z" thinking one meant leave the path closed and one closed the
>> path, but that didn't make any difference.
>>
>>                                 var pathString:String = "";
>>
>>                                 for (var i:int=0; i < points.length; i++)
>> {
>>                                     var point:Object = points[i];
>>                                         if (i == 0) pathString += "M
>> "+point.x+" "+point.y+" ";
>>                                         else pathString += "L "+point.x+"
>> "+point.y+" ";
>>                                 }
>>
>>                                 pathString += "Z";
>>
>>                                 path.drawPath(0, 0, pathString);
>>
>>
>
> That is weird.  I will play with it and see why that is happening.
>

> Is moveTo() and lineTo() a better approach?
>
> In psedocode, the lines would be drawn like this:
>
> graphics.moveTo(points[0].x, points[0].y);
> for (var i:int=0; i < points.length; i++) {
>   if(i+1 < points.length)
>   {
>     graphics.lineTo(points[i+1].x, points[i+1].y);
>   }
> }
>
> In any case, I have the Line class in my list of Graphic elements  to
> implement.
>
>



> Thanks,
> Om
>
>
>>
>> Thanks,
>> Peter Ent
>> Adobe Systems
>>
>> On 9/8/14 4:13 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>
>> >On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:
>> >
>> >> I took care of the gjslint issues.
>> >>
>> >
>> >Thanks!  Hope it was not too much trouble.
>> >
>> >
>> >>
>> >> Can you supply more information about Path and what is in the path
>> >>string?
>> >> I have a path working in SVG to do the wedges for the pie chart, but
>> >>that
>> >> same string isn't working with core.graphics.Path.
>> >>
>> >> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A'
>> >>+
>> >> radius + ' ' + radius +
>> >>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
>> >>
>> >>
>> >> It doesn't look, to me, like "A" is being recognized.
>> >>
>> >
>> >The path looks like it is doing the following:
>> >M x y : move to x, y
>> >L x1 y1 : draw line from x,y to x1,y1
>> >A radius radius  : draw an arc with xradius=radius and yradius = radius
>> >(so, a circular arc)
>> >0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
>> >x2 y2 : ending point of the arc
>> >z : finish drawing
>> >
>> >BTW, don't you need another line to complete the wedge?
>> >
>> >Is it working fine on the flash side?  I will take a look soon.
>> >
>> >Thanks,
>> >Om
>> >
>> >
>> >>
>> >> Thanks,
>> >> Peter Ent
>> >> Adobe Systems
>> >>
>> >> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com>
>> wrote:
>> >>
>> >> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>> >> >>
>> >> >> I forgot to add that when I build flex-asjs, gjslint finds a number
>> >>of
>> >> >> issues in the new JS graphics code (its usual, spaces at the end of
>> >> >>lines,
>> >> >> sort of thing). I think I am using version 2.3.10 of gjslint but I'm
>> >>not
>> >> >> 100% sure.
>> >> >
>> >> >Yeah, unfortunately there is no gjslint available for Windows.  I
>> >>guess I
>> >> >will need you Mac folks to help me out with this :-)
>> >> >
>> >> >Thanks,
>> >> >Om
>> >> >
>> >> >>
>> >> >> Peter Ent
>> >> >> Adobe Systems
>> >> >>
>> >> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com>
>> >>wrote:
>> >> >>
>> >> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle,
>> >>Path,
>> >> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2]
>> >>versions
>> >> >> >
>> >> >> >So far, the rendering fidelity between the Flash and SVG/HTML5
>> >>version
>> >> >>is
>> >> >> >very very close.  For sure, there are some pretty major things to
>> be
>> >> >> >worked
>> >> >> >out, but generally so far, the results have been very encouraging.
>> >> >> >
>> >> >> >You can see a quick and dirty example here:
>> >> >> >Flash version:
>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>> >> >> >HTML5 version:
>> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>> >> >> >
>> >> >> >HTML5 version has been tested to work fine on Chrome, Firefox,
>> IE11,
>> >> >> >Android browser and iPad Safari.
>> >> >> >
>> >> >> >Next up, i will be working on the following items:
>> >> >> >Polygons, Linear gradients, Radial gradients, filters and drop
>> >>shadows.
>> >> >> >These should bring us very close to our current FXG based drawing
>> >>APIs.
>> >> >> >
>> >> >> >After that, I plan on programmatically recreating a few FXG based
>> >>skins
>> >> >in
>> >> >> >FlexJS and see how we can apply it skins on UI components.
>> >> >> >
>> >> >> >Feedback welcome!
>> >> >> >
>> >> >> >[1]
>> >> >> >
>> >> >
>> >>
>> >>
>> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/F
>> >>l
>> >> >> >exJSUI/src/org/apache/flex/core/graphics
>> >> >> >[2]
>> >> >> >
>> >> >
>> >>
>> >>
>> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src
>> >>/
>> >> >> >org/apache/flex/core/graphics
>> >> >>
>> >>
>> >>
>>
>>
>

Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Sep 8, 2014 at 1:59 PM, Peter Ent <pe...@adobe.com> wrote:

> I haven't tried the JS side - this is all Flash. In SVG, the fill takes
> care of closing the path; I'm not using any line or border.
>
>
Yes, it looks like the A parameter is not supported.  I will work on adding
this support in Path.  I took a big chunk of the Path implementation from
spark.primitives.Path.  It seems like we do need to tweak it further.

I see that mx.charts.chartClasses.GraphicsUtilities has a drawArc()
method.   I will probably end up using that implementation.


> Which brings me to the next issue. When drawing a series of connected
> lines (for the LineChart), the first and last points are getting
> connected, which I do not want. My loop to build the path looks like this,
> below. point[0] != point[last] so they should not be connected. I tried
> "z" and "Z" thinking one meant leave the path closed and one closed the
> path, but that didn't make any difference.
>
>                                 var pathString:String = "";
>
>                                 for (var i:int=0; i < points.length; i++) {
>                                     var point:Object = points[i];
>                                         if (i == 0) pathString += "M
> "+point.x+" "+point.y+" ";
>                                         else pathString += "L "+point.x+"
> "+point.y+" ";
>                                 }
>
>                                 pathString += "Z";
>
>                                 path.drawPath(0, 0, pathString);
>
>

That is weird.  I will play with it and see why that is happening.

Is moveTo() and lineTo() a better approach?

In psedocode, the lines would be drawn like this:

graphics.moveTo(points[0].x, points[0].y);
for (var i:int=0; i < points.length; i++) {
  if(i+1 < points.length)
  {
    graphics.lineTo(points[i+1].x, points[i+1].y);
  }
}

In any case, I have the Line class in my list of Graphic elements  to
implement.

Thanks,
Om


>
> Thanks,
> Peter Ent
> Adobe Systems
>
> On 9/8/14 4:13 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:
> >
> >> I took care of the gjslint issues.
> >>
> >
> >Thanks!  Hope it was not too much trouble.
> >
> >
> >>
> >> Can you supply more information about Path and what is in the path
> >>string?
> >> I have a path working in SVG to do the wedges for the pie chart, but
> >>that
> >> same string isn't working with core.graphics.Path.
> >>
> >> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A'
> >>+
> >> radius + ' ' + radius +
> >>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
> >>
> >>
> >> It doesn't look, to me, like "A" is being recognized.
> >>
> >
> >The path looks like it is doing the following:
> >M x y : move to x, y
> >L x1 y1 : draw line from x,y to x1,y1
> >A radius radius  : draw an arc with xradius=radius and yradius = radius
> >(so, a circular arc)
> >0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
> >x2 y2 : ending point of the arc
> >z : finish drawing
> >
> >BTW, don't you need another line to complete the wedge?
> >
> >Is it working fine on the flash side?  I will take a look soon.
> >
> >Thanks,
> >Om
> >
> >
> >>
> >> Thanks,
> >> Peter Ent
> >> Adobe Systems
> >>
> >> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
> >>
> >> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
> >> >>
> >> >> I forgot to add that when I build flex-asjs, gjslint finds a number
> >>of
> >> >> issues in the new JS graphics code (its usual, spaces at the end of
> >> >>lines,
> >> >> sort of thing). I think I am using version 2.3.10 of gjslint but I'm
> >>not
> >> >> 100% sure.
> >> >
> >> >Yeah, unfortunately there is no gjslint available for Windows.  I
> >>guess I
> >> >will need you Mac folks to help me out with this :-)
> >> >
> >> >Thanks,
> >> >Om
> >> >
> >> >>
> >> >> Peter Ent
> >> >> Adobe Systems
> >> >>
> >> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com>
> >>wrote:
> >> >>
> >> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle,
> >>Path,
> >> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2]
> >>versions
> >> >> >
> >> >> >So far, the rendering fidelity between the Flash and SVG/HTML5
> >>version
> >> >>is
> >> >> >very very close.  For sure, there are some pretty major things to be
> >> >> >worked
> >> >> >out, but generally so far, the results have been very encouraging.
> >> >> >
> >> >> >You can see a quick and dirty example here:
> >> >> >Flash version:
> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> >> >> >HTML5 version:
> >> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >> >> >
> >> >> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> >> >> >Android browser and iPad Safari.
> >> >> >
> >> >> >Next up, i will be working on the following items:
> >> >> >Polygons, Linear gradients, Radial gradients, filters and drop
> >>shadows.
> >> >> >These should bring us very close to our current FXG based drawing
> >>APIs.
> >> >> >
> >> >> >After that, I plan on programmatically recreating a few FXG based
> >>skins
> >> >in
> >> >> >FlexJS and see how we can apply it skins on UI components.
> >> >> >
> >> >> >Feedback welcome!
> >> >> >
> >> >> >[1]
> >> >> >
> >> >
> >>
> >>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/F
> >>l
> >> >> >exJSUI/src/org/apache/flex/core/graphics
> >> >> >[2]
> >> >> >
> >> >
> >>
> >>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src
> >>/
> >> >> >org/apache/flex/core/graphics
> >> >>
> >>
> >>
>
>

Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
I haven't tried the JS side - this is all Flash. In SVG, the fill takes
care of closing the path; I'm not using any line or border.

Which brings me to the next issue. When drawing a series of connected
lines (for the LineChart), the first and last points are getting
connected, which I do not want. My loop to build the path looks like this,
below. point[0] != point[last] so they should not be connected. I tried
"z" and "Z" thinking one meant leave the path closed and one closed the
path, but that didn't make any difference.

                                var pathString:String = "";
				
				for (var i:int=0; i < points.length; i++) {
				    var point:Object = points[i];
					if (i == 0) pathString += "M "+point.x+" "+point.y+" ";
					else pathString += "L "+point.x+" "+point.y+" ";
				}
				
				pathString += "Z";
				
				path.drawPath(0, 0, pathString);


Thanks,
Peter Ent
Adobe Systems

On 9/8/14 4:13 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:
>
>> I took care of the gjslint issues.
>>
>
>Thanks!  Hope it was not too much trouble.
>
>
>>
>> Can you supply more information about Path and what is in the path
>>string?
>> I have a path working in SVG to do the wedges for the pie chart, but
>>that
>> same string isn't working with core.graphics.Path.
>>
>> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A'
>>+
>> radius + ' ' + radius +
>>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
>>
>>
>> It doesn't look, to me, like "A" is being recognized.
>>
>
>The path looks like it is doing the following:
>M x y : move to x, y
>L x1 y1 : draw line from x,y to x1,y1
>A radius radius  : draw an arc with xradius=radius and yradius = radius
>(so, a circular arc)
>0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
>x2 y2 : ending point of the arc
>z : finish drawing
>
>BTW, don't you need another line to complete the wedge?
>
>Is it working fine on the flash side?  I will take a look soon.
>
>Thanks,
>Om
>
>
>>
>> Thanks,
>> Peter Ent
>> Adobe Systems
>>
>> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>
>> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>> >>
>> >> I forgot to add that when I build flex-asjs, gjslint finds a number
>>of
>> >> issues in the new JS graphics code (its usual, spaces at the end of
>> >>lines,
>> >> sort of thing). I think I am using version 2.3.10 of gjslint but I'm
>>not
>> >> 100% sure.
>> >
>> >Yeah, unfortunately there is no gjslint available for Windows.  I
>>guess I
>> >will need you Mac folks to help me out with this :-)
>> >
>> >Thanks,
>> >Om
>> >
>> >>
>> >> Peter Ent
>> >> Adobe Systems
>> >>
>> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com>
>>wrote:
>> >>
>> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle,
>>Path,
>> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2]
>>versions
>> >> >
>> >> >So far, the rendering fidelity between the Flash and SVG/HTML5
>>version
>> >>is
>> >> >very very close.  For sure, there are some pretty major things to be
>> >> >worked
>> >> >out, but generally so far, the results have been very encouraging.
>> >> >
>> >> >You can see a quick and dirty example here:
>> >> >Flash version:
>> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>> >> >HTML5 version:
>> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>> >> >
>> >> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>> >> >Android browser and iPad Safari.
>> >> >
>> >> >Next up, i will be working on the following items:
>> >> >Polygons, Linear gradients, Radial gradients, filters and drop
>>shadows.
>> >> >These should bring us very close to our current FXG based drawing
>>APIs.
>> >> >
>> >> >After that, I plan on programmatically recreating a few FXG based
>>skins
>> >in
>> >> >FlexJS and see how we can apply it skins on UI components.
>> >> >
>> >> >Feedback welcome!
>> >> >
>> >> >[1]
>> >> >
>> >
>> 
>>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/F
>>l
>> >> >exJSUI/src/org/apache/flex/core/graphics
>> >> >[2]
>> >> >
>> >
>> 
>>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src
>>/
>> >> >org/apache/flex/core/graphics
>> >>
>>
>>


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Sep 8, 2014 at 12:48 PM, Peter Ent <pe...@adobe.com> wrote:

> I took care of the gjslint issues.
>

Thanks!  Hope it was not too much trouble.


>
> Can you supply more information about Path and what is in the path string?
> I have a path working in SVG to do the wedges for the pie chart, but that
> same string isn't working with core.graphics.Path.
>
> var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A' +
> radius + ' ' + radius +
>                                 ' 0 0 1 ' + x2 + ' ' + y2 + ' z';
>
>
> It doesn't look, to me, like "A" is being recognized.
>

The path looks like it is doing the following:
M x y : move to x, y
L x1 y1 : draw line from x,y to x1,y1
A radius radius  : draw an arc with xradius=radius and yradius = radius
(so, a circular arc)
0 0 1 : x-axis rotation=0, large-arc = false, sweep = true
x2 y2 : ending point of the arc
z : finish drawing

BTW, don't you need another line to complete the wedge?

Is it working fine on the flash side?  I will take a look soon.

Thanks,
Om


>
> Thanks,
> Peter Ent
> Adobe Systems
>
> On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
> >>
> >> I forgot to add that when I build flex-asjs, gjslint finds a number of
> >> issues in the new JS graphics code (its usual, spaces at the end of
> >>lines,
> >> sort of thing). I think I am using version 2.3.10 of gjslint but I'm not
> >> 100% sure.
> >
> >Yeah, unfortunately there is no gjslint available for Windows.  I guess I
> >will need you Mac folks to help me out with this :-)
> >
> >Thanks,
> >Om
> >
> >>
> >> Peter Ent
> >> Adobe Systems
> >>
> >> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
> >>
> >> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> >> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
> >> >
> >> >So far, the rendering fidelity between the Flash and SVG/HTML5 version
> >>is
> >> >very very close.  For sure, there are some pretty major things to be
> >> >worked
> >> >out, but generally so far, the results have been very encouraging.
> >> >
> >> >You can see a quick and dirty example here:
> >> >Flash version:
> >>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> >> >HTML5 version:
> >>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >> >
> >> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> >> >Android browser and iPad Safari.
> >> >
> >> >Next up, i will be working on the following items:
> >> >Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> >> >These should bring us very close to our current FXG based drawing APIs.
> >> >
> >> >After that, I plan on programmatically recreating a few FXG based skins
> >in
> >> >FlexJS and see how we can apply it skins on UI components.
> >> >
> >> >Feedback welcome!
> >> >
> >> >[1]
> >> >
> >
> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
> >> >exJSUI/src/org/apache/flex/core/graphics
> >> >[2]
> >> >
> >
> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
> >> >org/apache/flex/core/graphics
> >>
>
>

Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
I took care of the gjslint issues.

Can you supply more information about Path and what is in the path string?
I have a path working in SVG to do the wedges for the pie chart, but that
same string isn't working with core.graphics.Path.

var pathString:String = 'M' + x + ' ' + y + ' L' + x1 + ' ' + y1 + ' A' +
radius + ' ' + radius +
				' 0 0 1 ' + x2 + ' ' + y2 + ' z';


It doesn't look, to me, like "A" is being recognized.

Thanks,
Peter Ent
Adobe Systems

On 9/8/14 12:04 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>>
>> I forgot to add that when I build flex-asjs, gjslint finds a number of
>> issues in the new JS graphics code (its usual, spaces at the end of
>>lines,
>> sort of thing). I think I am using version 2.3.10 of gjslint but I'm not
>> 100% sure.
>
>Yeah, unfortunately there is no gjslint available for Windows.  I guess I
>will need you Mac folks to help me out with this :-)
>
>Thanks,
>Om
>
>>
>> Peter Ent
>> Adobe Systems
>>
>> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>
>> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>> >
>> >So far, the rendering fidelity between the Flash and SVG/HTML5 version
>>is
>> >very very close.  For sure, there are some pretty major things to be
>> >worked
>> >out, but generally so far, the results have been very encouraging.
>> >
>> >You can see a quick and dirty example here:
>> >Flash version: 
>>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>> >HTML5 version: 
>>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>> >
>> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>> >Android browser and iPad Safari.
>> >
>> >Next up, i will be working on the following items:
>> >Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>> >These should bring us very close to our current FXG based drawing APIs.
>> >
>> >After that, I plan on programmatically recreating a few FXG based skins
>in
>> >FlexJS and see how we can apply it skins on UI components.
>> >
>> >Feedback welcome!
>> >
>> >[1]
>> >
>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
>> >exJSUI/src/org/apache/flex/core/graphics
>> >[2]
>> >
>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
>> >org/apache/flex/core/graphics
>>


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Sep 8, 2014 8:24 AM, "Peter Ent" <pe...@adobe.com> wrote:
>
> I forgot to add that when I build flex-asjs, gjslint finds a number of
> issues in the new JS graphics code (its usual, spaces at the end of lines,
> sort of thing). I think I am using version 2.3.10 of gjslint but I'm not
> 100% sure.

Yeah, unfortunately there is no gjslint available for Windows.  I guess I
will need you Mac folks to help me out with this :-)

Thanks,
Om

>
> Peter Ent
> Adobe Systems
>
> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
> >
> >So far, the rendering fidelity between the Flash and SVG/HTML5 version is
> >very very close.  For sure, there are some pretty major things to be
> >worked
> >out, but generally so far, the results have been very encouraging.
> >
> >You can see a quick and dirty example here:
> >Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> >HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >
> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> >Android browser and iPad Safari.
> >
> >Next up, i will be working on the following items:
> >Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> >These should bring us very close to our current FXG based drawing APIs.
> >
> >After that, I plan on programmatically recreating a few FXG based skins
in
> >FlexJS and see how we can apply it skins on UI components.
> >
> >Feedback welcome!
> >
> >[1]
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
> >exJSUI/src/org/apache/flex/core/graphics
> >[2]
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
> >org/apache/flex/core/graphics
>

Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
I forgot to add that when I build flex-asjs, gjslint finds a number of
issues in the new JS graphics code (its usual, spaces at the end of lines,
sort of thing). I think I am using version 2.3.10 of gjslint but I'm not
100% sure.

Peter Ent
Adobe Systems

On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>
>So far, the rendering fidelity between the Flash and SVG/HTML5 version is
>very very close.  For sure, there are some pretty major things to be
>worked
>out, but generally so far, the results have been very encouraging.
>
>You can see a quick and dirty example here:
>Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>
>HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>Android browser and iPad Safari.
>
>Next up, i will be working on the following items:
>Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>These should bring us very close to our current FXG based drawing APIs.
>
>After that, I plan on programmatically recreating a few FXG based skins in
>FlexJS and see how we can apply it skins on UI components.
>
>Feedback welcome!
>
>[1]
>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
>exJSUI/src/org/apache/flex/core/graphics
>[2]
>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
>org/apache/flex/core/graphics


RE: [FlexJS] Drawing API

Posted by Kessler CTR Mark J <ma...@usmc.mil>.
Looks good.  Your right clicking back and forth between the two, they are pretty close.

-Mark

-----Original Message-----
From: omuppi1@gmail.com [mailto:omuppi1@gmail.com] On Behalf Of OmPrakash Muppirala
Sent: Monday, September 08, 2014 3:48 AM
To: dev@flex.apache.org
Subject: [FlexJS] Drawing API

FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions

So far, the rendering fidelity between the Flash and SVG/HTML5 version is
very very close.  For sure, there are some pretty major things to be worked
out, but generally so far, the results have been very encouraging.

You can see a quick and dirty example here:
Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/

HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
Android browser and iPad Safari.

Next up, i will be working on the following items:
Polygons, Linear gradients, Radial gradients, filters and drop shadows.
These should bring us very close to our current FXG based drawing APIs.

After that, I plan on programmatically recreating a few FXG based skins in
FlexJS and see how we can apply it skins on UI components.

Feedback welcome!

[1]
https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
[2]
https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics

Re: [FlexJS] Drawing API

Posted by Erik de Bruin <er...@ixsoftware.nl>.
>
> I'm wondering what kind of changes you would suggest.  On a related note,
>

I'm not suggesting any changes, I was merely enquiring if this was in any
shape to be (re)used in a different setting.

I'm currently able to export 442 classes from 'playerglobal.swc' to JS,
automatically, as stubs. Being stubs, the members of these JS classes will
need an implementation, and an existing drawing API may go a long way
towards that - at least, as far as visuals are concerned.

EdB



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Drawing API

Posted by Alex Harui <ah...@adobe.com>.
Erik,

I'm wondering what kind of changes you would suggest.  On a related note,
I'm trying to port the FlexStore example to FlexJS.  When I'm done with
that I'm hoping to wrap some FlexJS components to make their APIs more
Spark-like and see how porting to that feels and get a sense of how much
more code it adds in the end.  Would that work for the drawing API as
well?  You could wrap the FlexJS classes to make them look like Spark
classes.

-Alex

On 9/8/14 1:03 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:

>Om, awesome!
>
>As the developer of an alternative AS -> JS solution, I'm wondering if
>your
>contribution (especially the JS side) might be implemented in a somewhat
>less FlexJS dependent manner? It would be awesome if I could hook up the
>JS
>classes I'm currently auto-creating from 'playerglobal.swc' to your
>drawing
>API...
>
>Thanks,
>
>EdB
>
>
>
>On Mon, Sep 8, 2014 at 9:48 AM, OmPrakash Muppirala <bi...@gmail.com>
>wrote:
>
>> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>>
>> So far, the rendering fidelity between the Flash and SVG/HTML5 version
>>is
>> very very close.  For sure, there are some pretty major things to be
>>worked
>> out, but generally so far, the results have been very encouraging.
>>
>> You can see a quick and dirty example here:
>> Flash version: 
>>http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>> HTML5 version: 
>>http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>>
>> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>> Android browser and iPad Safari.
>>
>> Next up, i will be working on the following items:
>> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>> These should bring us very close to our current FXG based drawing APIs.
>>
>> After that, I plan on programmatically recreating a few FXG based skins
>>in
>> FlexJS and see how we can apply it skins on UI components.
>>
>> Feedback welcome!
>>
>> [1]
>>
>> 
>>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/F
>>lexJSUI/src/org/apache/flex/core/graphics
>> [2]
>>
>> 
>>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src
>>/org/apache/flex/core/graphics
>>
>
>
>
>-- 
>Ix Multimedia Software
>
>Jan Luykenstraat 27
>3521 VB Utrecht
>
>T. 06-51952295
>I. www.ixsoftware.nl


Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Sep 8, 2014 1:04 AM, "Erik de Bruin" <er...@ixsoftware.nl> wrote:
>
> Om, awesome!
>
> As the developer of an alternative AS -> JS solution, I'm wondering if
your
> contribution (especially the JS side) might be implemented in a somewhat
> less FlexJS dependent manner? It would be awesome if I could hook up the
JS
> classes I'm currently auto-creating from 'playerglobal.swc' to your
drawing
> API...

The APIs are modeled more on the spark.primitives.* classes to make it look
like FXG.  So it won't have a direct mapping with the Flash APIs.  But it
should not be impossible to make it do what you want.

Particularly the Path API does a lot of work on the AS3 side to support the
string format a path data.

Do let me know how I can help.

Thanks,
Om

>
> Thanks,
>
> EdB
>
>
>
> On Mon, Sep 8, 2014 at 9:48 AM, OmPrakash Muppirala <bi...@gmail.com>
> wrote:
>
> > FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> > SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
> >
> > So far, the rendering fidelity between the Flash and SVG/HTML5 version
is
> > very very close.  For sure, there are some pretty major things to be
worked
> > out, but generally so far, the results have been very encouraging.
> >
> > You can see a quick and dirty example here:
> > Flash version:
http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> > HTML5 version:
http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >
> > HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> > Android browser and iPad Safari.
> >
> > Next up, i will be working on the following items:
> > Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> > These should bring us very close to our current FXG based drawing APIs.
> >
> > After that, I plan on programmatically recreating a few FXG based skins
in
> > FlexJS and see how we can apply it skins on UI components.
> >
> > Feedback welcome!
> >
> > [1]
> >
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
> > [2]
> >
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
> >
>
>
>
> --
> Ix Multimedia Software
>
> Jan Luykenstraat 27
> 3521 VB Utrecht
>
> T. 06-51952295
> I. www.ixsoftware.nl

Re: [FlexJS] Drawing API

Posted by Erik de Bruin <er...@ixsoftware.nl>.
Om, awesome!

As the developer of an alternative AS -> JS solution, I'm wondering if your
contribution (especially the JS side) might be implemented in a somewhat
less FlexJS dependent manner? It would be awesome if I could hook up the JS
classes I'm currently auto-creating from 'playerglobal.swc' to your drawing
API...

Thanks,

EdB



On Mon, Sep 8, 2014 at 9:48 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>
> So far, the rendering fidelity between the Flash and SVG/HTML5 version is
> very very close.  For sure, there are some pretty major things to be worked
> out, but generally so far, the results have been very encouraging.
>
> You can see a quick and dirty example here:
> Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>
> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> Android browser and iPad Safari.
>
> Next up, i will be working on the following items:
> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> These should bring us very close to our current FXG based drawing APIs.
>
> After that, I plan on programmatically recreating a few FXG based skins in
> FlexJS and see how we can apply it skins on UI components.
>
> Feedback welcome!
>
> [1]
>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
> [2]
>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
>



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Re: [FlexJS] Drawing API

Posted by jude <fl...@gmail.com>.
Thanks Om. It looks much better in my opinion. But to be sure I wasn't
imagining things I took screenshots of both and imported them into PS. I
then created an animated gif showing both before and after.

I'm going to try and attach it.


​

You'll notice the checkmark in the upper left hand corner looks more
refined. In the blue ellipsis you'll see an extra row of antialiasing with
the high 16x16 linear setting in the arc from 6' to 9'. And there is more
smoothing overall. It's very subtle at normal resolution so you'll probably
have to import it into PS to see any difference. Anyway, thanks for
checking on this. One thing that we might want to check into is if the
browser is setting pixel hinting in which case will cause some differences
in the images. I think FP can enable or disable this option but the browser
may not.

On Wed, Sep 10, 2014 at 5:07 PM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> On Wed, Sep 10, 2014 at 12:54 PM, jude <fl...@gmail.com> wrote:
>
> > FYI according to the article I linked to here [1] it is possible to
> > improve the rendering quality of vectors on the stage. I thought the
> > article I linked to was a different article posted by Thimbault
> > about drawWithQuality(). That means that documentation here [2] appears
> to
> > be incorrect or out of date.
> >
> > Om, can you set the stage quality to high 16x16 or high 16x16 linear in
> > your Flash  example and check for changes? Example code is in the article
> > [1]. You may need to set the player version to greater than 15. It may be
> > possible to change the quality at runtime.
> >
>
> I made the following changes to make the flash side of things more sharper:
> * All strokes have capsStyle = SQUARE and jointStyle = MITER
> * Set stage.quality = HIGH_16X16_LINEAR in the top level application.
>
> Take a look now:
> Flash: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> HTML5: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>
> Thanks,
> Om
>
>
> >
> > [1] http://blog.kaourantin.net/?p=152
> > [2]
> >
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html
> >
> >
> > On Monday, September 8, 2014, jude <fl...@gmail.com> wrote:
> >
> >> Way to go! Looks great. At one point browsers couldn't do graphics at
> >> all.
> >>
> >> One thing I want to note is that the rendering in the browsers is
> getting
> >> better than that of Flash. I've attached a screen shot.
> >>
> >>
> >> ​
> >>
> >> In the graphic (if it came through) Flash is on the left and HTML
> >> (Firefox Mac) on the right.
> >> In issue 1 the box is blurry. This may be a subpixel rendering issue but
> >> if you compare both in a big picture way the Flash version is slightly
> more
> >> blurry all around. This might be caused by the level of anti-alias the
> FP
> >> is using.
> >> In issue 2 the curve of the ellipsis has less fidelity than the HTML5
> >> version. You can see this when you look at them side by side. You may
> not
> >> be able to tell but I've seen other examples and it is more noticeable.
> >>
> >> In fact, at one point, Tinic Uro, one of the FP engineers said they can
> >> do higher quality graphics if we do not care about performance (or we
> need
> >> quality over speed). He wrote about it here,
> >> http://blog.kaourantin.net/?p=152 <--read this. This is for the
> >> drawWithQuality() method that was added at the time of the post but this
> >> does not give us the option to upgrade the rendering of the stage. The
> >> drawWithQuality method uses the parameters here,
> >>
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html
> .
> >>
> >>
> >>
> >> These include, BEST, HIGH, HIGH_16X16, HIGH_16X16_LINEAR, HIGH_8X8,
> >> HIGH_8X8_LINEAR, LOW, and MEDIUM.
> >>
> >> In the desktop profile of Adobe AIR, quality can be set to
> >> StageQuality.BEST or StageQuality.HIGH (and the default value is
> >> StageQuality.HIGH). Attempting to set it to another value has no effect
> >> (and the property remains unchanged).
> >>
> >> I'd say we need to be able to set the stage quality to higher values if
> >> we can especially if the browsers are starting to provide higher quality
> >> rendering than Flash. Sorry to hijack this thread, this response is
> really
> >> a rally or FYI to be able to inform or convince the FP team that now is
> the
> >> time to enable higher rendering quality on the stage.
> >>
> >>
> >> On Mon, Sep 8, 2014 at 2:48 AM, OmPrakash Muppirala <
> bigosmallm@gmail.com
> >> > wrote:
> >>
> >>> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> >>> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
> >>>
> >>> So far, the rendering fidelity between the Flash and SVG/HTML5 version
> is
> >>> very very close.  For sure, there are some pretty major things to be
> >>> worked
> >>> out, but generally so far, the results have been very encouraging.
> >>>
> >>> You can see a quick and dirty example here:
> >>> Flash version:
> >>> http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> >>> HTML5 <http://people.apache.org/~bigosmallm/flexjs/drawing/flash/HTML5
> >
> >>> version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >>>
> >>> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> >>> Android browser and iPad Safari.
> >>>
> >>> Next up, i will be working on the following items:
> >>> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> >>> These should bring us very close to our current FXG based drawing APIs.
> >>>
> >>> After that, I plan on programmatically recreating a few FXG based skins
> >>> in
> >>> FlexJS and see how we can apply it skins on UI components.
> >>>
> >>> Feedback welcome!
> >>>
> >>> [1]
> >>>
> >>>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
> >>> [2]
> >>>
> >>>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
> >>>
> >>
> >>
>

Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Wed, Sep 10, 2014 at 12:54 PM, jude <fl...@gmail.com> wrote:

> FYI according to the article I linked to here [1] it is possible to
> improve the rendering quality of vectors on the stage. I thought the
> article I linked to was a different article posted by Thimbault
> about drawWithQuality(). That means that documentation here [2] appears to
> be incorrect or out of date.
>
> Om, can you set the stage quality to high 16x16 or high 16x16 linear in
> your Flash  example and check for changes? Example code is in the article
> [1]. You may need to set the player version to greater than 15. It may be
> possible to change the quality at runtime.
>

I made the following changes to make the flash side of things more sharper:
* All strokes have capsStyle = SQUARE and jointStyle = MITER
* Set stage.quality = HIGH_16X16_LINEAR in the top level application.

Take a look now:
Flash: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
HTML5: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/

Thanks,
Om


>
> [1] http://blog.kaourantin.net/?p=152
> [2]
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html
>
>
> On Monday, September 8, 2014, jude <fl...@gmail.com> wrote:
>
>> Way to go! Looks great. At one point browsers couldn't do graphics at
>> all.
>>
>> One thing I want to note is that the rendering in the browsers is getting
>> better than that of Flash. I've attached a screen shot.
>>
>>
>> ​
>>
>> In the graphic (if it came through) Flash is on the left and HTML
>> (Firefox Mac) on the right.
>> In issue 1 the box is blurry. This may be a subpixel rendering issue but
>> if you compare both in a big picture way the Flash version is slightly more
>> blurry all around. This might be caused by the level of anti-alias the FP
>> is using.
>> In issue 2 the curve of the ellipsis has less fidelity than the HTML5
>> version. You can see this when you look at them side by side. You may not
>> be able to tell but I've seen other examples and it is more noticeable.
>>
>> In fact, at one point, Tinic Uro, one of the FP engineers said they can
>> do higher quality graphics if we do not care about performance (or we need
>> quality over speed). He wrote about it here,
>> http://blog.kaourantin.net/?p=152 <--read this. This is for the
>> drawWithQuality() method that was added at the time of the post but this
>> does not give us the option to upgrade the rendering of the stage. The
>> drawWithQuality method uses the parameters here,
>> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html.
>>
>>
>>
>> These include, BEST, HIGH, HIGH_16X16, HIGH_16X16_LINEAR, HIGH_8X8,
>> HIGH_8X8_LINEAR, LOW, and MEDIUM.
>>
>> In the desktop profile of Adobe AIR, quality can be set to
>> StageQuality.BEST or StageQuality.HIGH (and the default value is
>> StageQuality.HIGH). Attempting to set it to another value has no effect
>> (and the property remains unchanged).
>>
>> I'd say we need to be able to set the stage quality to higher values if
>> we can especially if the browsers are starting to provide higher quality
>> rendering than Flash. Sorry to hijack this thread, this response is really
>> a rally or FYI to be able to inform or convince the FP team that now is the
>> time to enable higher rendering quality on the stage.
>>
>>
>> On Mon, Sep 8, 2014 at 2:48 AM, OmPrakash Muppirala <bigosmallm@gmail.com
>> > wrote:
>>
>>> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>>> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>>>
>>> So far, the rendering fidelity between the Flash and SVG/HTML5 version is
>>> very very close.  For sure, there are some pretty major things to be
>>> worked
>>> out, but generally so far, the results have been very encouraging.
>>>
>>> You can see a quick and dirty example here:
>>> Flash version:
>>> http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>>> HTML5 <http://people.apache.org/~bigosmallm/flexjs/drawing/flash/HTML5>
>>> version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>>>
>>> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>>> Android browser and iPad Safari.
>>>
>>> Next up, i will be working on the following items:
>>> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>>> These should bring us very close to our current FXG based drawing APIs.
>>>
>>> After that, I plan on programmatically recreating a few FXG based skins
>>> in
>>> FlexJS and see how we can apply it skins on UI components.
>>>
>>> Feedback welcome!
>>>
>>> [1]
>>>
>>> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
>>> [2]
>>>
>>> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
>>>
>>
>>

Re: [FlexJS] Drawing API

Posted by jude <fl...@gmail.com>.
FYI according to the article I linked to here [1] it is possible to improve
the rendering quality of vectors on the stage. I thought the article I
linked to was a different article posted by Thimbault
about drawWithQuality(). That means that documentation here [2] appears to
be incorrect or out of date.

Om, can you set the stage quality to high 16x16 or high 16x16 linear in
your Flash  example and check for changes? Example code is in the article
[1]. You may need to set the player version to greater than 15. It may be
possible to change the quality at runtime.

[1] http://blog.kaourantin.net/?p=152
[2]
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html

On Monday, September 8, 2014, jude <fl...@gmail.com> wrote:

> Way to go! Looks great. At one point browsers couldn't do graphics at all.
>
> One thing I want to note is that the rendering in the browsers is getting
> better than that of Flash. I've attached a screen shot.
>
>
> ​
>
> In the graphic (if it came through) Flash is on the left and HTML (Firefox
> Mac) on the right.
> In issue 1 the box is blurry. This may be a subpixel rendering issue but
> if you compare both in a big picture way the Flash version is slightly more
> blurry all around. This might be caused by the level of anti-alias the FP
> is using.
> In issue 2 the curve of the ellipsis has less fidelity than the HTML5
> version. You can see this when you look at them side by side. You may not
> be able to tell but I've seen other examples and it is more noticeable.
>
> In fact, at one point, Tinic Uro, one of the FP engineers said they can do
> higher quality graphics if we do not care about performance (or we need
> quality over speed). He wrote about it here,
> http://blog.kaourantin.net/?p=152 <--read this. This is for the
> drawWithQuality() method that was added at the time of the post but this
> does not give us the option to upgrade the rendering of the stage. The
> drawWithQuality method uses the parameters here,
> http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html.
>
>
>
> These include, BEST, HIGH, HIGH_16X16, HIGH_16X16_LINEAR, HIGH_8X8,
> HIGH_8X8_LINEAR, LOW, and MEDIUM.
>
> In the desktop profile of Adobe AIR, quality can be set to
> StageQuality.BEST or StageQuality.HIGH (and the default value is
> StageQuality.HIGH). Attempting to set it to another value has no effect
> (and the property remains unchanged).
>
> I'd say we need to be able to set the stage quality to higher values if we
> can especially if the browsers are starting to provide higher quality
> rendering than Flash. Sorry to hijack this thread, this response is really
> a rally or FYI to be able to inform or convince the FP team that now is the
> time to enable higher rendering quality on the stage.
>
>
> On Mon, Sep 8, 2014 at 2:48 AM, OmPrakash Muppirala <bigosmallm@gmail.com
> <javascript:_e(%7B%7D,'cvml','bigosmallm@gmail.com');>> wrote:
>
>> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>>
>> So far, the rendering fidelity between the Flash and SVG/HTML5 version is
>> very very close.  For sure, there are some pretty major things to be
>> worked
>> out, but generally so far, the results have been very encouraging.
>>
>> You can see a quick and dirty example here:
>> Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>> HTML5 <http://people.apache.org/~bigosmallm/flexjs/drawing/flash/HTML5>
>> version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>>
>> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>> Android browser and iPad Safari.
>>
>> Next up, i will be working on the following items:
>> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>> These should bring us very close to our current FXG based drawing APIs.
>>
>> After that, I plan on programmatically recreating a few FXG based skins in
>> FlexJS and see how we can apply it skins on UI components.
>>
>> Feedback welcome!
>>
>> [1]
>>
>> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
>> [2]
>>
>> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
>>
>
>

Re: [FlexJS] Drawing API

Posted by jude <fl...@gmail.com>.
Way to go! Looks great. At one point browsers couldn't do graphics at all.

One thing I want to note is that the rendering in the browsers is getting
better than that of Flash. I've attached a screen shot.


​

In the graphic (if it came through) Flash is on the left and HTML (Firefox
Mac) on the right.
In issue 1 the box is blurry. This may be a subpixel rendering issue but if
you compare both in a big picture way the Flash version is slightly more
blurry all around. This might be caused by the level of anti-alias the FP
is using.
In issue 2 the curve of the ellipsis has less fidelity than the HTML5
version. You can see this when you look at them side by side. You may not
be able to tell but I've seen other examples and it is more noticeable.

In fact, at one point, Tinic Uro, one of the FP engineers said they can do
higher quality graphics if we do not care about performance (or we need
quality over speed). He wrote about it here,
http://blog.kaourantin.net/?p=152 <--read this. This is for the
drawWithQuality() method that was added at the time of the post but this
does not give us the option to upgrade the rendering of the stage. The
drawWithQuality method uses the parameters here,
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/StageQuality.html.



These include, BEST, HIGH, HIGH_16X16, HIGH_16X16_LINEAR, HIGH_8X8,
HIGH_8X8_LINEAR, LOW, and MEDIUM.

In the desktop profile of Adobe AIR, quality can be set to StageQuality.BEST
or StageQuality.HIGH (and the default value is StageQuality.HIGH).
Attempting to set it to another value has no effect (and the property
remains unchanged).

I'd say we need to be able to set the stage quality to higher values if we
can especially if the browsers are starting to provide higher quality
rendering than Flash. Sorry to hijack this thread, this response is really
a rally or FYI to be able to inform or convince the FP team that now is the
time to enable higher rendering quality on the stage.


On Mon, Sep 8, 2014 at 2:48 AM, OmPrakash Muppirala <bi...@gmail.com>
wrote:

> FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>
> So far, the rendering fidelity between the Flash and SVG/HTML5 version is
> very very close.  For sure, there are some pretty major things to be worked
> out, but generally so far, the results have been very encouraging.
>
> You can see a quick and dirty example here:
> Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>
> HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> Android browser and iPad Safari.
>
> Next up, i will be working on the following items:
> Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> These should bring us very close to our current FXG based drawing APIs.
>
> After that, I plan on programmatically recreating a few FXG based skins in
> FlexJS and see how we can apply it skins on UI components.
>
> Feedback welcome!
>
> [1]
>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics
> [2]
>
> https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/org/apache/flex/core/graphics
>

Re: [FlexJS] Drawing API

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Sep 8, 2014 8:22 AM, "Peter Ent" <pe...@adobe.com> wrote:
>
> I'm going to see if I can use these for the graphics in the chart work
> I've been doing. Might be very helpful there.

That would be awesome!  Let me know how I can help.  I just realized that
there might be a bug in how I size the svg element.  I should be able to
fix that today.

Thanks,
Om

>
> Peter Ent
> Adobe Systems
>
> On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
> >SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
> >
> >So far, the rendering fidelity between the Flash and SVG/HTML5 version is
> >very very close.  For sure, there are some pretty major things to be
> >worked
> >out, but generally so far, the results have been very encouraging.
> >
> >You can see a quick and dirty example here:
> >Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
> >HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
> >
> >HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
> >Android browser and iPad Safari.
> >
> >Next up, i will be working on the following items:
> >Polygons, Linear gradients, Radial gradients, filters and drop shadows.
> >These should bring us very close to our current FXG based drawing APIs.
> >
> >After that, I plan on programmatically recreating a few FXG based skins
in
> >FlexJS and see how we can apply it skins on UI components.
> >
> >Feedback welcome!
> >
> >[1]
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
> >exJSUI/src/org/apache/flex/core/graphics
> >[2]
> >
https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
> >org/apache/flex/core/graphics
>

Re: [FlexJS] Drawing API

Posted by Peter Ent <pe...@adobe.com>.
I'm going to see if I can use these for the graphics in the chart work
I've been doing. Might be very helpful there.

Peter Ent
Adobe Systems

On 9/8/14 3:48 AM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>FlexJS now supports a basic drawing API (Rect, Ellipse, Circle, Path,
>SolidColor, SolidColorStroke)  Here are the AS3 [1] and JS [2] versions
>
>So far, the rendering fidelity between the Flash and SVG/HTML5 version is
>very very close.  For sure, there are some pretty major things to be
>worked
>out, but generally so far, the results have been very encouraging.
>
>You can see a quick and dirty example here:
>Flash version: http://people.apache.org/~bigosmallm/flexjs/drawing/flash/
>HTML5 version: http://people.apache.org/~bigosmallm/flexjs/drawing/html5/
>
>HTML5 version has been tested to work fine on Chrome, Firefox, IE11,
>Android browser and iPad Safari.
>
>Next up, i will be working on the following items:
>Polygons, Linear gradients, Radial gradients, filters and drop shadows.
>These should bring us very close to our current FXG based drawing APIs.
>
>After that, I plan on programmatically recreating a few FXG based skins in
>FlexJS and see how we can apply it skins on UI components.
>
>Feedback welcome!
>
>[1]
>https://github.com/apache/flex-asjs/tree/develop/frameworks/as/projects/Fl
>exJSUI/src/org/apache/flex/core/graphics
>[2]
>https://github.com/apache/flex-asjs/tree/develop/frameworks/js/FlexJS/src/
>org/apache/flex/core/graphics