Degrafa: Declarative Graphics Framework

Degrafa Code

Get Degrafa Now

Just Getting Started?

Need to get up to speed with Degrafa? No problem. Check out the following links to dive right in:

Degrafa Documentation
Degrafa Samples
Degrafa Learning
Degrafa Group
  • Use Degrafa for:
  • Rich User Interfaces
  • Data Visualization
  • Mapping
  • Graphics Editing
  • More

See how Degrafa has progressed and where it's going next on Ohloh.

A powerful graphics framework for any occassion.

Degrafa is an open source declarative graphics framework for Flex used by some of the industry's top designers and developers. The framework can be used for a wide variety of purposes, ranging from rich user interfaces to intense graphics editing.

If you're just getting started with Degrafa you may want to check out "An Introduction to Degrafa" on InsideRIA. You can also read the blog, refer to the documentation, look at some samples or join a discussion.

Degrafa Beta 3

The latest release of Degrafa is Beta 3.1. Some changes may affect what you've done using Beta 2, so proceed with caution. Click the links below to get what you need or check Degrafa out on Google Code.

Update Details: Degrafa Beta 3.1
Release Date
December 19, 2008
Read about the release here.
Release Details
Release Date
November 21, 2008
Features
GeometryRepeater

Degrafa Repeaters have been completely revamped to allow for maximum flexibility. You can now repeat ANY geometry and alter ANY properties using PropertyModifier. Repeaters from Beta 2 will still work, however they will be dropped by Degrafa 1.0. View Sample

Transforms

Transforms have been added and include Scale, Skew, Matrix, Rotate, Translate and more. Transforms will work with geometry AND fills. You can also assign a variety of registration points, e.g. center, bottmRight, etc. Use Transforms with GeometryRepeater to do some very powerful things. View Sample

Layout

With the new layout features you can use Constraint-based layout (top, left, bottom, right, horizontalCenter and verticalCenter) and Percentage-based layout for easily composing and positioning graphics. View Sample

States

Geometry can now have states. This makes skinning much more familiar and easier, but it States goes beyond just skinning. You can create custom States for geometry and trigger them at any time to create dynamic interfaces, graphics, data visualization and more. Sample Coming Soon

Filters

Apply filters to individual geometry objects. Sample Coming Soon

Mask

An object specifically for masking as if you were using a DisplayObject for masking. Sample Coming Soon

Clipping

Use clipping to define the bounds of viewable objects. Can be applied to single or multiple objects. Sample Coming Soon

VectorFill

Compose fills in MXML instead of using bitmap assets for use in Degrafa objects. These fills maintain vector-like crispness and can be altered dynamically. View Sample

RasterText

A new text object that allows you to compose text within geometry. Sample Coming Soon

RasterImage

A new image object that allows you to compose images within geometry. Sample Coming Soon

Palette

Palette allows you to dynamically generate and manage color palettes for your graphics compositions by specifying a few properties. Sample Coming Soon

Decorators

An early implementation of Decorators have been added to allow you to alter geometry. Simple things like changing lineTos to curveTos can be done to the complex things like multiple strokes or adding geometry along a path. Sample Coming Soon

Splines

An early implementation of a spline set of geometry, such as Bezier spline. Sample Coming Soon

Stencils

Define multiple geometry objects in a single class. Another way to reuse geometry. Sample Coming Soon

Load External Assets

You can now load assets, such as bitmaps, from an external resource like COLOURlovers. View Sample

Bug Fixes and Optimization

Bugs have been fixed and futher optimization of the framework has been made. Thanks to everyone for their feedback and insights.

Change Log
Paint

ColorKey no longer exists. All color type attributes can now be set directly on the color property.

A colorFunction property has been added in all appropriate areas.

Color can now be set using the new Palette objects through binding. Refer to documentation for details.

GradientStroke, GradientFill, VectorFill and BitmapFills now support transform.

  • These paint objects 'inherit' the Geometry transform property of the Geometry object that references them (behaving in a familiar way to DisplayObject content), so their transforms work independently and in addition to the Geometry object.
  • Fill transform registration points default to the center of the target object's bounds.

A new fill type called Vector fill has been added.

  • permits use of another source Geometry to be rendered as a fill
  • optional background color from a referenced SolidFill
  • support (preliminary) for Filters to be applied to the rendered Geometry used in the fill
  • support for a separate Geometry to be used as a clipping source (the bounds of the clipping source Geometry clip the rendering of the source Geometry)
  • includes regular BitmapFill style repeating, scaling and rotation etc, along with fill transform
  • includes some 'smart' settings so that the fill can render to the fill targets bounds, with or without maintaining aspect ratio, or to the center of the fill target

Bitmapfill can now load external image assets.

  • includes options to support external domain image loading, including custom policyfile location if required

A new com.degrafa.paint.palette package has been added to assist in color palette generation. Additional features coming soon.

Child objects will by default inherit from parent paint objects. This behaviour can be set to false via inheritFill and inheritStroke.

New palette object set added. Refer to documentation for details.

Geometry

All repeaters in com.degrafa.geometry.repeaters are being deprecated in favour of the global GeometryRepeater. Please update code that uses these objects to use the GeometryRepeater.

  • Repeaters can be created via GeometryRepeater and PropertyModifier

Cubic and Quadratic Bezier have a new close property that will effectively close the curve.

A length property has been added to line.

Edge case path data has now been handled better in Path calculations.

Geometry now supports transforms.

  • includes the ability to separate transforms into scaling, skew, rotation, and translation (and combined via a TransformGroup)
  • ability to specify registrationPoint relative

Geometry now supports layout.

A new Stencil object has been added that supports both polygon and path data. Reffer to documentation and samples.

Geometry now supports States.

New Trigger package which geometry supports. Refer to documentation for detail. These will be a moving target as we habve many ideas here.

Quadratic and Cubic Bezier Geometry objects now use x0 and y0 as their initial start point instead of x and y. x and y are now reserved for layout on these objects. Please update code that uses these objects to use the x0 and y0 properties.

Geometry has a new state property that is used in conjunction with states. This is used to identify which state the Geometry is be drawn at and can be an array as well as a single entry. For example state=”upSkin”

Core

Implemented a command stack approach. Provides opportunity for extension and runtime manipulation of graphics.

General

Triggers are a work in progress.

Utilities.swf package is a work in progress.

Performance

The internal Path object processing of Segment data has had substantial performance improvements.

Default settings on stroke objects are not explicitly set internally when rendered (noticeable performance improvement at native flash drawing API level)

Rendering Bug Fixes

SVG Path segment parsing handles a range of cubic bezier edge cases for conversion to the internal representation that were rendering incorrectly in beta2. Also smooth, relative Quadratic Bezier Path segment rendering has been fixed.

Some situations that resulted in unusual Fill bleeds have been fixed (Issue 33)

Unclosed objects sometimes rendering a closing stroke has been fixed (Issues 31, 32)

Degrafa Beta 2

Release Details
Release Date
5/15/08