Is there an equivalent Royale method or Package for "mx.graphics.ImageSnapshot;"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is there an equivalent Royale method or Package for "mx.graphics.ImageSnapshot;"

Anil Guntur - aguntur@us.ibm.com

The reason I ask is we have some functionality like this in the existing .as3

 

var bmpData:BitmapData = ImageSnapshot.captureBitmapData(some obj as mx.Containers.ViewStack);

 

do we have an equivalent class in Royale for this implementation

https://github.com/apache/flex-sdk/blob/master/frameworks/projects/framework/src/mx/graphics/ImageSnapshot.as

 

 

Thanks

 

bar_blue-teal.png

blank.gif

Anil Guntur
Architect, Radiology Workflow

(858) 267-5072
(858) 922-6402
[hidden email]

WH_Email_Sig_Logo.png

 

 

From: "Anil Guntur - [hidden email]" <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Thursday, June 25, 2020 at 8:28 AM
To: "[hidden email]" <[hidden email]>
Subject: [EXTERNAL] RE: First time using Apache Royale

 

Thank you very much Piotr.. This is what I was looking for.. will explore and post questions as I go through the conversion exercise

 

 

 

 

From: Piotr Zarzycki <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Thursday, June 25, 2020 at 3:54 AM
To: "[hidden email]" <[hidden email]>
Subject: [EXTERNAL] Re: First time using Apache Royale

 

Hi Anil,

 

To addition of what Harbs provided I would like to answer to your question about list of components. We don't have anywhere documented it straightforward. However you can look into ASDoc app [1] and search there. Another option is just take a look into the Royale code where there is sort of a list what has been emulated.

 

MX components [2]

Spark components [3]

 

I hope it helps.

 

 

Thanks,

Piotr

 

śr., 24 cze 2020 o 08:39 Harbs <[hidden email]> napisał(a):

Some points to consider:

 

* Any “generic” AS3 code should work with no modifications. This likely includes business logic, plumbing such as PureMVC, etc.

* You will need to modify any code which has a flash package dependency. Many classes such as Event and IEventDispatcher have direct counterparts in Royale, so you can simply change your imports to reference the Royale versions.

* You will need to make a decision on how to handle Flex code.

 

As far as Flex code goes, you have options:

1. There are emulation components which give you more-or-less the functionality and look of MX and Spark Flex 4 components. This component set is not complete, but it’s pretty close. You’ll likely need to do some tweaking, but this should give you more-or-less the same UI in HTML with the least effort.

2. You can choose to change the Flex UI for a new more modern one.

 

If you choose to change the UI, it’ll be easiest if you have good separation of model and view. There’s a number of UI opttions:

1. You can use Basic components, but you’ll need to set styling yourself to get the look you want.

2. You can use Jewel, which is a CSS-themed component set designed for Royale. You can pick a color theme with Jewel as well.

3. There’s an MDL component set which uses MDL css.

5. If you have your own CSS, you can create your own component set. You can use Spectrum as a model on how to do that.

 

HTH,

Harbs




On Jun 24, 2020, at 7:04 AM, Anil Guntur - [hidden email] <[hidden email]> wrote:

 

Hello, 

We have a big Flex project with action script (compiled to a SWF). Looking at ways to convert to a JS/HTML version. Came across Apache Royale. Could anyone give me a few pointers on where to look for things like 

  • Flex/ActionScript equivalent To Royale/JavaScript library.
  • what should we consider before starting the conversion

 

I have played with the sample project and configured Visual studio Code with Royale 0.9.7 SDK.

 

Thanks

Anil

 


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

Re: Is there an equivalent Royale method or Package for "mx.graphics.ImageSnapshot;"

Greg Dove

