PenImage

final case class PenImage(src: D, alpha: D, dst: D, width: I, height: I, x: D, y: D, next: B, rule: I, op: I, wrap: I, rollOff: D, kaiserBeta: D, zeroCrossings: I) extends SingleOut[Double]

A UGen that writes the pixels of an image using an x and y input signal. It uses either a sinc-based band-limited resampling algorithm, or bicubic interpolation, depending on the zeroCrossings parameter.

All window defining parameters (width, height) are polled once per matrix. All writing and filter parameters are polled one per output pixel.

Value parameters:
alpha

the alpha component of the source signal (0.0 transparent to 1.0 opaque).

dst

the "background" image to draw on. A DC(0.0) can be used, for example, to have a "black" background.

height

the height (number of rows) of the input and output matrix

kaiserBeta

the FIR windowing function's parameter

next

a trigger that causes the UGen to emit the current image and begin a new one. An image of size width * height will be output, and new background data will be read from in.

op

BinaryOp.Op identifier for the operand in the application of the Porter-Duff composition (+ in the standard definition).

rollOff

the FIR anti-aliasing roll-off width. Between zero and one.

rule

quasi-Porter-Duff rule id for composition between background (in) and pen foreground. It is assumed that <em>A<sub>r</sub></em> = <em>A<sub>d</sub></em> = <em>1</em>, and instead of addition we use a custom binary operation op. Where the constrain leads to otherwise identical rules, we flip the operand order (e.g. SrcOver versus SrcAtop).

src

the source signal's amplitude or "pen color"

width

the width (number of columns) of the input and output matrix

wrap

if non-zero, wraps coordinates around the input images boundaries. TODO: currently wrap = 0 is broken if using sinc interpolation!

x

horizontal position of the dynamic pen signal

y

vertical position of the dynamic pen signal

zeroCrossings

the number of zero-crossings in the truncated and windowed sinc FIR. If zero (default), algorithm uses bicubic interpolation instead.

See also:
Companion:
object
trait Serializable
trait SingleOut[Double]
trait Lazy[Double]
trait GE[Double]
trait Expander[UGenInLike[Double]]
trait Lazy
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

final def name: String
Inherited from:
UGenSource
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product