Table of Contents
Be Developer Classifieds are an opportunity for Be developers to tell each other about projects they're working on, are thinking about working on, or would like to work on. Here's your chance to request assistance on a project, or make your talents known to other projects. For more information, check out the Classified Ads section in the Registered Be Developer area. BeOS Software: BeWare Update! Mail-It 2.0 is here! You've tested the beta and discovered that no other e-mail application on the BeOS comes close to Mail-It's usability and speed. If you've come to depend on some of Mail-It's new features, like the "Any Header" to accurately filter the BeDevTalk messages or the multiple address books for managing hundreds of e-mail contacts, you won't want to wait to get your fully licensed version. Remember, Mail-It 2.0 Public Betas go out (expire) with 1998. Visit BeDepot.com at <http://www.bedepot.com/Products/Beatware/Mail-It.asp> and get your FULL VERSION for only $49.00 (USD). Registered owners of Mail-It 1.6 can upgrade for the very low price of only $9.95 (USD). BE ENGINEERING INSIGHTS: QuickerPaint By George Hoffman -- gen@be.com
The Bay Area is tied more precariously to the diurnal cycle than any other location in the civilized world. Silicon Valley buzzes with geeks staying up all night, hacking away at a problem to meet a beta release deadline the next morning. Geeks on insanely optimistic production schedules that are somehow met when entire companies pull twenty-hour days for weeks at a time. Now. Tell me why it is that at 2:00 a.m. on a Tuesday morning, as I sit here writing sample code for all of my loyal readers (you're both still out there, right?), I am unable to order a pizza from any of the lumpty- zillion pizza places in the phone book, because they all stop delivery at 11 p.m.? It's probably the same reason why all movie theaters in the Bay Area run their last show at 10:30 p.m. Huh? Am I the only one who is mystified by this? If I had any brains at all, I'd get out of the software business and open up a chain of 24-hour pizzeria/movie theaters. Ah, there I go again. You'll have to excuse me. There are times in the development cycle of any product when it just doesn't seem to be coming together. You add feature after feature, fix bug after bug, insert moronic Easter Egg after countless moronic Easter Egg, but the product just doesn't seem to cohere. Its shiny surface, if you will, is not congealing from the smelly, festering pit of your code base. These are dark times for any developer. I have reached such a nadir. The product, of course, is QuickPaint. Yes, QuickPaint, the standard BeOS image editor, much like "ed" is the standard UNIX text editor. QuickPaint is the standard by which all other BeOS image editors are judged, and boy, are they all looking good! Some of you may remember QuickPaint from "Cop-Out" <http://www.be.com/aboutbe/benewsletter/volume_II/Issue28.html#Insight>, in which I introduced it as sample code. Since then, I've promised sample code for using the new BeOS Release 4 features I wrote about in "That BeOS is one baad mother..." <http://www.be.com/aboutbe/benewsletter/volume_II/Issue45.html#Insight>. Could there be a better way to demonstrate these new features than integrating them into the Be Developer Newsletter's own Photoshop-killer Ÿbereditor, QuickPaint? Probably! But I did it anyway! Among the new QuickPaint features are support for layers, anti-aliased pen strokes, image import, and several new tools. Here's where to get it: <ftp://ftp.be.com/pub/samples/graphics/QuickPaint.zip>You need R4 to compile and/or run it. The makefile included is strictly bare bones and doesn't handle dependencies correctly (again, because I am lazy) so you'll probably want to write your own makefile or use a BeIDE project to make small changes, in order to be sure that all necessary files are recompiled. The UI is easy enough to use, although completely un-self-explanatory. Basically, you choose a tool and start drawing. The pen tool is now anti-aliased and thick; other drawing tools also use thick pen sizes. The two new tools are a transparentizing pen (the inverted pen icon) and a "hand" tool to move layers around (that's the big X, because I didn't want to bother coming up with an icon). To add a layer, either hit Alt+L or choose it from the Layers menu, or drag and drop an image onto QuickPaint from the Tracker. You can also choose Add Image from the File menu and that image will be added in another layer. The layer stack appears along the left side of every editor window. To select a layer for drawing, left-click it; its button will be pushed in, indicating the selection. To hide/show a layer, right-click it. To change the order of the layers, left-click and drag the layer button to the new location in the stack. Clickable arrows will appear above or below the stack window if you can scroll to see more layers. The changes to the QuickPaint sources are evident enough; the code has bloated up to almost 3,000 lines. But in those lines you'll find demonstrations of some of the coolest and most useful new app_server features. For instance, the new alpha-blending capabilities are used
throughout the program. You'll find usage of the "normal"
Other new APIs are scattered here and there. The new
Beware that there are bugs in some of the translators that
improperly set the alpha of pixels read from an imported
file. The Be logo in the SampleMedia folder, for instance,
loads without problems, but as all the pixels have an alpha
of zero, the new layer appears blank. These bugs will be
fixed for R4.1. Also fixed for R4.1 will be the conspicuous
absence of alpha controls on the I welcome any feedback from developers about how useful all this QuickPaint nonsense is, and any questions about how the new APIs are used in general or specifically in QuickPaint. I'd also like to point out that I haven't implemented any of the things I suggested last time as "exercises for the reader," so you can simply merge all the code you've written for those exercises to the new source base and be ready to rip! Heh-heh-heh. Do you feel guilty? Good! In closing, I'd like to take this opportunity to welcome Ficus Kirkpatrick to the growing, tightly integrated QuickPaint Application Suite Family. We here at QuickPaint, Inc,. are proud to add Whack to our offerings as the flagship product of our lucrative Really Cool Useless Crap division. As a result of this merger, Ficus will become a wholly owned subsidiary of me. He'll soon be available for bachelor parties and bar mitzvahs; I'll keep you posted.
BE ENGINEERING INSIGHTS: Kernel Engineer Breaches Software's Iron Curtain and Lives to Tell About It By Ficus Kirkpatrick - ficus@be.com
I don't often poke my head out above the Iron Curtain that divides user and kernel space, but recently, I decided to wander over, see the sights, and visit the people. Beno”t had written a series of programs that would display something cool on the screen. They were all derived from the same skeleton: constantly iterate over the frame buffer, and calculate the value of each pixel based on its location. The only variation between these programs was the expression in the inner loop. I experimented with making my own programs like this for a while, but got tired of constantly recompiling. "It would be excellent," I mused, "if I could just type the expression in a window." I came up with a solution that should simultaneously galvanize and repulse true believers of the Holy Grail of software engineering: code reuse. Employ what is already the best expression parser and optimizer in the system: the C compiler! <ftp://ftp.be.com/pub/samples/game_kit/Whack.zip>
The user interface is simple. There's a menu bar at the top of the window, an area in the middle for viewing the plotting of your expression, and an area at the bottom to enter it. You can save add-ons, drop them into the window, and add the ones you like to a list of favorites. In the directory What makes it look cool is that the variables you use in your expression change depending on the position of the pixel it is being evaluated for, time, frame count, etc. The variables available to use are: x The screen-relative X coordinate of the current pixel. y The screen-relative Y coordinate of the current pixel. ix The window-relative X coordinate of the current pixel. iy The window-relative Y coordinate of the current pixel. f A number incremented once per frame. t Time (actually, a number incremented once per pixel). One of the really interesting effects you can achieve is by using the screen-based and window-based position variables together and then moving the window around. Give it a try. There are a few things missing from So, what's the alpha channel used for? The extremely simple
drawing loop doesn't do any blending. Somehow it didn't seem
right to be taking that extra byte of memory and not making
any use of it. You may have heard of QuickPaint, the
industry standard for paint programs that is the subject of
George's Newsletter articles. I decided to apply to the
QuickPaint Developer Program and see how I could integrate
that extra unused byte from Try running both programs at once, and notice that you can
send the current frame of Unfortunately, it requires a little work on the part of the
expression writer to make the I feel somehow wiser after this venture into the world of writing user programs, but I think I'll head back over the fence again. See you next time!
DEVELOPERS' WORKSHOP: The Cow Piano By Doug Fulton -- lbj@be.com "Developers' Workshop" is a weekly feature that provides
answers to our developers' questions, or topic requests.
To submit a question, visit
http://www.be.com/developers/suggestion_box.html.
A journalist friend of mine (staked out in Washington -- you
want stories?) wrote to me recently to ask if I had heard of
a time variant CD player. He wants to play his CDs at a
slower rate, but without changing the pitch. Can such things
be? With a computer, sure. But as a black box, I doubt it.
If anyone knows better, send me a note; the fourth estate is
waiting. Moreover, even the computer solution as it's
implemented by commercial sound editors isn't really good
enough, because while a computer can listen, it can't hear.
My response, which doubles as a gauntlet tossed to the
charging Turks, follows. As far as I know, there's been no breakthrough in polyphonic
detection and analysis in the last ten years. But you'll
correct me if I'm wrong. Better, write an app that merges
animals and instruments. A cow piano is impressive...but
just think of the duckulele.
1997 Be Newsletters | 1995 & 1996 Be Newsletters Copyright ©1998 Be, Inc. Be is a registered trademark, and BeOS, BeBox, BeWare, GeekPort, the Be logo and the BeOS logo are trademarks of Be, Inc. All other trademarks mentioned are the property of their respective owners. Comments about this site? Please write us at webmaster@be.com. |