Class: Gegl::Curve

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initializeGegl::Curve

Create a default Gegl::Curve with an identify mapping of (0.0..1.0) -> (0.0..1.0).

Returns the newly created default Gegl::Curve.

Instance Method Details

#add_point(x, y) ⇒ Integer

Add a point to the curve at x y (replacing the value exactly for x if it already exists.

Parameters:

  • x (Float)

    x coordinate

  • y (Float)

    y coordinate

Returns:

  • (Integer)

#calc_value(x) ⇒ Float

Retrieve the number of points in the curve.

Returns the number of points for the coordinates in the curve.

Parameters:

  • x (Float)

Returns:

  • (Float)

#calc_values(x_min, x_max, num_samples, xs, ys) ⇒ nil

Compute a set (lookup table) of coordinates.

Parameters:

  • x_min (Float)

    the minimum value to compute for

  • x_max (Float)

    the maximum value to compute for

  • num_samples (Integer)

    number of samples to calculate

  • xs (Float)

    return location for the x coordinates

  • ys (Float)

    return location for the y coordinates

Returns:

  • (nil)

#duplicateGegl::Curve

Create a copy of curve.

Returns:

#get_point(index, x, y) ⇒ nil

Retrive the coordinates for an index.

Parameters:

  • index (Integer)

    the position of the value number to retrieve.

  • x (Float)

    x coordinate return location.

  • y (Float)

    y coordinate return location.

Returns:

  • (nil)

#get_y_bounds(min_y, max_y) ⇒ nil

Get the bounds on the values of the curve and store the values in the return locaitons provided in min_y and max_y.

Parameters:

  • min_y (Float)

    return location for minimal value.

  • max_y (Float)

    return location for maximal value.

Returns:

  • (nil)

#num_pointsInteger

Retrieve the number of points in the curve.

Returns the number of points for the coordinates in the curve.

Returns:

  • (Integer)

#set_point(index, x, y) ⇒ nil

Replace an existing point in a curve.

Parameters:

  • index (Integer)

    the position of the value number to retrieve.

  • x (Float)

    x coordinate

  • y (Float)

    y coordinate

Returns:

  • (nil)