Re: Looking for colourful advice
- From: Owen Taylor <otaylor redhat com>
- To: Joseph Scheuhammer <clown utoronto ca>
- Cc: gnome-shell-list gnome org
- Subject: Re: Looking for colourful advice
- Date: Mon, 08 Mar 2010 17:40:42 -0500
On Tue, 2010-03-02 at 10:35 -0500, Joseph Scheuhammer wrote:
> Hi,
>
> Gnome-mag has a "cross-hair" feature for helping users find the mouse
> cursor. An example graphic can be viewed here:
> http://clown.atrc.utoronto.ca/aegis/GS-Mag/CrossHairs.png
>
> The issue is that the cross hairs cannot obscure what lies beneath
> them. As you can see in the png, the colours of the cross hair are
> blended with the background.
>
> Is colour blending possible within GnomeShell? My approach would be to
> use clutter texture objects to form the cross hairs -- are there colour
> blending functions for texture objects? I've looked at the online
> documentation (http://www.clutter-project.org/docs/clutter/stable/), and
> found transparency manipulations, but that's probably not enough.
> Should I be diving into COGL? Looking somewhere else?
>
> Any advice would be appreciated.
To get this 'XOR' affect you'll need to go straight to OpenGL and use
glLogicOp(). You can find examples of this with a web search. This will
need to be done from C.
Two approaches to code organization:
- You could write a custom clutter actor that draws this way
(Using cogl_begin_gl() and cogl_end_gl() around the OpenGL code)
- You could paint the cross-hairs on top of the stage after the
stage is completely painted, similar to how shell-recorder.c
draws the recording icon and progress bar. (You still need
the cogl_begin_gl() and cogl_end_gl() calls.)
- Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]