Degrafa: Declarative Graphics Framework

Degrafa Blog

Get Degrafa Now

Introducing Degrafa Auto Shapes

People may or may not not know that the concept for Degrafa originated with something Jason Hawryluk created in Flex 2 called the Primitive Explorer. It basically allowed you to explore different primitive shapes and download the classes to be used in a project via MXML markup and CSS.

Well, nearly 2 years later Degrafa has come full circle to now add these shapes (along with a ton of others) to the framework to be accessed via MXML markup. We’re calling these new sets of classes “Auto Shapes”. You might be familiar with the term if you use Fireworks.

Each of the Auto Shapes is unique geometry that has it’s own set of properties, just like the base Degrafa geometry. For example, there is a DonutAutoShape and you can set both the inner and outer radius (along with other properties).

The nice thing about Auto Shapes is it cuts a lot of the work out of trying to compose multiple shapes together to get the desired final shape. Also, if you were to composite shapes together you wouldn’t have access to the properties that are unique to the shape.

Below is an example of some of these Auto Shapes, including a BurstAutoShape. On the BurstAutoShape ,the number of points has been specified, the size and it’s set to invert, giving the appearance of a flower. And, just like any other geometry in Degrafa, you can apply fills, strokes, transforms, decorators, etc. to make all kinds of cool stuff with very minimal code.

Auto Shapes

For now, you can access the first group of AutoShapes in the Origin branch of the Degrafa SVN. We will be continually adding more and encourage others to create and contribute their own. For those who end up using them, we’re open to any feedback you might have.

Tags: ,

5 Responses to “Introducing Degrafa Auto Shapes”

  1. lee Says:

    Looks cool! I love the idea of a rich graphics library!! I’m familiar with including source packages; drop degrafa folder in my com library directory, but not with using SWC files. Does anyone have a resource to learn how to work with SWC libraries, just for the sake of becoming familiar? The Inside RIA instructs you to add it to your project’s library folder in Flex, but is there a way to avoid having to add the SWC to every project? Much appreciated all around!

  2. Justin Says:

    I’ve already added the Degrafa_Beta3.1_Source SWC to my project and wrote some code; very nice…

    I came to his blog looking for a simple way to draw a triangle. These autoshapes seem to be exactly what I need but I’ve been unable to figure out how to use them. Can anyone point me to directions on how to use files at the ‘origin branch’ link in my project?

  3. borf Says:

    Hi,
    I need an SWC that contains this version of the autoshapes library. Is one available? I looked at the orgin tree but there are no build scripts to create an SWC for that branch. Can you please provide this new functionality in an SWC? Thanks!

  4. Juguang Says:

    I also tried to find SWC containing AutoShape, but failed. I really suggest you guys to learn and use a bit SVN and checkout the ‘branches/Origin” by yourself. :-)

  5. Degrafa Auto Shapes | Design Gallery Says:

    [...] To realize the full potential of degrafa framework, the Tiny Designer application is further enhanced to support degrafa Auto Shapes. [...]

Leave a Reply