GraffitiGradientSelector

View Categories

Images #

About #

GraffitiGradientSelector is GraffitiFadePanel on steroids. It can be used to display entirely custom gradated color schemes or for selection of such schemes.

Features:

  • Controls for managing color position and scale.
  • Linear or Radial display styles.
  • Definable rotation for linear style gradients.
  • Full cursor interactivity.

Enumerations #

This class exposes no enumerations.

Constants #

NameTypeValue
StyleLinearInteger0
StyleRadialInteger1

Events #

DefinitionDescription
AddMarker( MarkerPosition as Integer, byRef MarkerColor as Color )When a marker is added to the display by the user, this event will fire with the relevant information.
DebugDrawTime( intSeconds as Double )This event fires after each redraw of the display as a means of determining how long these redraws take, and can be used to troubleshoot speed issues.
MarkerClick( Marker as GSColor )This event fires when the user clicks a color marker on the display.
MarkerDrag( Marker as GSColor, PreviousPosition as Integer )Fired when the user is performing a drag operation on a marker.
MarkerMoved( Marker as GSColor, PreviousPosition as Integer )Fires when the user has released the mouse after a drag operation.
MarkerRemoved( Marker as GSColor, PreviousPosition as Integer )Fires when the user drags a marker from the display, removing it.
MarkerScaleChanged( Marker as GSColor, PreviousScale as Integer )Fires the user has changed the gradient scale for the specified marker.

Methods #

DefinitionParametersReturn TypeDescription
AddValuenewColor as Color
newPosition as Integer
newScale as Integer = 50
NoneUsed to add a new color to the display at a specified position and with a specified scale.
AddValuenewValue as GSColorNoneUsed to add a new color to the display at a specified position and with a specified scale.
DeleteAll()NoneNoneRemoves all colors from the display.
DeleteValueintIndex as IntegerNoneRemoves a color from the display by index or object.
DeleteValuethisValue as GSColorNoneRemoves a color from the display by index or object.
FindMarkerMarker as GSColorIntegerFind a value within the array of color values by the specified criteria.
FindMarkerMarkerValue as Color
MarkerPosition as Integer
NoneFind a value within the array of color values by the specified criteria.
FromBrushbrush as GraphicsBrushNoneParses a Linear or RadialGraphicsBrush object to populate the control.
InsertValueintIndex as Integer
newColor as Color
newPosition as Integer
NoneAdds a color to the display at the defined point in the array.
InsertValueintIndex as Integer
newValue as GSColor
NoneAdds a color to the display at the defined point in the array.
ToBrushincludeScaleValues as Boolean = TrueGraphicsBrushReturns a Linear or RadialGraphicsBrush containing the control’s values. If includeScaleValues is True, colors are inserted to create the scaled color effects.
UpdateValueintIndex as Integer
newColor as Color
NoneUpdates the given color value’s properties.
UpdateValueintIndex as Integer
newColor as Color
newPosition as Integer
NoneUpdates the given color value’s properties.
UpdateValueintIndex as Integer
newPosition as Integer
NoneUpdates the given color value’s properties.

Properties #

NameTypeDefault ValueDescription
AngleInteger0The angle of the gradient (0-359)
AntiAliasRadialBooleanTrueDetermines whether a radial gradient is anti-aliased, thus removing the potentially jagged look.
BGColorColor&c000000The background color of the control.
BorderColorColor&c000000The color used for the border of the display.
ExcludeMarkerGSColorNilUsed to hide a marker from the display.
FillBackgroundBoolean&c000000Determines whether the class will draw a solid color behind the display and markers.
FillBackgroundColorColor&c000000Determines the color used if FillBackground is equal to True.
MarkerBGColorColor&c000000Determines the background color of the display markers.
MarkerBorderColorColor&c000000Determines the border color of the display markers.
NoUpdateBoolean&c000000Used to signal that the display should not refresh for any reason.
ScaleMarkerBGColorColor&c000000The background color used to display scale markers on the display.
ShowControlsBooleanFalseDetermines whether markers are shown on the display.
StyleInteger0Determines the style of the gradient to be displayed. Constant values

Examples #

There are currently no examples for this class.