Graphics changes

Todd Fleming todd at flemingcnc.com
Tue Dec 27 18:47:17 PST 2005


This adds painting and event handling to SceneElement.

Caution: buggy.  I'm posting this to get help from Brian.

To try it
======
(different from src/ui/README)

ExternalMethod.
lobby ensureNamespace: #Graphics &delegate: True.
load: 'src/ui/region.slate'.
load: 'src/ui/transform.slate'.
load: 'src/ui/color.slate'.
load: 'src/ui/colors.slate'.
load: 'src/ui/event.slate'.
load: 'src/lib/memoryarea.slate'.
load: 'src/ui/form.slate'.

You probably want to save your image at this point.

load: 'src/ui/graphics.slate'.
load: 'src/ui/contextsceneelement.slate'.
load: 'src/plugins/sdl-windows/windows.slate'.
load: 'src/plugins/cairo/cairo.slate'.

addSlot: #w valued: (WindowSceneElement newWidth: 640 height: 480).
addSlot: #r valued: SceneElement new.
r behaviors: {
    PaintSolidBackgroundBehavior newColor: Colors Red alpha: 1.
    PaintChildrenBehavior.
    DragBehavior.}.
w add: r.
w eventLoop.

Todd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: graphics_changes.gz
Type: application/x-gzip
Size: 9386 bytes
Desc: not available
Url : /archives/slate/attachments/20051227/bd95a64b/graphics_changes.bin


More information about the Slate mailing list