C# Class Paint.Gauge

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

Protected Properties

Свойство Type Description
CurrentMarker float
GaugeColor Color
MarkerWidth int
PreviousMarker float

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

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

CreateMarkerRectangle() protected abstract méthode

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

Draw() public méthode

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 ///
Résultat void

Gauge() public méthode

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
Résultat System

OnMarkerChanged() protected méthode

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

Property Details

CurrentMarker protected_oe property

The current position/value of the marker.
protected float CurrentMarker
Résultat float

GaugeColor protected_oe property

The color of the gauge.
protected Color GaugeColor
Résultat Color

MarkerWidth protected_oe property

The size of the marker.
protected int MarkerWidth
Résultat int

PreviousMarker protected_oe property

The previous position/value of the marker.
protected float PreviousMarker
Résultat float