Curve (hwx.gui)

A curved line.

Public Methods

addSlider (self, **kwds)
clearMemoryCurve (self)
delete (self)
formatHoverText (self, x, y)
getNextUnusedColor (self)
getTheClosestPoint (self, x, y)
setHovered (self, points, showText=False, event=None)
setMemoryCurve (self)
setSelected (self, points, showText=False, event=None)

Method Details

addSlider(self, **kwds)

Adds a curve slider.

clearMemoryCurve(self)

Clears original curve.

delete(self)

Removes this curve from the plot.

formatHoverText(self, x, y)

Formats the curve point text when hovered.

param x:X value to be formatted.
type x:float
param y:Y value to be formatted.
type y:float
returns:The formatted string with X and Y value.
rtype:str
getNextUnusedColor(self)

Gets next unused color.

getTheClosestPoint(self, x, y)

Gets the closest CurvePoint for the specified x and y.

param x:Specified x value.
type x:float
param y:Specified y value.
type y:float
returns:The closest CurvePoint.
rtype:CurvePoint
setHovered(self, points, showText=False, event=None)

Sets the curve points hovered.

param points:The list of points to be set hovered.
type points:list[Point]
param showText:Determines whether to show hovered text.
type showText:bool
param event:MouseEvent to capture the hover.
type event:MouseEvent
setMemoryCurve(self)

Shows original curve when dragging.

setSelected(self, points, showText=False, event=None)

Sets the curve points selected.

param points:The list of points to be set selected.
type points:list[Point]
param showText:Determines whether to show selected text.
type showText:bool
param event:MouseEvent to. capture the selection.
type event:MouseEvent