[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xfree-render
Subject:    [Render] Porter/Duff unary operators
From:       Keith Packard <keithp () suse ! com>
Date:       2000-07-17 4:43:41
[Download RAW message or body]

I skipped Unary operators because I wanted to focus on compositing, but 
now I'd like to consider how to handle them.  The three unary operators 
are:

	darken  ((r,g,b,a),p) = (p*r, p*g, p*b,   a)
	dissolve((r,g,b,a),d) = (d*r, d*g, d*b, d*a)
	opaque  ((r,g,b,a),o) = (  r,   g,   b, o*a)

where 0 <= p, d, o and no upper limit is required.  The lack of an upper 
limit means I can't encode these values in a Picture.  I suggest the 
easiest way of supporting these is with a separate request:

Scale:

	color-scale:	CARD32
	alpha-scale:	CARD32
        src:            PICTURE
        dst:            PICTURE
        src-x, src-y:   INT16
        dst-x, dst-y:   INT16
        width, height:  CARD16

	This request replaces the specified rectangle in dst with
	the specified rectangle of src with the components multiplied
	in the following fashion:

		dst-red   = src-red   * color-scale / 65536
		dst-green = src-green * color-scale / 65536
		dst-blue  = src-blue  * color-scale / 65536
		dst-alpha = src-alpha * alpha-scale / 65536

	The coordinates are relative their respective drawable's
        origin.  Rendering is clipped to the geometry of the dst drawable
        and then to the dst clip-list, the src clip-list and the mask
        clip-list.

        If the specified rectangle extends beyond src, then if src has
        the repeat attribute set, the src picture will be tiled to
        fill the specified rectangle, otherwise rendering is clipped to
        the src geometry.


keithp@suse.com		XFree86 Core Team	SuSE, Inc.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic