gnocl::curve

    Create and display image processing gamma editing curves.

    Synopsis

    gnocl::curve [-option value...]

    Screenshot


    Options

    -range string (default: 0 1 0 1)

    List of float values specifying the x/y ranges for the graphy in the form of minX, maxX, minY maxY.
    -curveType string (default: spline)
    Specify curve type, one of linear, spline or curve.
    -data string
    User defined data which can be retrieved via the cget subcommand.
    -name string
    Name of the widget, can be used to set options in an rc file.
    -tooltip string (default: "")

    Message that appear next to this widget when the mouse pointer is held over it for a short amount of time.
    -onCurveChanged string (default: "")
    Tcl script which is executed whenever the curve type changes. Before evaluation the following percent strings are substituted:

    %w    widget name
    %g
       glade/builder name

    -onShowHelp string (default: "")
    Tcl command which is executed in the global scope if the "show-help" signal is received, which is normally the case if the user presses F1 or Ctrl-F1. Before evaluation the following percent strings are substituted:

    %w   widget name
    %h   help type: either "whatsThis" or "tooltip"
    -sensitive boolean (default: 1)
    Whether or not the item is sensitive to user input.
    -visible boolean (default: 1)
    Whether or not the item is visible.

    Description

    The curve widget allows a user to edit a curve covering a range of values. It is typically used to fine-tune color balances in graphics applications.  The curve widget has 3 modes of operation - spline, linear and free. In spline mode the user places points on the curve which are automatically connected together into a smooth curve. In linear mode the user places points on the curve which are connected by straight lines. In free mode the user can draw the points of the curve freely, and they are not connected at all.

    Commands

    id cget option

    Returns the value for the specified option. The option may have any of hte values accepted by configure.

    id class

    Returns the class of the widget, i.e. statusIcon.

    id configure [-option value...]

    Configures the widget. Option may have any of the values accepted on creation of the widget.
    id delete
    Deletes the widget and the associated tcl command.
    id get
    Returns a vector of points representing the curve.

    id reset
    Resets the curve to a straight line from the minimum x and y values to the maximum x and y values (i.e. from the bottom-left to the top-right corners). The curve type is not changed.
    id set [-option value...]
             Adjust the curve displayed.
    Sub-Command Options
                -gamma

    Recomputes the entire curve using the given gamma value. A gamma value of 1 results in a straight line. Values greater than 1 result in a curve above the straight line. Values less than 1 result in a curve below the straight line. The curve type is changed to free.

                -vector

    Sets the vector of points on the curve. The curve type is set to free..

    Example

    # statusIcon.tcl
    #
    #!/bin/sh
    # the next line restarts using tclsh \
    exec tclsh "$0" "$@"

    package require Gnocl

    gnocl::mainLoop

    Sections