The Artima Developer Community
Sponsored Link

Agile Buzz Forum
An Iconic Story

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
An Iconic Story Posted: Feb 5, 2008 6:37 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: An Iconic Story
Feed Title: Travis Griggs - Blog
Feed URL: http://www.cincomsmalltalk.com/rssBlog/travis-rss.xml
Feed Description: This TAG Line is Extra
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Travis Griggs - Blog

Here's how it started out. I had this little icon idea I wanted to play with. It had to do with the EnvironmentEditor and showing partial selections (e.g. the selected status of something like a class, where having some fraction of its methods selected means it's selected, but not entirely so).

So I sat down and made a pretty picture using Inkscape. Mind you, I wasn't sure this would work or not. It was just an idea I wanted to explore.

My pretty Inkscape drawing of a glassy partially filled blue bullet

That was fun. I made a couple variations, created an Assets subclass, told it to sync, and took a look at the results:

My pretty icons dumbed into VisualWorks 

At this point, I got pretty disappointed. It actually took a couple of iterations to even get to that point. They looked worse before. The problem is that the graphics use a myriad of alpha values at the edges to get a smooth rounded look. Since VisualWorks Image object only specifies colors, and all the drawing primitives can do at best, pixel binary clipping, you have to draw the line at some alpha value and say whether it's off or on. And the result is that jagged ugly effect.

So I decided to take some hints from both Randy Coulman and Mike Hales who have done things like this and just draw them directly using Cairo. Nominally, you just need displayOn:at: and a couple support methods. Was rather easy actually:

Now drawn with Cairo

So now the blue dots look nice. At this point, I could evaluate this partial selection idea on its own merits, rather than being handicapped by not being able to express it correctly in the first place. I decided it was OK at best. But what impressed me was how the quality of drawing now allowed me to make that judgement, rather than with the first attempt.

So I put that aside, and then decided to take some of these ideas and play with them a little more. The first item was packaging up the ability to draw Cairo ImageSurfaces in VisualWorks. There's a number of VisualComponent methods you need to properly masquerade in the various spots you might try to draw one, but when all is said and done, you can put them in lists, in toolbars, menus, and see them in inspectors. Again, thanks to Randy for hinting what some of these were. That's been packaged up as HigherGlyphics in the Open Repository. One other thing it does is change the import_png type for Assets, so by default png files are turned into blocks that can cache/recreate Cairo ImageSurfaces from your png file contents.

This made it easy to go scour the web for some larger/shinier icons to use in the launcher for demo's sake. I found some. In particular at the Tango project and Open Clip Art. And what I couldn't find, I fired up Inkscape and had fun drawing:

Launcher with big/smooth icons

Nice big smooth icons in the launcher. Now don't get up in arms about the icons themselves. They don't gel well at all. And the one's I redraw, I purposely left the idea in place, even though I really don't think the glass/balloon icon is a good idea. IOW, it's not meant to showcase the icons themselves, but imagine what a real graphics design could do there.

Anyway, you can load and use this package (provided you do Cairo of course) for the Open Repository. It's called ExtraIconsToo. And if you fancy yourself a graphics designer and want to draw something different, send me your svg files. Being able to draw these in Inkscape and then just hit the "Sync Assets" button was very nice.

Read: An Iconic Story


Topic: What a Fourth Quarter! Previous Topic   Next Topic Topic: And So it Begins...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use