You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2009/08/15 09:42:23 UTC

Shapes...

Gang,

I am working with Shapes now as well, and I am confused to say the least.

A Drawing has a Canvas, that can be set. Canvas is a Shape and can be
part of another Canvas... or? A Drawing is an Image subclass, but
Image doesn't have a Canvas, so is it that bitmaps in general can not
be part of the Shape hierarchy, or what?


Well, to formulate it better; Does Pivot support that bitmaps are part
of a Shape hierarchy? If so, how am I supposed to go about it...?


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: Shapes...

Posted by Greg Brown <gk...@mac.com>.
In fact, I've also been thinking about writing an FXGSerializer at  
some point, since I assume Adobe's graphics tools are (or will be)  
capable of generating it:

http://opensource.adobe.com/wiki/display/flexsdk/FXG+1.0+Specification


On Aug 17, 2009, at 8:23 AM, Greg Brown wrote:

> Now you're talking. An SVGSerializer would be ideal.  :-)
>
> On Aug 15, 2009, at 12:59 PM, Niclas Hedhman wrote:
>
>> On Sat, Aug 15, 2009 at 8:06 PM, Greg Brown<gk...@mac.com> wrote:
>>> Interesting. Do you have an immediate need for something like  
>>> this? You
>>> could try to put together the "PictureShape" class yourself -  
>>> Shape isn't a
>>> terribly difficult class to extend (though I would like to come up  
>>> with a
>>> better name than "PictureShape").  :-)
>>
>> Not sure it is worth it. I will engage Thien to redo the whole  
>> library
>> in vector graphics instead, then do some SVG-to-WTKX conversion tool
>> or something... ;-)
>>
>> Cheers
>> -- 
>> Niclas Hedhman, Software Developer
>> http://www.qi4j.org - New Energy for Java
>>
>> I  live here; http://tinyurl.com/2qq9er
>> I  work here; http://tinyurl.com/2ymelc
>> I relax here; http://tinyurl.com/2cgsug
>


Re: Shapes...

Posted by Greg Brown <gk...@mac.com>.
Now you're talking. An SVGSerializer would be ideal.  :-)

On Aug 15, 2009, at 12:59 PM, Niclas Hedhman wrote:

> On Sat, Aug 15, 2009 at 8:06 PM, Greg Brown<gk...@mac.com> wrote:
>> Interesting. Do you have an immediate need for something like this?  
>> You
>> could try to put together the "PictureShape" class yourself - Shape  
>> isn't a
>> terribly difficult class to extend (though I would like to come up  
>> with a
>> better name than "PictureShape").  :-)
>
> Not sure it is worth it. I will engage Thien to redo the whole library
> in vector graphics instead, then do some SVG-to-WTKX conversion tool
> or something... ;-)
>
> Cheers
> -- 
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug


Re: Shapes...

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Sat, Aug 15, 2009 at 8:06 PM, Greg Brown<gk...@mac.com> wrote:
> Interesting. Do you have an immediate need for something like this? You
> could try to put together the "PictureShape" class yourself - Shape isn't a
> terribly difficult class to extend (though I would like to come up with a
> better name than "PictureShape").  :-)

Not sure it is worth it. I will engage Thien to redo the whole library
in vector graphics instead, then do some SVG-to-WTKX conversion tool
or something... ;-)

Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: Shapes...

Posted by Greg Brown <gk...@mac.com>.
Interesting. Do you have an immediate need for something like this?  
You could try to put together the "PictureShape" class yourself -  
Shape isn't a terribly difficult class to extend (though I would like  
to come up with a better name than "PictureShape").  :-)


On Aug 15, 2009, at 8:01 AM, Niclas Hedhman wrote:

> On Sat, Aug 15, 2009 at 7:56 PM, Greg Brown<gk...@mac.com> wrote:
>
>>> Well, to formulate it better; Does Pivot support that bitmaps are  
>>> part
>>> of a Shape hierarchy?
>>
>> Not at the moment. What is the use case? We might be able to create a
>> "PictureShape" class, or something similar.
>
> Use-case is basically a matter of re-using libraries of existing
> bitmaps. My case might be special, but I would see similar use if one
> wants to integrate for instance Google Maps into a something that uses
> Shapes.
>
>
> Cheers
> -- 
> Niclas Hedhman, Software Developer
> http://www.qi4j.org - New Energy for Java
>
> I  live here; http://tinyurl.com/2qq9er
> I  work here; http://tinyurl.com/2ymelc
> I relax here; http://tinyurl.com/2cgsug


Re: Shapes...

Posted by Niclas Hedhman <ni...@hedhman.org>.
On Sat, Aug 15, 2009 at 7:56 PM, Greg Brown<gk...@mac.com> wrote:

>> Well, to formulate it better; Does Pivot support that bitmaps are part
>> of a Shape hierarchy?
>
> Not at the moment. What is the use case? We might be able to create a
> "PictureShape" class, or something similar.

Use-case is basically a matter of re-using libraries of existing
bitmaps. My case might be special, but I would see similar use if one
wants to integrate for instance Google Maps into a something that uses
Shapes.


Cheers
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I  live here; http://tinyurl.com/2qq9er
I  work here; http://tinyurl.com/2ymelc
I relax here; http://tinyurl.com/2cgsug

Re: Shapes...

Posted by Greg Brown <gk...@mac.com>.
> A Drawing has a Canvas, that can be set. Canvas is a Shape and can be
> part of another Canvas... or? A Drawing is an Image subclass, but
> Image doesn't have a Canvas, so is it that bitmaps in general can not
> be part of the Shape hierarchy, or what?

A Canvas is the root of a shape hierarchy, in the same way that the  
Display is the root of the component hierarchy. A drawing contains a  
canvas and acts as the bridge between the component rendering model  
and the shape model.

> Well, to formulate it better; Does Pivot support that bitmaps are part
> of a Shape hierarchy?

Not at the moment. What is the use case? We might be able to create a  
"PictureShape" class, or something similar.