The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Looking for a few good words

0 replies on 1 page.

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 threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Looking for a few good words Posted: Dec 17, 2007 8:08 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Looking for a few good words
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

Advertisement

In the beginning, there was the "Find Text" dialog. Many years went by with different variants and tweaks. Then came the Firefox trick of doing "less/more" like searches right in line. And now Apple has a nice integrated help thing that shows up for searching text. It's pretty cool me thinks. So I thought to myself, could I do something like that for VisualWorks? You still have to use Ctrl-l, I didn't touch that part of the issue. Just what happens when you actually do open a "find" session. It was a fun little afternoon project. It of course, uses Cairo to do this. Some ask "why not just implement VW VM primitives to do alpha blending. Why do I need a big solution like Cairo." My response is basically that alpha blending is a foundation for doing other things. Just because you can do alpha blending doesn't mean you can do the other things. It *may* provide a piece of the solution. A couple of things the above is doing that go above and beyond just having an alpha pixel channel:

  • Interpixellation - One thing the above is does not restrict drawing primitives to be pixel aligned. So you can draw lines half way between two pixels.
  • Gradients - There are two different overlay gradients used on the current selection to give it the glossy button look.
  • Grouping (buffering) - One thing that's easy in the above is to build a temporary surface to draw on, one that goes fast. It blinks when it updates because we have to use the VW invalidate mechanism for the underlying view. But the "fog" is actually 11 repeated draws, with a low alpha value, and the "holes" are grown bigger on each redraw, so it gives us the faded fog effect around the holes. But you don't see any of those because of the stack based grouping mechanism.
  • Negative Clip - Speaking of those holes... isn't that a neat trick? I didn't have to draw an alpha plane, but was able to specify that using paths instead. Be reversing the direction of the hole rectangles (with rounded edges) relative to the top rectangle path, and using the composite for a clip, we get a clip shape with "holes" in it.

Read: Looking for a few good words

Topic: Need to debug ObjectStudio 8 Internals? Previous Topic   Next Topic Topic: Become part of the status quo or leave?

Sponsored Links



Google
  Web Artima.com   

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