Not emulation of that yet, as far as I know.
At some level this requires the ability to draw DOM elements to a canvas element. There are some (at least one) native js libraries that do this, so it might be a case of having to wrap the API of one of those. From what I recall it is quite a bit more complicated to do this in html5 compared to how easy it was to do that in swf. I think the way I remember it needed to be done some capture and repeating of styling in the drawing commands as part of the 'capture' process, but I am just going from memory of having looked at this in the past. Others may know of better (or newer) options.

You may want to join and discuss this on the [hidden email] mailing list, it does sound like something that would be useful to solve in collaboration.


On Fri, Jun 26, 2020 at 5:29 PM Anil Guntur - [hidden email] <[hidden email]> wrote:

The reason I ask is we have some functionality like this in the existing .as3

 

var bmpData:BitmapData = ImageSnapshot.captureBitmapData(some obj as mx.Containers.ViewStack);

 

do we have an equivalent class in Royale for this implementation

https://github.com/apache/flex-sdk/blob/master/frameworks/projects/framework/src/mx/graphics/ImageSnapshot.as

 

 

Thanks

 

bar_blue-teal.png

blank.gif

Anil Guntur
Architect, Radiology Workflow

(858) 267-5072
(858) 922-6402
[hidden email]

WH_Email_Sig_Logo.png

 

 

From: "Anil Guntur - [hidden email]" <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Thursday, June 25, 2020 at 8:28 AM
To: "[hidden email]" <[hidden email]>
Subject: [EXTERNAL] RE: First time using Apache Royale

 

Thank you very much Piotr.. This is what I was looking for.. will explore and post questions as I go through the conversion exercise

 

 

 

 

From: Piotr Zarzycki <[hidden email]>
Reply-To: "[hidden email]" <[hidden email]>
Date: Thursday, June 25, 2020 at 3:54 AM
To: "[hidden email]" <[hidden email]>
Subject: [EXTERNAL] Re: First time using Apache Royale

 

Hi Anil,

 

To addition of what Harbs provided I would like to answer to your question about list of components. We don't have anywhere documented it straightforward. However you can look into ASDoc app [1] and search there. Another option is just take a look into the Royale code where there is sort of a list what has been emulated.

 

MX components [2]

Spark components [3]

 

I hope it helps.

 

 

Thanks,

Piotr

 

śr., 24 cze 2020 o 08:39 Harbs <[hidden email]> napisał(a):

Some points to consider:

 

* Any “generic” AS3 code should work with no modifications. This likely includes business logic, plumbing such as PureMVC, etc.

* You will need to modify any code which has a flash package dependency. Many classes such as Event and IEventDispatcher have direct counterparts in Royale, so you can simply change your imports to reference the Royale versions.

* You will need to make a decision on how to handle Flex code.

 

As far as Flex code goes, you have options:

1. There are emulation components which give you more-or-less the functionality and look of MX and Spark Flex 4 components. This component set is not complete, but it’s pretty close. You’ll likely need to do some tweaking, but this should give you more-or-less the same UI in HTML with the least effort.

2. You can choose to change the Flex UI for a new more modern one.

 

If you choose to change the UI, it’ll be easiest if you have good separation of model and view. There’s a number of UI opttions:

1. You can use Basic components, but you’ll need to set styling yourself to get the look you want.

2. You can use Jewel, which is a CSS-themed component set designed for Royale. You can pick a color theme with Jewel as well.

3. There’s an MDL component set which uses MDL css.

5. If you have your own CSS, you can create your own component set. You can use Spectrum as a model on how to do that.

 

HTH,

Harbs




On Jun 24, 2020, at 7:04 AM, Anil Guntur - [hidden email] <[hidden email]> wrote:

 

Hello, 

We have a big Flex project with action script (compiled to a SWF). Looking at ways to convert to a JS/HTML version. Came across Apache Royale. Could anyone give me a few pointers on where to look for things like 

  • Flex/ActionScript equivalent To Royale/JavaScript library.
  • what should we consider before starting the conversion

 

I have played with the sample project and configured Visual studio Code with Royale 0.9.7 SDK.

 

Thanks

Anil

 


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki