Vector Graphics

December 9, 2010

Vector Graphics

Vector Graphics

http://silversmalltalk.appspot.com/

Above is a test of rotating and scaling objects.

This is the Smalltalk code:

| w |
w := WorkspaceWindow open.
w x: 50 y: 300; scale: 2.
0 to: 359 by: 45 do:[:x |
w := TestWindow open green.w x: 550 y: 300; rotate: x]

The rotated windows are fully functional as is the WorkspaceWindow which is scaled to twice the normal size.

Note that everything is rotated or scaled including controls like TextBoxes; also the font size for text is scaled along with the control.

This is possible because the Silverlight rendering engine is based on a scalable vector graphics model (Microsoft’s version). So *any* visible object can be scaled, rotated, or skewed – or any combination thereof.

Also, almost any visible effect can be animated and animations can be grouped together using a “Storyboard”. So you can set up a complete animation sequence in a Storyboard and just tell the animation to start when you are ready. The animation is handled entirely in the Silverlight engine – Silver Smalltalk just has to set it up.

I will be adding animations to the package probably next week; control layouts and network communications will be added first.

Advertisements

7 Responses to “Vector Graphics”


  1. Hey- This is really interesting… I wish you the best of luck!

    Unfortunately, using Safari 5.0.3 on Mac OS X 10.6, when I follow that link I just get a blank page with only an “Install Microsoft Silverlight” I have installed Silverlight… so what am I doing wrong?

    Thanks!
    Daryl


  2. I don’t have a Macintosh, so I can’t be of much help.

    SST works fine in Safari 5.0 on Windows Vista.

    Maybe another reader with a Macintosh could be of help?

  3. Andy Burnett Says:

    I have just installed it on a new machine and it seems to run under Safari on OSX 10.6.5

    I did have to restart the browser after the install

    Cheers

  4. Chip Nowacek Says:

    I couldn’t get your test code to work. Seems TestWindow is not recognized. Anyway, the code below works for a demo. Visually clean and crisp. Can’t want to play with other visible objects.

    | w |
    w := WorkspaceWindow open.
    w x: 50 y: 300; scale: 2.
    0 to: 359 by: 45 do:[:x |
    w := WorkspaceWindow open. w x: 550 y: 300; rotate: x ]

    • Peter Fisk Says:

      Hi Chip,

      TestWindow was just a temporary class.
      There will be some graphic tools available next week.

      Good to see that you are experimenting in Smalltalk

      • Chip Nowacek Says:

        I figured it was just the ebb and flow of your process. Maybe someone else will benefit.

        Smalltalk is the most phenomenal language I’ve ever worked with. I’m coming to the party late. A fast (loading and running) in-the-browser platform – that can somehow speak to peers – seems to be the only thing missing. I think you are working in just the right place – not that my opinion is worth much.

      • Peter Fisk Says:

        Chip, your opinion is worth as much as anyone else’s.

        Don’t worry about being late to the party.

        There is a whole new world of highly interactive online applications that is just beginning (the buzzword is RIA – Rich Internet Applications).

        Look at it this way – maybe you are late for the last party, but you are one of the first to show up for the newest party.

        — Peter


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: