Since BeOS had no anti-aliased drawing except for text, it didn't matter whether drawing diagonal lines (for example) in B_OP_COPY or B_OP_OVER. Applying the meaning of B_OP_COPY strictly to everything else would have broken pretty much every existing BeOS, resulting in broken drawing for anything but straight lines and rectangles. The solution was to treat B_OP_COPY just like B_OP_OVER *except* for text rendering, where we could be compatible with the BeOS behavior. Nevertheless, one can sometimes observe apps using B_OP_COPY where they /should/ be using B_OP_OVER for rendering text, resulting in white edges around the glyphs where the actual LowColor() does not match the current background on which the text is rendered. There is however a problem when glyphs in a string overlap. Some fonts have overlapping glyphs by default (handwriting, etc). With the LCD sub-pixel filtering, this problem is visible even in fonts where glyphs don't overlap normally, for example 'lt'. The leftmost pixel of the 't' is smeared due to the filtering and produces an almost transparent pixel which is rendered (using the low color as the background) on top of the 'l'. To fix this, one would have to render the string into an alpha mask buffer first, and then blend it all at once using B_OP_COPY. This however defeats the point of B_OP_COPY, which is to be a performance optimization. So instead, I opted for the solution that is already in place for everything else, which is to make B_OP_COPY behave like B_OP_OVER. For the case that this would have produced a difference, i.e. rendering with the solid high color, one needs to clear the background using the low color, before rendering text, or it would have looked broken. So in practice, there cannot be a difference. Change-Id: I4348902ae754507f1429e0a9575f03d8ecbce333 Reviewed-on: https://review.haiku-os.org/c/877 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Haiku
Homepage | Mailing Lists | IRC Channels | Issue Tracker | API docs
Haiku is an open-source operating system that specifically targets personal computing. Inspired by the BeOS, Haiku is fast, simple to use, easy to learn and yet very powerful.
Goals
- Sensible defaults with minimal configuration required.
- Clean, clear, concise code.
- Unified desktop environment.
Trying Haiku
Haiku provides pre-built nightly images and release images. Haiku is compatible with a large variety of hardware, but in case you don't want to "take the plunge" and install Haiku on bare metal, you can install it on a virtual machine (VM) instead. If you've never used a VM before, you can follow one of the "Emulating Haiku" guides.
Compiling Haiku
See ReadMe.Compiling
.
Contributing
Haiku is a meritocratic open source project with a large variety of tasks. Even if you can't write code, you can still help! Haiku needs designers, (technical) writers, translators, testers... Get involved and help out!
Contributing code
If you're submitting a patch to us, please make sure you're following the patch submitting guidelines.
If you're having trouble finding something in the source tree, you can use one of our OpenGrok servers:
- http://xref.plausible.coop/ (provided by Landon Fuller)
- http://code.metager.de/source/xref/haiku (provided by MetaGer)
Contributing documentation
The main piece of documentation that still needs work are the API docs (found
in the tree at docs/user
). Just find an undocumented class, write
documentation for it, and submit a patch.
Contributing translations
See wiki:i18n.
Contributing software ports
See HaikuPorts.
Contributing to our infrastructure
See Infrastructure.