2011-11-12

Graphics Editing in OSX Lion

Problem

I need to edit the top-left pixel of a bitmap in Acorn.

Solution 1

Just edit the pixel, duh. Wait, what’s this? The mouse pointer turns into a resize arrow when I get anywhere near the top-left pixel. In fact, I can’t edit any pixels around the edge of a window thanks to the new window resize behaviour (which I never use and didn’t want).

Solution 2

Make the window full-screen. OK, I’ll fill my 24” monitor with an enormous single picture just so I can edit one pixel. Here we go, let’s edit that pixel! Oh wait, that’s not going to work. The menu bar drops down whenever the mouse pointer is at the top of the screen.

Didn’t Macs used to be the choice for graphics pros?

2008-04-09

Bitmap Blitting with Transparency and Proportional Fonts

Another hefty set of updates today.

Following on from the requests made in the forum, I’ve added a new “drawBitmap()” method to the GraphicsPort class that will treat a specified colour as transparent. Any pixels of that colour won’t get drawn. This is a lot slower than the usual method, as it involves drawing the bitmap pixel-by-pixel instead of using the DMA hardware, so it should only be used when necessary.

In the same thread, Jeff asked for some improvements to the font system. I have moved the “drawChar()” function out of the TextWriter class and into the font classes, which means each font is now responsible for blitting itself. It offers a much more flexible system. In addition to this, I’ve split the FontBase class in two and added a new “FixedWidthFontBase”. Woopsi is now set up to handle proportional fonts. I just need someone to write a proportional font class (hint hint).

As part of the proportional font changes I re-wrote the “Text::wrap()” function. It’s a lot neater, faster and more efficient now. However, the change seems to have broken the scrollbars again (gnnk) so I’ll need to spend some time debugging it.

EDIT: Scrollbars fixed (or as fixed as they ever have been), plus I’ve fixed some other scrollbar problems I found.