C# Class Paint.Gauge

Abstract Base class for all types of Guage
Inheritance: ToolBoxToolTouchBase, IGauge
Mostrar archivo Open project: RandolphBurt/MonoGame-iOS-SimplePaint Class Usage Examples

Protected Properties

Property Type Description
CurrentMarker float
GaugeColor Color
MarkerWidth int
PreviousMarker float

Public Methods

Method Description
Draw ( bool refreshDisplay ) : void

Draw the gauge.

Gauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System

Initializes a new instance of the Paint.Gauge class.

Protected Methods

Method Description
CreateGaugeRectangle ( ) : Rectangle

Simply creates a rectangle that defines the location and size of the gauge

CreateMarkerRectangle ( ) : Rectangle

Creates a rectangle that defines the location and size of the marker

OnMarkerChanged ( EventArgs e ) : void

Raises the marker changed event.

Method Details

CreateGaugeRectangle() protected abstract method

Simply creates a rectangle that defines the location and size of the gauge
protected abstract CreateGaugeRectangle ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

CreateMarkerRectangle() protected abstract method

Creates a rectangle that defines the location and size of the marker
protected abstract CreateMarkerRectangle ( ) : Rectangle
return Microsoft.Xna.Framework.Rectangle

Draw() public method

Draw the gauge.
public Draw ( bool refreshDisplay ) : void
refreshDisplay bool /// True = we should completely redraw the gauge /// False = we should just draw the regions that have changed since we last drew the gauge ///
return void

Gauge() public method

Initializes a new instance of the Paint.Gauge class.
public Gauge ( Color backgroundColor, IGraphicsDisplay graphicsDisplay, Rectangle bounds, int markerWidth, Color gaugeColor, float startMarker ) : System
backgroundColor Color
graphicsDisplay IGraphicsDisplay
bounds Microsoft.Xna.Framework.Rectangle
markerWidth int
gaugeColor Color
startMarker float
return System

OnMarkerChanged() protected method

Raises the marker changed event.
protected OnMarkerChanged ( EventArgs e ) : void
e System.EventArgs /// Any relevant EventArgs - should be EventArgs.Empty ///
return void

Property Details

CurrentMarker protected_oe property

The current position/value of the marker.
protected float CurrentMarker
return float

GaugeColor protected_oe property

The color of the gauge.
protected Color GaugeColor
return Color

MarkerWidth protected_oe property

The size of the marker.
protected int MarkerWidth
return int

PreviousMarker protected_oe property

The previous position/value of the marker.
protected float PreviousMarker
return float