AKTIVE

palette.tcl at trunk
Login

palette.tcl at trunk

File etc/generator/virtual/pattern/palette.tcl artifact c75e779b64 on branch trunk


     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
## -*- mode: tcl ; fill-column: 90 -*-
# # ## ### ##### ######## ############# #####################
## Generators -- Virtual Image - Gray/Color palettes

operator image::palette::grey {
    section generator virtual

    note Returns a 128x128 image containing a gray palette.

    example

    body {
	aktive op sample replicate xy \
	    [aktive image gradient width 8 height 8 depth 1 first 0 last 1] \
	    by 16
    }
}

operator image::palette::color {
    section generator virtual

    note Returns a 128x128 image containing a color palette.

    example

    body {
	set red   [aktive image gradient width 8 height 8 depth 1 first 0 last 1]
	set green [aktive op rotate cw   $red]
	set blue  [aktive op rotate half $red]
	aktive op sample replicate xy [aktive op montage z $red $green $blue] by 16
    }
}

##
# # ## ### ##### ######## ############# #####################
::return